$showsize = 1;
$display['php'] = "pics/php.gif";
$display['html'] = "pics/html.gif";
$display['htm'] = "pics/html.gif";
$display['shtml'] = "pics/html.gif";
$excludedir[] = "temp";
$excludedir[] = "tmp";
$excludedir[] = "cgi-bin";
$excludedir[] = "dev";
$excludedir[] = "pics";
$excludedir[] = "stat";
$excludedir[] = "include";
$excludedir[] = "sitemap";
$excludefile[] = "index.html";
$excludefile[] = "template.html";
$excludefile[] = "auhQ1Zt3va8f4gioNu.php";
$excludefile[] = "hQ1Zt3va8f4gioNu.txt";
$excludefile[] = "lvhQ1Zt3va8f4gioNu.php";
$excludefile[] = "rl56c9006458ee59b2client.php";
$excludefile[] = "rl56c9006458ee59b2data.txt";
$excludefile[] = "rl56c9006458ee59b2update.php";
$excludefile[] = "580d6347e3e2d7294abea556a11069c5.php";
$excludefile[] = "580d6347e3e2d7294abea556a11069c5.txt";
$excludefile[] = "580d6347e3e2d7294abea556a11069c5.xml";
$stime = gettimeofday();
$root = getcwd();
$pre = explode("/", $_SERVER['REQUEST_URI']);
array_pop($pre);
$prefix = join("/", $pre);
$root .= "/";
echo "\n";
echo " http://".$_SERVER['SERVER_NAME'];
echo "$prefix/";
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";
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 "| ";
}
echo " | ";
for($z=1; $z<=$count; $z++)
{ echo " "; }
echo " | \n";
}
}
$list = "";
list_dir($root);
@unlink("map.txt");
$sitemap = fopen("map.txt","w+");
fwrite($sitemap, $list, strlen($list));
@fclose($sitemap);
echo " \n";
?>
|