cms系统数据调取方法
来源:互联网 发布:域名注册godaddy 编辑:程序博客网 时间:2024/05/21 10:17
当前样式
function meun_on_con($url) { $self = explode('/', $_SERVER['SCRIPT_NAME']); if ($self[1] == $url) { return "class='on'"; } else { return ""; }}<li <{"news.php"|meun_on_con}>><li <{if $smarty.server.SCRIPT_NAME == "/club.php"}>class="on"<{/if}>>
推荐、限制
Trs("newstwo_i", "news_page", "del!=1 and tid=93 and bdid=12 and recommended<>0 order by recommended desc , time desc limit 8");Trs("newsthree_i", "news_page", "del!=1 and tid=93 and bdid=13 and recommended<>0 order by recommended desc , time desc limit 8");
调用公共内容
调取公共内容<{include file = "`$app_tpl_w`public/head.tpl"}>//通过获取idif ($_GET['id']){ $sql = " and id={$_GET['id']}";}//抛到页面的名称:pic //获取的数据库:index_picTrs("pic","index_pic","del!=1 and tid=67");//给获取的数据指定一个名称$index_pic = Dgs("index_pic","del!=1 and tid=67");$type = Dgs("classify","del!=1 and tid=75 and bdid={$_GET['city']} and bdtid=68");$champion = Dgs("details","del!=1 and tid=69 and region={$_GET['city']} and title={$type[0]['id']}");Tr($champion,'details');foreach ($champion as $key => $value){ $spic = Dgs('spic',"del!=1 and tid=76 and bdid={$value['id']} and bdtid={$value['tid']}"); $hpic = Dgs('hpic',"del!=1 and tid=77 and bdid={$value['id']} and bdtid={$value['tid']} limit 2"); $champion[$key]['spic'] =$spic; $champion[$key]['hpic'] =$hpic; }//通过推荐字段推荐到首页,通过时间排序Trs("i_dynamic","dynamic","del!=1 and tid=77 and recommend<>0 order by recommend desc , time desc limit 6");//在页面上限制文档显示的字数<{$details.advantage|clearhtml|cutstr:'160'}>
Dgs
$financial = Dgs("financial","del!=1 and tid=79");title={$financial[0]['id']}$share = Dgs("dynamic","del!=1 and tid=93");$f_share = Dgs("share","del!=1 and tid=94 and classify={$share[0]['id']}");Tr($champion,'details');Tr($today,"today");
修改翻页样式
<{if $typeone}> <{$pages}> <{/if}>fy($param = array( 'result' => 'typeone', //命名 'table' => 'pic', //数据库 'condition' => "del!=1 and tid=75", //判断条件 'perpage' => 4, //显示多少个项目 'type' => 4, //翻页的样式 'nav' => 'pages', //样式命名 //'debug' => 1 //查看属性));修改翻页路径:includes/classes/lm_pape.php
0 0
- cms系统数据调取方法
- IOS调取系统摄像头
- 调取系统相机
- 调取jSon数据--展示
- 服务器的数据调取
- 帝国CMS【自定义系统模型】方法
- UIImagePickerController调取系统相册图片
- textarea从数据库调取数据
- sql 服务器之间调取数据
- 使用PL/SQL调取数据
- 点击回退键调取的方法
- 商品列表通用调取方法
- 【帝国CMS】列表页新闻调取关键词带链接
- 【帝国CMS】列表页调取副表字段演示
- CMS系统
- cms系统
- 国内最好PHP CMS系统-PHP类CMS数据负载测评报告
- WebMatrix(IIS Express)搭建.net 开源CMS系统方法
- 极光推送-JAVA服务器端推送代码
- Leapmotion 感悟
- 归并排序(mergesort)
- BZOJ 1050 最小生成树
- spring的自动装配
- cms系统数据调取方法
- 并查集详解
- 图的深度遍历
- LeetCode 287 Find the Duplicate Number (二分)
- 一年多了,回头想想这一年对it行业的感受
- jeecg集成实现websocket
- Django 的 CSRF 保护机制
- csu 1510 Happy Robot(字符串DP,记忆化搜索)
- Mac Android Studio 常用快捷键