【分页数量】Webmeng 分类 现实数量定义
分类 现实数量定义
public function category($catid)
{
$catid = str_replace("template/category/","",$catid);
$catid=(int) $catid;
$search='';
if(!empty($catid)){
$sortpath=$this->db->fetch_one("select sort_path from ".WEBMENG_CONMENG."category_templates_web where cat_id='".$catid."' ");
$search.=" and catid in(select cat_id from ".WEBMENG_CONMENG."category_templates_web where sort_path like '".$sortpath."%' ) ";
}
//$sql = "select *,thumb as img,inputtime as addtime from ".WEBMENG_CONMENG."templates_web where status>0 order by inputtime desc ".$search;
$sql = "select *,thumb as img,inputtime as addtime from ".WEBMENG_CONMENG."templates_web where status>0 ".$search;
$all_goods = page_for_db_extend($sql,'',18); //查询带分页的每一页显示18条记录
// $all_goods = page_for_db_extend($sql); //查询带分页的
$data = array(
'info_reslut' => $all_goods['data'],
'showpage' => $all_goods['page'],
'template_count' => $all_news['total'],
//'category_web' => $template_list
'templates_web' => $this->category_templates_web()
);
$this->display('cn/template/category.html',$data);
}
public function category_templates_web()
{
$goods_list = $this->db->fetch("select cat_name as sortname,cat_id as id,parent_id from ".WEBMENG_CONMENG."category_templates_web ");
$templates_web = array();
$parent = array();
if(!empty($goods_list)){
foreach ($goods_list as $v) {
if($v['parent_id']==0){
$templates_web[] = $v;
}
$parent[$v['parent_id']][]=$v;
}
foreach ($templates_web as $k => $v) {
$templates_web[$k]['child'] = isset($parent[$v['id']])?$parent[$v['id']]:array();
if(!empty($templates_web[$k]['child'])){
foreach ($templates_web[$k]['child'] as $key => $value) {
$templates_web[$k]['child'][$key]['child'] = isset($parent[$value['id']])?$parent[$value['id']]:array();
}
}
}
}
return $templates_web;
}
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:service@webmeng.net 进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。
以上信息是否解决您的问题?
相关问题
- 邮件系统架设步骤
- 第三方美化界面资源
- 解决宝塔远程mysql问题
- Navicat连接错误1130:is not allowed to...
- 解决1130 is not allowed to connect ...
- 宝塔面板安装nginx,宝塔nginx配置文件
- MySQL PHPmyadmin 数据库导出报错Fatal err...
- Winwebmail能发邮件不能收邮件的解决方法
- 中国境内ICP备案材料清单
- winwebmail邮件系统 v3.9.0.7中文破解版
- C盘空间不足怎么办?5种方法获得更多空间!
- 安全实用的应用迁移方法推荐!
- linux开启端口命令
- linux开启端口
- Linux怎么查看操作系统版本号
- linux centos中升级更新命令yum upgrade和yu...
- Linux下平滑升级nginx
- 50个最常用的Unix/Linux命令
- [分享]云服务器挂马清理实例
- 新手入门——部署一个网站需要准备什么
- 虚拟主机相关基础知识
- 从域名到网站,只需四步!
- 全国各省备案基本要求一览表
- 互联网网站如何备案?
- 域名的实名审核需要多久?
- 怎么在服务器绑定域名
- 快速添加域名解析
- 无法登录云服务器?
- Mysql安装出现的问题Building CXX object s...
- Linux面板7.9.0安装脚本
- linux旧版本如何升级成新版本
- 宝塔Linux面板最新自动磁盘挂载脚本,一键挂载数据盘到www目录...
- 如何在Linux中清除缓存(Cache)
- Linux用指令来释放缓存方法
- Linux清除系统缓存释放内存命令介绍
- 企业邮局域名解析设置
- 如何连接到远程windows服务器
- Webmeng 2022 V13.0.1 下载地址
- wap手机网页html通过特殊链接:打电话,发短信,发邮件详细教程
- Webmeng分类导航标签,模板
餐厅介绍
自助餐厅
用户评论