$content = json_decode($zcmod['content'],true);
$catid = $content['zcmsg']['attr']['argu']['catid'];
$limit = $content['zcmsg']['attr']['argu']['limit'];
if(!$catid){
$modelid = $content['zcmsg']['modelid'];
$category = M("Category")->where("modelid = '".$modelid."' and parentid=0")->select();
$catid = "";
foreach($category as $cate){
$catid .= ",".$cate['catid'];
}
}
$catid = ltrim($catid, ",");
$siteOption = sp_get_site_options();
$temp =array();
foreach($data as $data_new){
$temp[] = $data_new;
}
$data= $temp;
$new1 = $data[0];
$faq = M('Category')->where(" modelid= 31 ")->select();
$catid = "";
foreach($faq as $fa){
$catid .= ",".$fa['catid'];
}
$catid = ltrim($catid, ",");
$data = M("faq")->alias("f")->join(C("DB_PREFIX")."faq_data as fd on f.id=fd.id")->field("f.*, fd.* ")->where("f.catid in (".$catid.")")->limit(4)->select();