header('Content-Type: text/html; charset=gb2312');
require "../inc/global.php";
require "../inc/function.php";
$maker=empty($_REQUEST["maker"])? "%" : $_REQUEST["maker"];
$page=empty($_REQUEST["page"])? 0 : $_REQUEST["page"];
$pageID = empty($_REQUEST["pageID"])? 20 : $_REQUEST["pageID"];
$where="disp =0 and maker like '". $maker ."'";
$start= $page * 18;
//echo $pagestr."
start=".$start." end=".$end."
";
$db=new db();
$sql="select id ,title,date from cy_info where kind = 3 and ".$where." order by id desc LIMIT ".$start." , 18";
$query = $db->query($sql);
$i=0;
while($forum = $db->fetch_array($query)) {
$news[$i]['id'] = $forum['id'];
$news[$i]['title'] = $forum['title'];
$news[$i]['date'] = date("Y-m-d",strtotime($forum['date']));
$i++;
}
$sql="select ID,Title from prog_catalog where FormainId=7 and disp = 0 order by disp_id ";
$query = $db->query($sql);
$i=0;
while($forum = $db->fetch_array($query)) {
$catalog[$i]['ID'] = $forum['ID'];
$catalog[$i]['Title'] = $forum['Title'];
$i++;
}
$pages = $db->row_count("cy_qplist",$where);
$qe="&maker=".$maker;
$pagestr = view_pages($pages,$page,$qe,"u_white");
//echo $pagestr;
$viewdata = array("pageID" => $pageID ,
"siteinfo" => $siteinfo,
"sitename" => $sitename,
"news" => $news,
"pagestr" => $pagestr,
"page" => $page,
"catalog" => $catalog,
"menu" => showmenu($pageID)
);
$tplname= CModel($_SERVER["SCRIPT_NAME"]);
callview($viewdata,$tplname);
?>