当前位置: 首页>>代码示例>>PHP>>正文


PHP templates函数代码示例

本文整理汇总了PHP中templates函数的典型用法代码示例。如果您正苦于以下问题:PHP templates函数的具体用法?PHP templates怎么用?PHP templates使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了templates函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: tag

 public function tag()
 {
     $search = $this->segment_array();
     array_shift($search);
     array_shift($search);
     array_shift($search);
     $search = implode('/', $search);
     if (!$search) {
         _message("输入搜索关键字");
     }
     $search = urldecode($search);
     $search = safe_replace($search);
     if (!_is_utf8($search)) {
         $search = iconv("GBK", "UTF-8", $search);
     }
     $mysql_model = System::load_sys_class('model');
     $search = str_ireplace("union", '', $search);
     $search = str_ireplace("select", '', $search);
     $search = str_ireplace("delete", '', $search);
     $search = str_ireplace("update", '', $search);
     $search = str_ireplace("/**/", '', $search);
     $title = $search . ' - ' . _cfg('web_name');
     $shoplist = $mysql_model->GetList("select title,thumb,id,sid,zongrenshu,canyurenshu,shenyurenshu,money from `@#_shoplist` WHERE shenyurenshu !=0 and `title` LIKE '%" . $search . "%' order by shenyurenshu desc");
     $list = count($shoplist);
     include templates("search", "search");
 }
开发者ID:shuay,项目名称:projectYG,代码行数:26,代码来源:index.action.php

