Файл: public_html/file/dl.php
Строк: 43
<?
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';
include_once '../sys/inc/user.php';
$id=intval($_GET['id']);
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `user_files` WHERE `id` = '$id'"),0)==0){header("Location: /index.php?");exit;}
$file_id=mysql_fetch_array(mysql_query("SELECT * FROM `user_files` WHERE `id` = '$id'"));
$name=$file_id['name'];
$ras=$file_id['ras'];
@mysql_query("UPDATE `user_files` SET `k_loads` = '".($file_id['k_loads']+1)."' WHERE `id` = '$file_id[id]' LIMIT 1");
include_once '../sys/inc/downloadfile.php';
DownloadFile(H.'files/user_files/'.$file_id['id'].'.dat', $name.'.'.$ras, ras_to_mime($ras));
?>