您所在的位置: » 正文 »

假如让动漫人物去参加鱿鱼游戏,那么这个游戏会变成什么样

分享:
时间:2018-02-10 编辑: 阅读18075 评论:0

  Webmeng文章分类排序问题(最新发布在前面)
 public function _category($catid)
{

$catid = str_replace("category_","",$catid);
$catid=(int) $catid;

$search='';
if(!empty($catid)){
$sortpath=$this->db->fetch_one("select sort_path from ".WEBMENG_CONMENG."category_record where cat_id='".$catid."'  ");
$search.=" and catid in(select cat_id from ".WEBMENG_CONMENG."category_record where sort_path like '".$sortpath."%') ";
}

$sql = "select *,thumb as img,inputtime as addtime from ".WEBMENG_CONMENG."record where catid='".$catid."' order by inputtime desc ";


$all_record = page_for_db_extend($sql);  //查询带分页的
$data = array(
'info_reslut' => $all_record['data'],
'showpage'    => $all_record['page'],
'category'   => $this->_category_record()
);

$settings = array();
$sets = $this->db->fetch("select * from ".WEBMENG_CONMENG."settings  ");
if(!empty($sets)){
foreach ($sets as $v) {
$webmeng[$v['variable']] = $v;
}
}
$data['webmeng'] = $webmeng;    /*获取内页调用系统信息如LOGO 网站名称*/




$this->display('record/category.html',$data);
}



public function _category_record()
{




$record_list  = $this->db->fetch("select cat_name as sortname,cat_id as id,parent_id from ".WEBMENG_CONMENG."category_record  ");
$category = array();
$parent = array();
if(!empty($record_list)){
foreach ($record_list as  $v) {
if($v['parent_id']==0){
$category[] = $v;
}
$parent[$v['parent_id']][]=$v;
}
foreach ($category as $k => $v) {
$category[$k]['child'] = isset($parent[$v['id']])?$parent[$v['id']]:array();
if(!empty($category[$k]['child'])){
foreach ($category[$k]['child'] as $key => $value) {
$category[$k]['child'][$key]['child'] = isset($parent[$value['id']])?$parent[$value['id']]:array();
}
}
}
}
return $category;
}

 

【编辑推荐】

【责任编辑:自由战士 TEL:(021)63779188】
 
您看完此文章的心情是
    没有开启心情模块
一周最热
评论排行
如果您没有统计代码,推荐使用搜寻分析工具!