Файл: public_html/user/load.php
Строк: 40
<?
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
$ID = intval($_SESSION['id_user']);
if (isset($_GET['load']) && is_file(H.'sys/mail/files/'.intval($_GET['load']).'.dat'))
{
$file = mysql_fetch_assoc(mysql_query("SELECT * FROM `mail_files` WHERE `id` = '" . intval($_GET['load']) . "' limit 1"));
$post = mysql_fetch_assoc(mysql_query("SELECT * FROM `mail` WHERE `id` = '" . $file['id_post'] . "' limit 1"));
$ras = $file['ras'];
if ($post['id_kont'] == $ID || $post['id_user'] == $ID)
{
include_once '../sys/inc/downloadfile.php';
DownloadFile(H.'sys/mail/files/' . $file['id'] . '.dat', retranslit($file['name']).'.' . $file['ras'], ras_to_mime($ras));
exit;
}
}
?>