Файл: www/pic/down.php
Строк: 14
<?php
include '../config.php';
$id=intval($_GET['id']);
$cinfo=mysql_fetch_array(mysql_query("SELECT * FROM `pic_files` WHERE `id`='$id'"));
if(isset($_POST['link'])){
echo 'Нажмите на ссылку <a href="/loads/'.$cinfo['file'].'">Скачать</a>';
mysql_query("UPDATE `pic_files` SET `time_s`='$time', `down`=`down`+1 WHERE `id`='$id'");
}else{
header('Location: loads/'.$cinfo['file']);
mysql_query("UPDATE `pic_files` SET `time_s`='$time', `down`=`down`+1 WHERE `id`='$id'");}
include '../foot.php';
?>