 | | Offres d'emplois |  | DEVELOPPEUR PHP MySQL (H/F) Green Cove Ingénierie est l'opérateur de covoiturage leader sur le marché français. Il assure l'exploitation au quotidien de nombreux portails de c... | |
 | | Avez vous lu ? |  | | |
|
 Barre de navigation | |  |

<?
if($action == '2') {
$tab_contenu = array();
$excludes = array('test.php','test2.php','gestion','includes');
if ($pointeur = opendir('.')) {
while (false !== ($file = readdir($pointeur))) {
if ($file != "." && $file != "..") {
$tab_contenu[] .= "$file";
}
}
closedir($pointeur);
}
echo "<br>";
echo '<table border="0" align="center"
cellspacing="5" cellpadding="0">';
echo '<tr>';
$result = array_diff($tab_contenu, $excludes);
asort($result);
while (list($key, $val) = each($result)) {
$ext = strlen(strrchr($val, "."));
if(intval($ext) > 0) {
$fin = strlen($val) - strlen(strrchr($val, "."));
$nom = substr($val, 0, $fin);
echo '<td align="center">';
if ($val != basename($_SERVER['PHP_SELF'])) {
echo '<a href="' . $val . '?action=2">'
. $nom . '</a></td>';
}
else {
echo $nom . '</td>';
}
}
else {
echo '<td align="center">';
echo '<a href="' . $val . '">' . $val . '</a></td>';
}
}
echo '</tr></table>';
}
?>
|
|
|
 |
|