0 ? intval($catid) : 0;$page = isset($page) ? intval($page) : 1;$pagesize = $MOD['pagesize'] ? $MOD['pagesize'] : 10;$cols = 5;$order = isset($order) ? intval($order) : 0;$fields = isset($fields) ? intval($fields) : 0;$kw = isset($kw) ? trim($kw) : '';$CAT = get_cat($catid);$SORDER = array( array($MOD['order'],"结果排序方式"), array("","按相似度排序"), array("addtime DESC","按添加时间排?), array("clicked DESC","按浏览人气排?));$SFIELDS = array( array("CONCAT(title,introduce,author,keyword)","模糊"), array("title","标题"), array("introduce","简?), array("author","作?));$sfields_select = ewselect($SFIELDS,'fields','',$fields);$sorder_select = ewselect($SORDER,'order','',$order);require EW_ROOT."/class/article.class.php";$do = new article();$CONDITION = array();$CONDITION[] = "status=3";if($kw) $CONDITION[] = "{$SFIELDS[$fields][0]} LIKE '%{$kw}%'";if($catid) { $catids = $CAT['arrchildid'].','.$catid; $CONDITION[] = "catid IN ($catids)";}$ORDERBY = $SORDER[$order][0] ? $SORDER[$order][0] : 'itemid DESC';$list = $do->get_list($CONDITION,$ORDERBY,600);if($kw) { $replacef = explode(' ', $kw); $replacet = array_map('highlight', $replacef); foreach($list as $k=>$v){ $list[$k]['title'] = str_replace($replacef,$replacet,$v['title']); } if($total>1) keyword($kw,$total,$module);}$seo_file = 'search';include EW_ROOT."/include/seo.inc.php";include template('search',$MOD['moduledir']);require EW_ROOT."/common.end.php";?>