File size: 660B
<?php
/**********************************
* @package: PerfCMS *
* @year: 2012 *
* @author: Artas *
* @link: http://perfcms.pp.ua *
**********************************/
if(isset($_GET['file_id']) && $db->query("SELECT * FROM `share_files` WHERE `id` = '". abs(intval($_GET['file_id'])) ."'")->rowCount() == 1) {
$file = $db->query("SELECT * FROM `share_files` WHERE `id` = '". abs(intval($_GET['file_id'])) ."'")->fetch();
$db->query("UPDATE `share_files` SET `dload_times` = '". ($file['dload_times']+1) ."' WHERE `id` = '". abs(intval($_GET['file_id'])) ."'");
go('/files/share/'.$file['path_name']);
} else { go('/share/'); }
?>