<?
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";
/*if (!isset($user))
{
header("Location: ../vhod.php?err=not_logged");
exit;
}
*/
if (!isset($_GET['file']))
{
header ("Location: index.php?".SID."");
}


$file=mysql_escape_string($_GET['file']);

if (is_file("$folder_level$set[loaddir]$file"))
{
$file2=explode("/",$file);
$filename=$file2[count($file2)-1];

$filesize=filesize("$folder_level$set[loaddir]$file");
mysql_query("INSERT INTO `$mysql[pref]down` (file, size) values('$filename', '$filesize');");


header ("Location: $folder_level$set[loaddir]$_GET[file]");
}
?>
