Размер файла: 4.01Kb
<?php
Error_Reporting(E_ALL & ~E_NOTICE);
///////ВЫ НЕ ИМЕЕТЕ ПРАВО ВНОСИТЬ ИЗМЕНЕНИЯ В КОД СКРИПТА БЕЗ СОГЛАСОВАНИЯ С АВТОРОМ///////
header("Pragma: no-cache");
header("Cache-Control: no-cache, no-store");
header("Content-Type: text/html; charset=utf-8");
if(empty($size)){$size = 0;}
$size = htmlspecialchars(stripslashes($size));
if(($size != 0) or ($size != 1) or ($size != 2)){$size = 0;}
if($size == 1){$size1 = "<small>";
$size2 = "</small>";}
if($size == 2){$size1 = "<big>";
$size2 = "</big>";}
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
<html><head><title>total_manager_v2.0</title><meta http-equiv=\"Copyright\" content=\"Explode([email protected],WAPSOFT.WAPF.RU)\"/></head><body bgcolor=\"#000000\" link=\"#FF0000\" text=\"#FFFF00\">";
echo $size1;
$glsite = $_SERVER["HTTP_HOST"];
$korn = $_SERVER["DOCUMENT_ROOT"];
$loc = $_SERVER["PHP_SELF"];
if(empty($azfile)){$azfile = 15;}
$azfile = htmlspecialchars(stripslashes($azfile));
$azfile = eregi_replace("[^0-9]","",$azfile);
if(!isset($adir)){$adir = "$korn";}
$adir = htmlspecialchars(stripslashes($adir));
$adir = str_replace("//","/",$adir);
$isdir = is_dir($adir);
$stdirx = explode("/",$adir);
unset($stdirx[count($stdirx) - 1]);
$stdir = join("/",$stdirx);
if($adir != "$korn"){echo "<a href=\"$loc?adir=$stdir&size=$size&azfile=$azfile\">[<<]</a><br/>";}
if($isdir == false){echo "Такого каталога не существует!<br/>";}
$dir = @opendir("$adir");
while($file = @readdir($dir)){
if(($file != "..") && ($file != ".")){$file_array[] = $file;}}
@closedir($dir);
$file_count = count ($file_array);
sort($file_array);
$vpage = round($file_count/$azfile);
if($file_count <= $azfile){$vpage = 1;}
if(($file_count > $azfile) && ($vpage == 1)){$vpage = 2;}
if(!isset($page)){$page = 1;}
$page = htmlspecialchars(stripslashes($page));
$page = eregi_replace("[^0-9]","",$page);
if($page > $vpage){$page = $vpage;}
if($page < 1){$page = 1;}
$pagen = $page - 1;
$first_record = $pagen * $azfile;
$last_record = $first_record + $azfile;
while(list($fileIndexValue,$file_name) = each($file_array)){
if(($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record)){
$file_type = filetype("$adir/$file_name");
$file_size = filesize("$adir/$file_name");
$adir_file = $adir;
$adir_file = str_replace("$korn/","",$adir_file);
if($file_type == file){if($adir == $korn){echo "<font color=\"#008000\">[f]</font><a href=\"http://$glsite/$file_name\">$file_name</a>";}
else{echo "<font color=\"#008000\">[f]</font><a href=\"http://$glsite/$adir_file/$file_name\">$file_name</a>";}
echo " [".round($file_size/1024,2)."kb]<br/>";}
if($file_type == dir){echo "<font color=\"#FFFFFF\">[d]</font><a href=\"$loc?adir=$adir/$file_name&size=$size&azfile=$azfile\">$file_name</a><br/>";}}}
echo "<hr>Файлов и папок в директории: $file_count";
if($file_count > $azfile){echo "<hr>";}
if(($file_count > 0) AND ($page != 1)){
$prev_page = $page - 1;
echo "<a href=\"$loc?adir=$adir&size=$size&azfile=$azfile&page=$prev_page\">[Пред. $azfile]</a>";}
if(($file_count > 0) AND ($last_record < $file_count)){
$next_page = $page + 1;
$exstr = $azfile * $page;
if($page == $vpage-1){$pagev = $file_count - $exstr;}else{$pagev = $azfile;}
echo "<a href=\"$loc?adir=$adir&size=$size&azfile=$azfile&page=$next_page\">[След. $pagev]</a>";}
echo "<hr>Страница $page из $vpage<hr>Текущая директория:<br/>$adir<hr>";
if($adir != $korn){echo "<a href=\"$loc?size=$size&azfile=$azfile\">[В корневой каталог]</a><br/>";}
/////Просьба не убирать ниже идущие копирайты и ссылки
echo "<center><a href=\"http://$glsite\">[На главную]</a></center><hr><center>Made by Explode<br/>All rights reserved.<br/>©<a href=\"http://wapsoft.wapf.ru\">wapsoft.wapf.ru</a></center>";
echo $size2;
echo "</body></html>";
?>