function get_child_termids($term_id){
$term_id=intval($term_id);
$term_obj = M("Terms");
$terms=$term_obj->where("status=1 and parent=$term_id")->order("listorder asc")->select();
if(!empty($terms)){
foreach ($terms as $v) {
$arr[] = $v['term_id'];
}
return $arr;
}
return $term_id;
}
$terms = get_child_termids($cat_id);
if(is_array($terms) ){
$terms = implode(',', $terms);
}
$lists = sp_sql_posts_paged("cid:".$terms.";order:post_date DESC;",15);
$smeta=json_decode($vo['smeta'], true);
$vo['object_id'],'cid'=>$vo['term_id']))}">
{:date("Y-m-d",strtotime($vo['post_date']) )}
{$vo.post_title}
修改时间 2017-08-18
真诚赞赏,手留余香
赞赏