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

Размер файла: 2.03Kb
<?


include_once "../SYSTEM/include/pclzip.lib.php";
include_once "../SYSTEM/include/mp3.php";
include_once "../SYSTEM/include/functions.php";
include_once "../SYSTEM/include/mysql.php";
include_once "../SYSTEM/include/param.php";
include_once "../SYSTEM/include/ban.php";
include_once "../SYSTEM/include/sess.php";
include_once "../SYSTEM/include/ban_2.php";
include_once "../SYSTEM/include/theme.php";
$title='Загрузки';
$mesto='В загрузках';
head();
$k_page=1;



if (isset($_GET['l']))
{
if (ereg("\.\.\/",$_GET['l']))
{
ban_ip($ip,3600,'Попытка взлома З-Ц');
header("Location: ".BASEDIR."banip.php?".SID."");
exit;
}

$lll=$_GET['l'];
$lll=ereg_replace("(/){1,}$","",$lll);
$lll=ereg_replace("(/){1,}","/",$lll);
$lll=ereg_replace("^(/){1,}","",$lll);

$l=$folder_level.$set['loaddir']."/$lll";
$prl="$lll/";
}
else
{
$l=$folder_level.$set['loaddir'];
$prl='';
}

if ($prl=='/')
$prl='';

if (is_dir("$l"))
{
include "inc/dir";
}
elseif (is_file("$l"))
{

$file=explode("/",$l);
$i=count($file);
$i=$i-1;
$filename=$file[$i];

$rashs=explode('.',"$filename");
$rashs_l=count($rashs);
$rashs_l=$rashs_l-1;
$rashs=$rashs[$rashs_l];

if (is_file("$l.name"))$filename=implode('',file("$l.name"));

if (is_dir("tipes/$rashs"))
{
include "tipes/$rashs/prew";
}
else
{
include "inc/prew";
}



}
else
{
echo "Ошибка!<br />Файл не найден";
}


$prl_2=ereg_replace("(/){1,}$","",$prl);
$prl_2=ereg_replace("^(/){1,}","",$prl_2);
if ($prl_2!='' && is_file($folder_level.$set['loaddir']."/".$prl_2))
{
$prl_3='';
$previs=explode('/', $prl_2);

if (eregi('/',$prl_2))
$prl_3=$previs[0];

for ($i=1;$i<count($previs)-1;$i++)
{

$prl_3.="/".$previs[$i];
}
echo "<a href=\"index.php?l=$prl_3\">&lt;&lt; В папку<br /></a>\n";
}


if (isset($user) && $user['level']>0)
{
echo "<a href=\"dir.php?l=$prl\">Управление</a><br />\n";
}


echo "<a href=\"../index.php\">&lt;&lt; На главную</a>\n";

foot();
?>