File size: 1.86Kb
<?php
function dir_kol($kat_kol)
{
$dir_kol = opendir("$kat_kol");
while($files_kol = readdir($dir_kol))
{
if(is_file($kat_kol."/".$files_kol) && $files_kol != "otk.txt" && $files_kol != "index.php" && $files_kol != "dir.png" && $files_kol != "kol.php" && $files_kol != "tr_win.php" && $files_kol != "adminkom.php")
{
$kol++;
}
elseif(is_dir($kat_kol."/".$files_kol) && $files_kol != "." && $files_kol != ".." && $files_kol != "op")
{
$es = dir_kol($kat_kol."/".$files_kol);
$kol = $kol + $es;
}
}
closedir($dir_kol);
if(empty($kol))
{
$kol = 0;
}
else
{
$kol = $kol;
}
return"$kol";
}
function dir_kol_new($kat_kol_new)
{
$dir_kol_new = opendir("$kat_kol_new");
while($files_kol_new = readdir($dir_kol_new))
{
if(is_file($kat_kol_new."/".$files_kol_new) && $files_kol_new != "otk.txt" && $files_kol_new != "index.php" && $files_kol_new != "dir.png" && $files_kol_new != "kol.php" && $files_kol_new != "tr_win.php" && $files_kol_new != "adminkom.php")
{
$datanew = date ("YmdHis", filemtime("$kat_kol_new/$files_kol_new")) + 5000000;
$datenow = date ("YmdHis");
if($datanew > $datenow)
{
$kol_new++;
}
}
elseif(is_dir($kat_kol_new."/".$files_kol_new) && $files_kol_new != "." && $files_kol_new != ".." && $files_kol_new != "op")
{
$es_new = dir_kol_new($kat_kol_new."/".$files_kol_new);
$kol_new = $kol_new + $es_new;
}
}
closedir($dir_kol_new);
if(empty($kol_new))
{
$kol_new = 0;
}
else
{
$kol_new = $kol_new;
}
return"$kol_new";
}
echo "(";
echo dir_kol("modules/otk/");
if(($kolvo = dir_kol_new("modules/otk/")) > 0)
{
echo "/<font color=\"red\">+$kolvo</font>";
}
echo ")";
?>