1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
| <p>Veuillez sélectionner le répertoire de photos à visualiser :</p>
<form method="post" action="index.php?page=photos">
Répertoire : <SELECT name="repertoire">
<?php
listrep();
?>
<br />
<input type="submit" name="ok" value="Valider !"/><br />
</form>
<p>Page actuellement en cours de modification !</p>
<?php
echo "Le post vaut : ".$_POST['repertoire'] . "<BR>";
if(isset($_POST['repertoire']))
{
$repchoisi = htmlentities($_POST['repertoire'], ENT_QUOTES);
echo '<table><tr><td id="icone"></td><td>Fichier</td><td>Poids</td></tr>';
define('BASE', '/mesphotos/'. $repertoire);
echo 'Le chemin vaut ' . BASE;
$chemin = opendir(BASE);
$listfichier = array();
while(($encours = readdir($chemin)) !== FALSE)
{
if(is_file(BASE . DIRECTORY_SEPARATOR . $encours))
{$listfichier[] = "<tr><td id=\"icon\"></td><td><a id=\"puce\" href=\"mesphotos/laurence/$encours\">$encours</a></td></tr>";}
}
//****************************************************************************
// $listfichier_minuscule = array_map('strtolower', $listfichier);
// array_multisort($listfichier_minuscule, SORT_ASC, SORT_STRING, $listfichier);
//****************************************************************************
closedir($chemin);
$temp_ranger = array_map('strtolower', $listfichier);
array_multisort($temp_ranger, SORT_ASC, SORT_STRING, $listfichier);
foreach($temp_ranger as $tempfinal)
{
echo $tempfinal;
}
}
else
{echo "Choisissez un repertoire";}
?>
</table> |
Partager