File size: 722B
<?
include"../tools.php";
include"../head.php";
include"functions.php";
$k_page=1;
if (isset($_GET['l']) && !ereg("\.\.\/", $_GET['l']))
{
$l="../loads/".$_GET['l']."";
$prl=$_GET['l']."/";
}
else
{
$l='../loads/';
$prl='';
}
$l=str_replace("//", "/", $l);
if (is_dir("$l"))
{
include "inc/dir.php";
}
elseif (is_file("$l"))
{
header ("Location: ../loads/$_GET[l]");
$file=mysql_escape_string($_GET['l']);
mysql_query("INSERT INTO `downloads` (file) values('$file')");
exit;
}
else
{
echo "Ошибка!<br />Файл не найден<br />\n";
}
echo "<div class='header'><a href=\"../index.php\"><< На главную</a></div>\n";
require ("../foot.php");
?>