Просмотр файла index.php

Размер файла: 1.44Kb
<?php include("xml.php");
$d=str_replace("..","",$d); if($d=="")$d=".";
function allfiles($path){
return count(glob($path."/*")); }
function trans($t){
$a=array("a","b","v","g","d","e","zh","z","i","j","k","l","m","n","o","p","r","s","t","u","f","h","ch","c","w","ye","yu","ya","y","_");

$b=array("а","б","в","г","д","е","ж","з","и","й","к","л","м","н","о","п","р","с","т","у","ф","х","ч","ц","ш","э","ю","я","ы"," "); return str_replace($a,$b,$t);}
$ex=explode("/",$d);
$ph.=".";foreach($ex as $v){ if($v!="" and $v!="."){$ph.="/$v"; $put.="<a href='index.php?d=$ph'>".trans($v)."</a>&gt;";}}

$path="files/";
$o=opendir($path."".$d) or die("Запрещено! ".$path.$d.$px);
while($f=readdir($o)){
if($f!="." and $f!=".."){
if(is_dir($path.$d."/".$f))$link[]=$folder."<a href='index.php?d=$d/$f'>".trans($f)."</a>(".allfiles($path.$d."/".$f).")<br/>";
else {if(strpos($f,"jpg") or strpos($f,"gif"))$sk="<img src='im.php?pic=".$path."".$d."/".$f."' alt='..'/>";$link[]=$sk."<a href='f.php?f=$d/$f'>".trans(substr($f,0,-4))."</a>[".round(filesize($path.$d."/".$f)/1024)."kb]<br/>";$sk="";}}}
echo $put."<br/>::::::<br/>Обьектов: ".count($link)."<br/>:::::::<br/>";if($n=="")$n=0;
for($i=1; $i<=10; $i++){
if(isset($link[$n]))echo $link[$n]; $n++;}$off=$n-20; echo"[<a href='index.php?d=$d&amp;n=$off'>Назад</a>][<a href='index.php?d=$d&amp;n=$n'>Далее</a>]<br/>"; include("online.php"); echo $px; ?>