21,7 → 21,7 |
// | along with Foobar; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: gallerie.php,v 1.1 2006-12-07 15:39:47 jp_milcent Exp $ |
// CVS : $Id: gallerie.php,v 1.2 2006-12-07 16:25:23 jp_milcent Exp $ |
/** |
* papyrus_bp - gallerie.php |
* |
37,7 → 37,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 1999-2006 |
*@version $Revision: 1.1 $ $Date: 2006-12-07 15:39:47 $ |
*@version $Revision: 1.2 $ $Date: 2006-12-07 16:25:23 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
75,7 → 75,7 |
} |
|
if (!isset($options['dossier'])) { |
return '<p class="pap_erreur">'."Aucun dossier d'images passé en paramêtre!".'</p>'; |
$GLOBALS['_GALLERIE_']['erreur'] = "Applette GALLERIE : le paramètre 'dossier' est obligatoire !"; |
} |
if (!isset($options['largeur'])) { |
$options['largeur'] = 160; |
89,17 → 89,22 |
|
$noimage = 0; |
// Read directory |
if ($dh = opendir(PAP_CHEMIN_RACINE.$options['dossier'])) { |
while (($f = readdir($dh)) !== false) { |
if((substr(strtolower($f),-3) == 'jpg') || (substr(strtolower($f),-3) == 'gif') || (substr(strtolower($f),-3) == 'png')) { |
$noimage++; |
$images[] = array('filename' => $f); |
array_multisort($images, SORT_ASC, SORT_REGULAR); |
} |
} |
closedir($dh); |
} |
|
$GLOBALS['_GALLERIE_']['dossier'] = PAP_CHEMIN_RACINE.$options['dossier']; |
if (is_dir($GLOBALS['_GALLERIE_']['dossier'])) { |
if ($dh = opendir($GLOBALS['_GALLERIE_']['dossier'])) { |
while (($f = readdir($dh)) !== false) { |
if((substr(strtolower($f),-3) == 'jpg') || (substr(strtolower($f),-3) == 'gif') || (substr(strtolower($f),-3) == 'png')) { |
$noimage++; |
$images[] = array('filename' => $f); |
array_multisort($images, SORT_ASC, SORT_REGULAR); |
} |
} |
closedir($dh); |
} |
} else { |
$GLOBALS['_GALLERIE_']['erreur'] = "Applette GALLERIE : le dossier d'images est introuvable à : ".$GLOBALS['_GALLERIE_']['dossier']; |
} |
|
if($noimage) { |
$GLOBALS['_GALLERIE_']['css']['chemin'] = GALL_CHEMIN_STYLES; |
$GLOBALS['_GALLERIE_']['css']['largeur'] = $options['largeur']+10; |
131,7 → 136,10 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.1 2006/12/07 15:39:47 jp_milcent |
* Ajout de l'applette Gallerie. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
?> |