Inhaltsübersicht
\n"; echo "\n"; function get_extension($name) { $array = explode(".", $name); $retval = strtolower(array_pop($array)); return $retval; } function list_dir($chdir) { global $sitemap, $list, $root, $prefix, $showsize, $display, $excludedir, $excludefile; unset($sdirs); unset($sfiles); @unlink("map.txt"); $sitemap = fopen("map.txt","w+"); chdir($chdir); $self = basename($_SERVER['PHP_SELF']); $handle = opendir('.'); while ($file = readdir($handle)) { if(is_dir($file) && $file != "." && $file != ".." && !@in_array($file, $excludedir)) { $sdirs[] = $file; } elseif(is_file($file) && $file != "$self" && $file != "404.html" && $file != "suche.html" && $file != "suchefree.html" && $file != "wap.html" && $file != "gamedesc.html" && $file != "gamedescfree.html" && $file != "forum.html" && $file != "wap.wml" && $file != "wapbuddy_settings.php" && $file != "status.phtml" && @array_key_exists(get_extension($file), $display) && !@in_array($file, $excludefile)) { $sfiles[] = $file; } } $dir = getcwd(); $dir1 = str_replace($root, "", $dir."/"); $count = substr_count($dir1, "/") + substr_count($dir1, "\\"); if(is_array($sdirs)) { sort($sdirs); reset($sdirs); for($y=0; $y"; echo "\n"; } } $list = ""; list_dir($root); @unlink("map.txt"); $sitemap = fopen("map.txt","w+"); fwrite($sitemap, $list, strlen($list)); @fclose($sitemap); echo "
http://".$_SERVER['SERVER_NAME']; echo "$prefix/"; echo "
"; for($z=1; $z<=$count; $z++) { echo "   "; } if(is_array($sfiles)) { echo ""; } else { echo ""; } echo " $sdirs[$y]"; $list .= "http://".$_SERVER['SERVER_NAME']."$prefix/$dir1$sfiles[$y]\n"; list_dir($dir."/".$sdirs[$y]); } } chdir($chdir); if(is_array($sfiles)) { sort($sfiles); reset($sfiles); $sizeof = sizeof($sfiles); for($y=0; $y<$sizeof; $y++) { echo "
"; for($z=1; $z<=$count; $z++) { echo "   "; } if($y == ($sizeof -1)) { echo ""; } else { echo ""; } echo " "; echo "$sfiles[$y]"; $list .= "http://".$_SERVER['SERVER_NAME']."$prefix/$dir1$sfiles[$y]\n"; if($showsize) { $fsize = @filesize($sfiles[$y])/1024; printf(" (%.2f kB)", $fsize); } echo "
"; } echo "
"; for($z=1; $z<=$count; $z++) { echo "   "; } echo "
\n"; ?>