<?
		//$listuser -> checklogin($_Ge["member"]["uid"]);
		
		$iserror = 0;
		
		$bid = isset($bid)?intval($bid):0;
		$bookinfo = $db->query_object("select sortid,articlename,agentid from ".JIEQI_DB_PREFIX."_article_article where display=0 and articleid = ".$bid);
		
		if(!$bookinfo){
				$iserror = 1;
				$url = array();
				$tourl = URL_book_index($url);
				$pagecontent = "<b>提醒：</b><br/>";
				$pagecontent .= "该小说不存在或已经被删除！<br/>";
				$pagecontent .= ">>".backurl()."<br/>";	
		}else{
				$sortid = $bookinfo->sortid;
				if($sortid == 0){
						$sortname = "未分类";
				}else{
						$sortname = iconv("gbk","utf-8",$jieqiSort['article'][$sortid]["shortname"]);
				}
				$agentname = $listuser -> getuserdate("name",$bookinfo->agentid);
		}
		
		if($iserror == 0){
				$dirid = intval($bid/1000);
				$smartyObj -> assign('bookindex',$db->query_object("select * from ".JIEQI_DB_PREFIX."_article_article where display=0 and articleid = ".$bid));
				$smartyObj -> assign('totalbookreplies',$db->query_num("select * from ".JIEQI_DB_PREFIX."_article_replies where ownerid = ".$bid));
				$smartyObj -> assign('bookreplies',$db->query_array("select * from ".JIEQI_DB_PREFIX."_article_reviews where ownerid = ".$bid." order by posttime limit 0,3"));
		}
		
		if($iserror == 0){
				$smartydate = array("pagetitle" => $bookinfo->articlename,
													"sortname" => $sortname,
													"bookname" => $bookinfo->articlename,
													"cid" => $sortid,
													"bid" => $bid,
													"agentname" => $agentname,
														);
				$tplpath = "book/cover.tpl";
		}else{
				$smartydate = array("pagetitle" => "提醒",
													"pagecontent" => $pagecontent,
													"tourl" => $tourl,
													"redirecturl" => $tourl,
														);
				$tplpath = "public.tpl";
		}

?>