"; print "\n"; $d=opendir("$path"); // Открываем папку $n = "0"; while(($k=readdir($d))!==false){ if ($k=='.'||$k=='..') continue; $n++; } closedir($d); $num=($n/$col);if ($num!==(int)$num){$foo = (int) $num;$fo = ($foo + 1);}else{$fo=$num;} for ($i="1"; $i<=$fo; $i++) {/*echo "$i|";*/}if ($list == "") {$c="0";}else{$c=($col*($list-1));} $d=opendir("$path"); $la = "-1"; print "

"; while(($e=readdir($d))!==false){ if ($e=='.'||$e=='..') continue; $la = $la + 1; if($la>$c-1 and $la<$c+$col){ $e1 = str_replace("$ras","",$e); if ($mode == "1"){$ee = strtr($e1,$tran);}else{$ee = $e1;} $laa = $la + 1; // Номер файла print "\"\"/$ee
";// height=\"30\" width=\"30\" 30-это размер картинок в предпросмотре }} for ($i="1"; $i<=$fo; $i++) {/*echo "[$i]";*/}if ($list == "") {$c="0";}else{$c=($col*($list-1));} $lis = $list + 1; $lis1 = $list - 1; print "
"; if ($lis1 < "1"){print "<<пред. ";}else{print " <<пред. ";} if ($lis == "$i"){print "| след.>>
";}else{ print "| след.>>
";} print "Перейти к:

странице
пошел
"; $allpage = $i - 1; print "
Файлов: $n
Страниц: $allpage

"; print "назад
Главная
"; print "

"; closedir($d); ?>