include("inc/default.inc.php"); $sel=3; $cid = $_GET["cid"]; $keyword = trim($_POST["keyword"]); if(!empty($keyword)){ $strWhere= "and subject like '%$keyword%'"; }else{ if(empty($cid)){ $strWhere = "and cid in (".getnewscids(15).") "; $query="select * from ".$tablepre."news_category where cid=15 and state=1"; $result = $db->query($query); $res1 = $db->fetch_array($result); $title = "news"; $rtntitle=$res1["cname"]; $banner = empty($res1["banner"])?"about_banner.jpg":$res1["banner"]; rtntitle($res1["title"]); rtndescription($res1["description"]); rtnkeywords($res1["keywords"]); }else{ $strWhere = "and cid in (".getnewscids($cid).")"; $query="select * from ".$tablepre."news_category where cid='$cid' and state=1"; $result = $db->query($query); $res1 = $db->fetch_array($result); $title = $res1["cname"]; $rtntitle=$res1["cname"]; $banner = empty($res1["banner"])?"about_banner.jpg":$res1["banner"]; rtntitle($res1["title"]); rtndescription($res1["description"]); rtnkeywords($res1["keywords"]); } } ?>