header('Content-Type: text/html; charset=gb2312');
require "../inc/global.php";
require "../inc/function.php";
if ($_REQUEST["pageID"]=="") { $pageID=30;} else{ $pageID=$_REQUEST["pageID"]; }
$db=new db();
$sql="select id,title from cy_info where disp = 0 and kind=30 order by id";
$query = $db->query($sql);
$i=0;
while($forum = $db->fetch_array($query)) {
$info[$i]['id'] = $forum['id'];
$info[$i]['title'] = $forum['title'];//echo $forum['title']."
";
$i++;
}
$id = empty($_REQUEST['id'])? $info[0]['id'] : $_REQUEST['id'];
$sql="select title,text from cy_info where id=".$id;
$query = $db->query($sql);
$forum = $db->fetch_array($query);
$viewdata = array("pageID" => $pageID ,
"siteinfo" => $siteinfo,
"sitename" => $sitename,
"info" => $info,
"title" => $forum[title],
"body" => html_entity_decode($forum[text],ENT_QUOTES)
);
$tplname= CModel($_SERVER["SCRIPT_NAME"]);
callview($viewdata,$tplname);
?>