示例2: buyrecordbai

 public function buyrecordbai()
 {
     $this->db = System::load_sys_class("model");
     $res = $this->db->GetOne("select sum(gonumber) gonumber from `@#_member_go_record`");
     $this->db->query("update `@#_caches` set value='{$res['gonumber']}' where `key`='goods_count_num'");
     $RecordList = $this->db->GetList("select username,uid,shopid,shopname,shopqishu,gonumber,time from `@#_member_go_record` where 1 order by id desc limit 0,100");
     include templates("index", "buyrecordbai");
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:8,代码来源:databuyrecord.action.php

示例3: init

 public function init()
 {
     $mysql_model = System::load_sys_class('model');
     $title = "友情链接";
     $link_size = $mysql_model->GetList("select * from `@#_link` where `type`='1'");
     $link_img = $mysql_model->GetList("select * from `@#_link` where `type`='2'");
     include templates("link", "link");
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:8,代码来源:link.action.php

示例4: userpost

 public function userpost()
 {
     $mysql_model = System::load_sys_class('model');
     $title = "获得的商品";
     $index = intval($this->segment(4)) - 1000000000;
     $tab = $this->segment(3);
     $member = $mysql_model->GetOne("select * from `@#_member` where uid='" . $index . "'");
     if ($member) {
         include templates("us", "userpost");
     } else {
         _message("页面错误", WEB_PATH, 3);
     }
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:13,代码来源:index.action.php

示例5: userpost

 public function userpost()
 {
     $mysql_model = System::load_sys_class('model');
     $title = "晒单";
     $index = $this->uid;
     $tab = $this->segment(3);
     $member = $mysql_model->GetOne("select * from `@#_member` where uid='{$index}'");
     $membershaidan = $mysql_model->GetList("select * from `@#_shaidan` where sd_userid='{$index}' order by `sd_id` DESC limit 0,10");
     if ($member) {
         include templates("us", "userpost");
     } else {
         _message("页面错误", WEB_PATH, 3);
     }
 }
开发者ID:shuay,项目名称:projectYG,代码行数:14,代码来源:us.action.php

示例6: next

 public function next()
 {
     $webname = $this->_cfg['web_name'];
     //header("location: ".WEB_PATH);
     System::load_sys_fun('user');
     $w_minri_time = strtotime(date('Y-m-d', strtotime("+1 day")));
     $w_hinri_time = strtotime(date('Y-m-d', strtotime("+2 day")));
     $shoplist = $this->db->GetList("select * from `@#_shoplist` where `xsjx_time` > '{$w_minri_time}' and `xsjx_time` < '{$w_hinri_time}' order by `xsjx_time` limit 0,3");
     $count = count($shoplist);
     $titlets = '抱歉,明日还没有发布限时揭晓商品!';
     $date = 'next';
     $key = "限时";
     include templates("mobile/index", "autolottery");
 }
开发者ID:shuay,项目名称:projectYG,代码行数:14,代码来源:autolottery.action.php

示例7: build

function build()
{
    $kav = new Kav4Proxy();
    $conf = $kav->build_config();
    echo "Starting......: " . date("H:i:s") . " Kav4proxy building configuration done\n";
    @file_put_contents("/etc/opt/kaspersky/kav4proxy.conf", $conf);
    shell_exec("/bin/chown -R kluser /etc/opt/kaspersky");
    shell_exec("/bin/chown -R kluser /var/log/kaspersky/kav4proxy");
    @mkdir("/tmp/Kav4proxy", 0777);
    @chmod("/tmp/Kav4proxy", 0777);
    @chown("/tmp/Kav4Proxy", "kluser");
    @chgrp("/tmp/Kav4Proxy", "kluser");
    templates();
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:14,代码来源:exec.kav4proxy.php

示例8: userraffle

 public function userraffle()
 {
     $mysql_model = System::load_sys_class('model');
     $title = "获得的商品";
     $index = $this->uid;
     $tab = $this->segment(3);
     $member = $mysql_model->GetOne("select * from `@#_member` where uid='{$index}'");
     $memberhuode = $mysql_model->GetList("select * from `@#_member_go_record` where uid='{$index}' and `huode` > '10000000' order by `id` DESC limit 0,10");
     if ($member) {
         include templates("us", "userraffle");
     } else {
         _message("页面错误", WEB_PATH, 3);
     }
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:14,代码来源:us.action.php

示例9: init

 public function init()
 {
     //header("location: ".WEB_PATH);
     System::load_sys_fun('user');
     $title = "限时揭晓" . "_" . $this->_cfg["web_name"];
     $jinri_time = abs(date("m")) . '月' . date("d") . "日";
     $minri_time = abs(date("m", strtotime("+1 day"))) . '月' . date("d", strtotime("+1 day")) . "日";
     $w_jinri_time = strtotime(date('Y-m-d'));
     $w_minri_time = strtotime(date('Y-m-d', strtotime("+1 day")));
     $w_hinri_time = strtotime(date('Y-m-d', strtotime("+2 day")));
     $jinri_shoplist = $this->db->GetList("select * from `@#_shoplist` where `xsjx_time` > '{$w_jinri_time}' and `xsjx_time` < '{$w_minri_time}' order by id DESC limit 0,3");
     $minri_shoplist = $this->db->GetList("select * from `@#_shoplist` where `xsjx_time` > '{$w_minri_time}' and `xsjx_time` < '{$w_hinri_time}' order by id DESC limit 0,3");
     //往期回顾
     $endshoplist = $this->db->GetList("select * from `@#_shoplist` where `xsjx_time` != '0' and `q_uid` != '0' order by `xsjx_time` DESC limit 0,8");
     include templates("index", "autolottery");
 }
开发者ID:think-css,项目名称:yungou,代码行数:16,代码来源:autolottery.action.php

示例10: init

 public function init()
 {
     $lists = $this->db->GetList("SELECT * FROM `@#_qqset` where 1");
     $lists1 = array();
     $lists2 = array();
     $title = "官方QQ群" . _cfg("web_name");
     if (!empty($lists)) {
         foreach ($lists as $key => $val) {
             if ($val['type'] == '地方群') {
                 $lists1[$key] = $val;
             } else {
                 $lists2[$key] = $val;
             }
         }
     }
     include templates("index", "qq");
 }
开发者ID:king3388,项目名称:king,代码行数:17,代码来源:qq_qun.action.php

示例11: detail

 public function detail()
 {
     $webname = $this->_cfg['web_name'];
     $key = "晒单分享";
     $member = $this->userinfo;
     $sd_id = intval($this->segment(4));
     $shaidan = $this->db->GetOne("select * from `@#_shaidan` where `sd_id`='{$sd_id}'");
     $goods = $this->db->GetOne("select * from `@#_shoplist` where `sid` = '{$shaidan['sd_shopid']}' order by `qishu` DESC");
     $shaidannew = $this->db->GetList("select * from `@#_shaidan` order by `sd_id` DESC limit 5");
     $shaidan_hueifu = $this->db->GetList("select * from `@#_shaidan_hueifu` where `sdhf_id`='{$sd_id}'");
     if (!$shaidan) {
         //_message("页面错误");
         echo "页面错误";
     }
     $substr = substr($shaidan['sd_photolist'], 0, -1);
     $sd_photolist = explode(";", $substr);
     include templates("mobile/index", "detail");
 }
开发者ID:think-css,项目名称:yungou,代码行数:18,代码来源:shaidan.action.php

示例12: go_record_ifram

 public function go_record_ifram()
 {
     $gid = (int) $this->segment(4);
     $len = (int) $this->segment(5);
     if ($len < 10) {
         $len = 10;
     }
     $page = System::load_sys_class('page');
     $total = $this->db->GetCount("SELECT * FROM `@#_member_go_record` WHERE `shopid` = '{$gid}'");
     if (isset($_GET['p'])) {
         $pagenum = (int) $_GET['p'];
     } else {
         $pagenum = 1;
     }
     $num = $len;
     $page->config($total, $num, $pagenum, "0");
     $go_record_list = $this->db->GetPage("SELECT * FROM `@#_member_go_record` WHERE `shopid` = '{$gid}' order by id DESC", array("num" => $num, "page" => $pagenum, "type" => 1, "cache" => 0));
     include templates("index", "go_record_ifram");
 }
开发者ID:think-css,项目名称:yungou,代码行数:19,代码来源:goods.action.php

示例13: single

 public function single()
 {
     $single = $this->segment(4);
     if (intval($single)) {
         $article = $this->db->GetOne("SELECT * FROM `@#_category` where `cateid` = '{$single}' LIMIT 1");
     } else {
         $article = $this->db->GetOne("SELECT * FROM `@#_category` where `catdir` = '{$single}' LIMIT 1");
     }
     if (!$article) {
         _message("参数错误!");
     }
     $info = unserialize($article['info']);
     $article['thumb'] = $info['thumb'];
     $article['des'] = $info['des'];
     $article['content'] = base64_decode($info['content']);
     $title = empty($info['meta_title']) ? $article['name'] : $info['meta_title'];
     $keywords = $info['meta_keywords'];
     $description = $info['meta_description'];
     $template = explode('.', $info['template']);
     include templates($template[0], $template[1]);
 }
开发者ID:king3388,项目名称:king,代码行数:21,代码来源:article.action.php

示例14: templates

?>
            <?php 
if (defined('G_IN_ADMIN')) {
    echo '<div style="padding:8px;background-color:#F93; color:#fff;border:1px solid #f60;text-align:center"><b>This Tag</b></div>';
}
?>
  
                 
                 
    	    </div>
        </div>
    </section>

    
<?php 
include templates("mobile/index", "footer");
?>
<script language="javascript" type="text/javascript">
  var Path = new Object();
  Path.Skin="<?php 
echo G_WEB_PATH;
?>
/statics/templates/yungou";  
  Path.Webpath = "<?php 
echo WEB_PATH;
?>
";
  
var Base={head:document.getElementsByTagName("head")[0]||document.documentElement,Myload:function(B,A){this.done=false;B.onload=B.onreadystatechange=function(){if(!this.done&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){this.done=true;A();B.onload=B.onreadystatechange=null;if(this.head&&B.parentNode){this.head.removeChild(B)}}}},getScript:function(A,C){var B=function(){};if(C!=undefined){B=C}var D=document.createElement("script");D.setAttribute("language","javascript");D.setAttribute("type","text/javascript");D.setAttribute("src",A);this.head.appendChild(D);this.Myload(D,B)},getStyle:function(A,B){var B=function(){};if(callBack!=undefined){B=callBack}var C=document.createElement("link");C.setAttribute("type","text/css");C.setAttribute("rel","stylesheet");C.setAttribute("href",A);this.head.appendChild(C);this.Myload(C,B)}}
function GetVerNum(){var D=new Date();return D.getFullYear().toString().substring(2,4)+'.'+(D.getMonth()+1)+'.'+D.getDate()+'.'+D.getHours()+'.'+(D.getMinutes()<10?'0':D.getMinutes().toString().substring(0,1))}
Base.getScript('<?php 
开发者ID:king3388,项目名称:king,代码行数:31,代码来源:cc8de0fc2cd618376b61736da2fe3dbd.tpl.php

示例15: findok

 public function findok()
 {
     $key = $this->segment(4);
     if (empty($key)) {
         _message("未知错误");
     } else {
         $key = $this->segment(4);
     }
     $checkcode = explode("|", _encrypt($key, "DECODE"));
     if (count($checkcode) != 3) {
         _message("未知错误", NULL, 3);
     }
     $emailurl = explode("@", $checkcode[0]);
     if ($emailurl[1]) {
         $sql = "select * from `@#_member` where `email`='{$checkcode['0']}' AND `passcode`= '{$checkcode['1']}|{$checkcode['2']}' LIMIT 1";
     } else {
         $sql = "select * from `@#_member` where `mobile`='{$checkcode['0']}' AND `passcode`= '{$checkcode['1']}|{$checkcode['2']}' LIMIT 1";
     }
     $member = $this->DB()->GetOne($sql);
     if (!$member) {
         _message("帐号或验证码错误", NULL, 2);
     }
     $usercheck = explode("|", $member['passcode']);
     $timec = time() - $usercheck[1];
     if ($timec < 3600 * 24) {
         $title = "重置密码";
         include templates("user", "findok");
     } else {
         $title = "验证失败";
         include templates("user", "finderror");
     }
 }
开发者ID:king3388,项目名称:king,代码行数:32,代码来源:finduser.action.php


注:本文中的templates函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。