Размер файла: 563B
<?php
include'../system/config.php';
$id_load=$_GET['id_load'];
if($id_load==""){ echo'ERROR'; exit;}
$er_id_load=mysql_num_rows(mysql_query("SELECT * FROM `down_files` WHERE `id_file`='$id_load'"));
if($er_id_load==0){ echo'ERROR'; exit;}
$cog=mysql_fetch_array(mysql_query("SELECT * FROM `down_files` WHERE `id_file`='$id_load'"));
$savv=$cog['loads']+1;
mysql_query("UPDATE `down_files` SET `loads`='$savv' WHERE `id_file`='$id_load'");
header('Location: '.$dirsite.'/down'.$cog['put'].'/'.$cog['nastna'].'.'.$cog['format']);
include'../system/foot.php';
?>