<?php
/*
* All copyright reserved (c) 2004-2010 by Gohappy
* Designer:Gohappy
*/
$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);

//几版
$ban_num=$db->num_rows($db->query("SELECT * from {$db_sux}papers_ban where qid='$inid'"));
if($ban==''){$ban=1;}
if($ban < 1 ){$ban=1;}
if($ban>$ban_num){$ban=1;}


$db->query("update {$db_sux}papers set click_num=click_num+1 where qid='$inid' "); //点击书

$my_domain=dirname("http://".$_SERVER ['HTTP_HOST'].$_SERVER['PHP_SELF']).'/';

include(parse_template('info'.'_g',$root_path.'/tpl/bao/',$root_path.'/'));
?>