<?php
$obj_tab_article=new cls_tab_article();
(!isset($get_id))?$get_id=0:$get_id=intval($get_id);
$obj_result = $obj_db->query("SELECT * FROM ".DB_PRE."article where article_id='".$get_id."'");
$this_article=array();
$this_channel=array();
$arr_app=array();
$this_html=array();
if($obj_rs = $obj_db->fetch_array($obj_result))
{
	$arr_uid=array();
	$obj_result2 = $obj_db->query("SELECT * FROM ".DB_PRE."article_channel where channel_id='".$obj_rs["article_channel_id"]."'");
	if($obj_rs2 = $obj_db->fetch_array($obj_result2)){
		$this_channel=$obj_rs2;
		$arr_app=$obj_tab_article->get_app($this_channel["channel_article_tpl"],$this_channel["channel_htmldir"]);
		//检测是否生成静态文件，是则改变文件名;
		if($this_channel["channel_savehtml"]==1){
			$this_html["path"]=$arr_app["htmldir"]."/".$obj_rs["article_id"].".html";
			$this_html["url"]=WEB_URL.$arr_app["htmldir"]."/".$obj_rs["article_id"].".html";
		}
	}
	$obj_rs["article_addtime"]=format_date($obj_rs["article_addtime"],"Y-m-d");
	if($obj_rs["article_source"]=="") $obj_rs["article_source"]="互联网";
	$this_article=$obj_rs;
	//相关
	$obj_result2 = $obj_db->query("SELECT article_id,article_title FROM ".DB_PRE."article where article_folder_id='".$this_article["article_folder_id"]."' order by article_id desc limit 0,10");
	while($obj_rs2 = $obj_db->fetch_array($obj_result2)){
		if($this_channel["channel_savehtml"]==1){
			$str_url=WEB_URL.$arr_app["htmldir"]."/".$obj_rs2["article_id"].".html";
		}else{
			$str_url=WEB_URL."/index.php?app=".$arr_app["app"]."&apppath=".$arr_app["path"]."&id=".$obj_rs2["article_id"];
		}
		$obj_rs2["url"]=$str_url;
		$arr_about[]=$obj_rs2;
	}
}else{
	exit("您要找的文章不存在！");
}
?>