Plan du site

Entre parenthèses, l'âge de la dernière modification

"; echo listDir("./", ""); function listDir($path, $dirName) { // Liste des fichiers et dossiers a afficher if ($dh = opendir($path)) { $selFiles = array(); $selDirs = array(); $selIndex = array(); while (($file = readdir($dh)) !== false) { if ($file == "." || $file == "..") continue; if ($file == "header.html" || $file == "footer.html" || $file == "comments.html") continue; if ($file == ".xvpics" || $file == "doxygen") continue; if ($file == "pages" || $file == "blank.html") continue; if ($path == "./recettes/html/") { if ($file != "index.html") continue; } if ($file == "index.html") { array_push($selIndex, $file); continue; } if (ereg("\.html", $file) && !ereg("\.html~", $file)) { array_push($selFiles, $file); } if (is_dir($path.$file)) { array_push($selDirs, $file); } } } closedir($dh); natsort($selFiles); natsort($selDirs); $selFiles = array_merge($selIndex, $selFiles); // affichage $divContent = ""; $nextContent = ""; if (count($selFiles) + count($selDirs) > 0) { // if ($dirName != "") echo "
  • $dirName\n"; foreach ($selFiles as $file) { //$mDate = myDateFormat(filemtime($path.$file)); $sAgo = myDateAgo(filemtime($path.$file)); $title = getTitle($path.$file); $divStyle = ($file == "index.html") ? "listHead" : "listItem"; $validateUrl = ereg_replace("\.\/", "http://www.tf79.ch/", $path.$file); $validate = " (valider)"; $divContent .= "
    $title ($sAgo)$validate
    \n"; } foreach ($selDirs as $dir) { $nextContent .= listDir($path.$dir."/", $dir); } $divStyle = ($nextContent == "") ? "listFinalBox" : "listBox"; $divHead = "
    \n"; $divContent = $divHead.$divContent.$nextContent."
    \n"; } return $divContent; } ?>