View file cat/index5.php

File size: 855B
<? include "../head.php"; ?>
<div class="title">Меню блога:</div>
<div class="main">
<?
Error_Reporting(E_ALL & ~E_NOTICE);
function read_rec($dr)
{
$dir .= cat5;
$indent = sizeof(explode("/", $dir));
$hndl = opendir($dir) or die("Cant open directory");

while(false !== ($str = readdir($hndl)))
{
if(($str != ".") && ($str != ".."))
{
$str = $dir."/".$str;
if(is_dir($str))
{
$i = 0;
while($i++ < $indent*5)
{
print "&nbsp";
}
print "<b><font color=\"red\">".basename($str)."</font></b><br>";
read_rec($str);
}
else
{
$x = 0;
while($x++ < $indent*5)
{
print "&nbsp";
}
print "<a href = \"$str\">".basename($str)."</a><br>";
}
}
}
closedir($hndl);
}
read_rec('.');


?>
<br><br>
<a href="../cat.php">Категории</a><br>
<a href="../">На главную</a>

<? include "../foot.php"; ?>