• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP templates函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: itmeifram

 public function itmeifram()
 {
     $itemid = safe_replace($this->segment(4));
     $item = $this->db->GetOne("select id,sid,qishu from `@#_shoplist` where `id`='{$itemid}' LIMIT 1");
     if (!$item) {
         $error = 1;
     } else {
         $error = 0;
         $page = System::load_sys_class('page');
         $total = $this->db->GetCount("select id from `@#_shaidan` where `sd_shopsid`='{$item['sid']}'");
         if (!$total) {
             $error = 1;
         }
         if (isset($_GET['p'])) {
             $pagenum = $_GET['p'];
         } else {
             $pagenum = 1;
         }
         $num = 10;
         $page->config($total, $num, $pagenum, "0");
         $shaidan = $this->db->GetPage("select * from `@#_shaidan` where `sd_shopsid` = '{$item['sid']}' order by sd_id  DESC", array("num" => $num, "page" => $pagenum, "type" => 1, "cache" => 0));
         foreach ($shaidan as $key => $val) {
             $member_info = $this->db->GetOne("select * from `@#_member` where `uid`='{$val['sd_userid']}'");
             $member_img[$val['sd_id']] = $member_info['img'];
             $member_id[$val['sd_id']] = $member_info['uid'];
             $member_username[$val['sd_id']] = $member_info['username'];
         }
     }
     include templates("index", "itemifram");
 }
开发者ID:think-css,项目名称:yungou,代码行数:30,代码来源:shaidan.action.php


示例17: template_export

    case 'export':
        template_export();
        break;
    case 'import':
        include_once './include/top_header.php';
        import();
        include_once './include/bottom_footer.php';
        break;
    case 'edit':
        include_once './include/top_header.php';
        template_edit();
        include_once './include/bottom_footer.php';
        break;
    default:
        include_once './include/top_header.php';
        templates();
        include_once './include/bottom_footer.php';
        break;
}
function template_export()
{
    $output = "<templates>\n";
    if (sizeof($_POST)) {
        foreach ($_POST as $t => $v) {
            if (substr($t, 0, 4) == 'chk_') {
                $id = substr($t, 4);
                if (is_numeric($id)) {
                    $data = db_fetch_row("SELECT * FROM thold_template WHERE id={$id}");
                    if (sizeof($data)) {
                        $data_template_hash = db_fetch_cell("SELECT hash \r\n\t\t\t\t\t\tFROM data_template \r\n\t\t\t\t\t\tWHERE id=" . $data["data_template_id"]);
                        $data_source_hash = db_fetch_cell("SELECT hash \r\n\t\t\t\t\t\tFROM data_template_rrd \r\n\t\t\t\t\t\tWHERE id=" . $data["data_source_id"]);
开发者ID:resmon,项目名称:resmon-cacti,代码行数:31,代码来源:thold_templates.php


示例18: jf_paysuccess

 public function jf_paysuccess()
 {
     $_COOKIE['Cartlist_jf'] = NULL;
     _setcookie("Cartlist_jf", null);
     include templates("cart", "jf_paysuccess");
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:6,代码来源:cart.action.php


示例19: unset

                                <span class="u-results-visitors">1</span>
                                <span class="u-results-code"><em><a href="http://member.1yyg.com/UserBuyDetail-2505081.do" target="_blank">查看所有云购码</a></em>
                                </span>
                            </dd>
                             <?php 
    }
}
$ln++;
unset($ln);
?>
  
                        </dl>
                    </div>

                    <div class="g-results-loading" style="display: none;">
                        <span>正在提交数据,请稍候……</span>
                        <b></b>
                    </div>

                    <div id="divWx" class="g-wx-banner" style="">
                        <img alt="" src="http://www.gd1yyg.com/statics/plugin/style/global/image/wx-banner.jpg">
                    </div>

                </div>
            </div>


            <!--footer 开始-->
            <?php 
include templates("index", "footercart");
开发者ID:shuay,项目名称:projectYG,代码行数:30,代码来源:5fbbc5f9ac7a3811467c2fd73bb63fd7.tpl.php


示例20: edit

function edit()
{
    global $colors, $tabs_thold, $config;
    /* ================= input validation ================= */
    input_validate_input_number(get_request_var_request("id"));
    /* ==================================================== */
    /* set the default tab */
    load_current_session_value("tab", "sess_thold_notify_tab", "general");
    $current_tab = $_REQUEST["tab"];
    if (sizeof($tabs_thold) && isset($_REQUEST['id'])) {
        /* draw the tabs */
        print "<table class='tabs' width='100%' cellspacing='0' cellpadding='3' align='center'><tr>\n";
        foreach (array_keys($tabs_thold) as $tab_short_name) {
            print "<td style='padding:3px 10px 2px 5px;background-color:" . ($tab_short_name == $current_tab ? "silver;" : "#DFDFDF;") . "white-space:nowrap;'" . " width='1%' " . " align='center' class='tab'>\n\t\t\t\t<span class='textHeader'><a href='" . htmlspecialchars($config['url_path'] . "plugins/thold/notify_lists.php?action=edit&id=" . get_request_var_request('id') . "&tab=" . $tab_short_name) . "'>{$tabs_thold[$tab_short_name]}</a></span>\n\t\t\t\t</td>\n\n\t\t\t\t<td width='1'></td>\n";
        }
        print "<td></td>\n</tr></table>\n";
    }
    $header_label = get_notification_header_label();
    if (isset($_REQUEST['id'])) {
        $list = db_fetch_row('SELECT * FROM plugin_notification_lists WHERE id=' . $_REQUEST['id']);
    } else {
        $list = array();
        $current_tab = 'general';
    }
    if ($current_tab == "general") {
        html_start_box("<strong>General Settings</strong> " . htmlspecialchars($header_label), "100%", $colors["header"], "3", "center", "");
        $fields_notification = array("name" => array("method" => "textbox", "friendly_name" => "Name", "description" => "Enter a name for this Notification List", "value" => "|arg1:name|", "max_length" => "80"), "description" => array("method" => "textarea", "friendly_name" => "Description", "description" => "Enter a description for this Notification List", "value" => "|arg1:description|", "class" => "textAreaNotes", "textarea_rows" => "2", "textarea_cols" => "80"), "emails" => array("method" => "textarea", "friendly_name" => "Email Addresses", "description" => "Enter a comma separated list of Email addresses for this notification list.", "value" => "|arg1:emails|", "class" => "textAreaNotes", "textarea_rows" => "4", "textarea_cols" => "80"), "phones" => array("method" => "textarea", "friendly_name" => "Phone Numbers", "description" => "Enter a comma separated list of Phone Numbers for this notification list.", "value" => "|arg1:phones|", "class" => "textAreaNotes", "textarea_rows" => "4", "textarea_cols" => "80"), "id" => array("method" => "hidden_zero", "value" => "|arg1:id|"), "save_component" => array("method" => "hidden", "value" => "1"));
        draw_edit_form(array("config" => array(), "fields" => inject_form_variables($fields_notification, isset($list) ? $list : array())));
        html_end_box();
        form_save_button("notify_lists.php", "return");
    } elseif ($current_tab == "hosts") {
        hosts($header_label);
    } elseif ($current_tab == "tholds") {
        tholds($header_label);
    } else {
        templates($header_label);
    }
}
开发者ID:caiorasec,项目名称:thold,代码行数:38,代码来源:notify_lists.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP templates_draw函数代码示例发布时间:2022-05-23
下一篇:
PHP templatereplace函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap