<?php
ob_start();
header("Content-type: text/html;Charset=gbk");//输出编码,避免中文乱码
$root_path='.';
include_once($root_path.'/php/connect_sub.php');
include_once($root_path.'/php/sub.php');


$result=$db->query("SELECT * from {$db_sux}papers where qid=$inid");
$total=$db->num_rows($result);
if($total!=1){web_echo("该报纸不存在！可能已经删除。","",'',"$root_path",'info1');exit(0);}
$gb = $db->fetch_array($result);

$db->query("update {$db_sux}papers set down_num=down_num+1 where qid='$inid' ");  

$file_dir = $root_path."/upload/paper_file/";
Header("Location:$file_dir$gb[ban_pdf]");


ob_end_flush();
?>