當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。