Размер файла: 1.04Kb
<?php
/*
=============================================
Движок: SHCMS Engine
=============================================
Название файла: Обменник - Скачивание файла
=============================================
Official website: http://shcms.ru
=============================================
*/
define('SHCMS', true);
include_once'../system/inc/basic_settings.php';
if($_GET['id']){$id = $_GET['id'];}
$sfile = mysql_fetch_array(mysql_query("SELECT * FROM download_file WHERE id=$id"));
if(!$id)
{
header("Location: files.php?id=$sfile[id]");
}
else
{
mysql_query("UPDATE `download_file` SET cou='".($sfile['cou']+1)."' WHERE `id`='$id' LIMIT 1");
header('Content-Disposition: attachment; filename="files_obmen/'.$sfile['name'].'"');
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Description: File Transfer");
echo file_get_contents($path_name);
exit();
}
?>