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

PHP jTpl类代码示例

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

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



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

示例1: index

 /**
  *
  */
 function index()
 {
     $rep = $this->getResponse('html');
     $tpl = new jTpl();
     $gid = array(0);
     $o = new StdClass();
     $o->id_aclgrp = '0';
     $o->name = jLocale::get('jacl2_admin~acl2.anonymous.group.name');
     $o->grouptype = 0;
     $groups = array($o);
     $grouprights = array(0 => false);
     foreach (jAcl2DbUserGroup::getGroupList() as $grp) {
         $gid[] = $grp->id_aclgrp;
         $groups[] = $grp;
         $grouprights[$grp->id_aclgrp] = false;
     }
     $rights = array();
     $p = jAcl2Db::getProfil();
     $rs = jDao::get('jelix~jacl2subject', $p)->findAllSubject();
     foreach ($rs as $rec) {
         $rights[$rec->id_aclsbj] = $grouprights;
     }
     $rs = jDao::get('jelix~jacl2rights', $p)->getRightsByGroups($gid);
     foreach ($rs as $rec) {
         $rights[$rec->id_aclsbj][$rec->id_aclgrp] = true;
     }
     $tpl->assign(compact('groups', 'rights'));
     if (jAcl2::check('acl.group.modify')) {
         $rep->body->assign('MAIN', $tpl->fetch('groups_right'));
     } else {
         $rep->body->assign('MAIN', $tpl->fetch('groups_right_view'));
     }
     return $rep;
 }
开发者ID:alienpham,项目名称:helenekling,代码行数:37,代码来源:groups.classic.php


示例2: login

 function login()
 {
     $rep = $this->getResponse('html');
     $tpl = new jTpl();
     $rep->body->assign('MAIN', $tpl->fetch('login'));
     return $rep;
 }
开发者ID:alienpham,项目名称:helenekling,代码行数:7,代码来源:default.classic.php


示例3: index

 /**
  *
  */
 function index()
 {
     $rep = $this->getResponse('html');
     $tpl = new jTpl();
     $rep->body->assign('MAIN', $tpl->fetch('startpage'));
     return $rep;
 }
开发者ID:havefnubb,项目名称:havefnubb,代码行数:10,代码来源:default.classic.php


示例4: phpinfo

 /**
  * call to phpinfo
  */
 public function phpinfo()
 {
     $rep = $this->getResponse('html');
     $tpl = new jTpl();
     $rep->body->assign('MAIN', $tpl->fetch('servinfo~phpinfo'));
     return $rep;
 }
开发者ID:havefnubb,项目名称:havefnubb,代码行数:10,代码来源:default.classic.php


示例5: show

 /**
  * action to display the page
  * @param jTpl $tpl the template container
  */
 function show($tpl)
 {
     if (!isset($_SESSION['dbprofiles'])) {
         $this->loadProfiles();
     }
     $sections = $_SESSION['dbprofiles']['profiles'];
     $data = $_SESSION['dbprofiles']['data'];
     $ignoreProfiles = isset($this->config['ignoreProfiles']) ? $this->config['ignoreProfiles'] : '';
     $ignoreProfiles = preg_split("/ *, */", $ignoreProfiles);
     if (count($ignoreProfiles)) {
         $newsections = array();
         foreach ($sections as $profile) {
             if (!in_array(substr($profile, 4), $ignoreProfiles)) {
                 $newsections[] = $profile;
             }
         }
         $tpl->assign('profiles', $newsections);
         $_SESSION['dbprofiles']['profiles'] = $newsections;
     } else {
         $tpl->assign('profiles', $sections);
     }
     $tpl->assign($data);
     //$preferPDO = isset($this->config['preferpdo'])?$this->config['preferpdo']:false;
     $tpl->assign('drivers', $this->getDriversList());
     return true;
 }
开发者ID:CREASIG,项目名称:lizmap-web-client,代码行数:30,代码来源:dbprofile.page.php


示例6: index

 /**
  * Main page
  */
 public function index()
 {
     $submit = $this->param('validate');
     if ($submit == jLocale::get('hfnucontact~contact.form.saveBt')) {
         $form = jForms::fill('hfnucontact~admincontact');
         $rep = $this->getResponse('redirect');
         if (!$form->check()) {
             $rep->action = 'hfnucontact~admin:index';
             return $rep;
         }
         $HfnucontactConfig = new jIniFileModifier(jApp::configPath('defaultconfig.ini.php'));
         $HfnucontactConfig->setValue('email_contact', $this->param('contact'), 'hfnucontact');
         $HfnucontactConfig->save();
         jMessage::add(jLocale::get('hfnucontact~contact.admin.form.email.saved'), 'ok');
         jForms::destroy('hfnucontact~admincontact');
         $rep->action = 'hfnucontact~admin:index';
         return $rep;
     } else {
         $form = jForms::create('hfnucontact~admincontact');
     }
     $form->setData('contact', jApp::config()->hfnucontact['email_contact']);
     $rep = $this->getResponse('html');
     $tpl = new jTpl();
     $tpl->assign('form', $form);
     $rep->body->assign('MAIN', $tpl->fetch('hfnucontact~admincontact'));
     $rep->body->assign('selectedMenuItem', 'contact');
     return $rep;
 }
开发者ID:havefnubb,项目名称:havefnubb,代码行数:31,代码来源:admin.classic.php


示例7: confirm

 function confirm()
 {
     $tpl = new jTpl();
     $rep = $this->getResponse('html');
     $rep->body->assign('MAIN', $tpl->fetch('confirm'));
     return $rep;
 }
开发者ID:alienpham,项目名称:helenekling,代码行数:7,代码来源:emails.classic.php


示例8: read_rss

 /**
  * display the RSS of the forum
  */
 public function read_rss()
 {
     $ftitle = jUrl::escape($this->param('ftitle'), true);
     $id_forum = (int) $this->param('id_forum');
     if (!jAcl2::check('hfnu.posts.list', 'forum' . $id_forum)) {
         $rep = $this->getResponse('redirect');
         $rep->action = 'default:index';
         return $rep;
     }
     if ($id_forum == 0) {
         $rep = $this->getResponse('redirect');
         $rep->action = 'default:index';
         return $rep;
     }
     $forum = jClasses::getService('havefnubb~hfnuforum')->getForum($id_forum);
     if (jUrl::escape($forum->forum_name, true) != $ftitle) {
         $rep = $this->getResponse('redirect');
         $rep->action = jApp::config()->urlengine['notfoundAct'];
         return $rep;
     }
     jApp::coord()->getPlugin('history')->change('label', htmlentities($forum->forum_name, ENT_COMPAT, 'UTF-8'));
     $feed_reader = new jFeedReader();
     $feed_reader->setCacheDir(jApp::varPath('feeds'));
     $feed_reader->setTimeout(2);
     $feed_reader->setUserAgent('HaveFnuBB - http://www.havefnubb.org/');
     $feed = $feed_reader->parse($forum->forum_url);
     $rep = $this->getResponse('html');
     $tpl = new jTpl();
     $tpl->assign('feed', $feed);
     $tpl->assign('forum', $forum);
     $rep->title = $forum->forum_name;
     $rep->body->assign('MAIN', $tpl->fetch('havefnubb~forum_rss.view'));
     return $rep;
 }
开发者ID:havefnubb,项目名称:havefnubb,代码行数:37,代码来源:forum.classic.php


示例9: unread

 public function unread()
 {
     $rep = $this->getResponse('html');
     $tpl = new jTpl();
     $tpl->assign('posts', jClasses::getService('havefnubb~hfnuposts')->findUnreadThreadByMod());
     $rep->body->assign('MAIN', $tpl->fetch('posts.list'));
     return $rep;
 }
开发者ID:havefnubb,项目名称:havefnubb,代码行数:8,代码来源:posts.classic.php


示例10: show

 /**
  * action to display the page
  * @param jTpl $tpl the template container
  */
 function show($tpl)
 {
     if (!isset($_SESSION['confmail'])) {
         $_SESSION['confmail'] = $this->loadconf();
     }
     $tpl->assign($_SESSION['confmail']);
     return true;
 }
开发者ID:CREASIG,项目名称:lizmap-web-client,代码行数:12,代码来源:confmail.page.php


示例11: notavailable

 protected function notavailable()
 {
     $rep = $this->_getjCommunityResponse();
     $rep->setHttpStatus(404, "Not found");
     $tpl = new \jTpl();
     $rep->body->assign('MAIN', $tpl->fetch('not_available'));
     return $rep;
 }
开发者ID:jelix,项目名称:jcommunity-module,代码行数:8,代码来源:AbstractController.php


示例12: show

 /**
  * action to display the page
  * @param jTpl $tpl the template container
  */
 function show($tpl)
 {
     if (!isset($_SESSION['installdemo'])) {
         $_SESSION['installdemo'] = false;
     }
     $tpl->assign('installdemo', $_SESSION['installdemo']);
     return true;
 }
开发者ID:CREASIG,项目名称:lizmap-web-client,代码行数:12,代码来源:demo.page.php


示例13: badright

 /**
  * 403 error page
  */
 public function badright()
 {
     $rep = $this->getResponse('html');
     $tpl = new jTpl();
     $rep->body->assign('MAIN', $tpl->fetch('havefnubb~403.html'));
     $rep->setHttpStatus('403', 'Forbidden');
     return $rep;
 }
开发者ID:havefnubb,项目名称:havefnubb,代码行数:11,代码来源:hfnuerror.classic.php


示例14: index

 function index()
 {
     $tpl = new jTpl();
     $rep = $this->getResponse('html');
     $rep->body->assign('MAIN', $tpl->fetch('cache_index'));
     $rep->body->assign('selectedMenuItem', 'cache');
     return $rep;
 }
开发者ID:havefnubb,项目名称:havefnubb,代码行数:8,代码来源:default.classic.php


示例15: createform

 function createform()
 {
     $rep = $this->getResponse('html');
     //$sujet=$this->param('sujet');
     //$text=$this->param('texte');
     $tpl = new jTpl();
     $rep->body->assign('MAIN', $tpl->fetch('newsform'));
     return $rep;
 }
开发者ID:medali1990,项目名称:medsite,代码行数:9,代码来源:default.classic.php


示例16: show

 /**
  * action to display the page
  * @param jTpl $tpl the template container
  * @return true
  */
 function show($tpl)
 {
     include dirname(__FILE__) . '/../../../version.php';
     if (!isset($_SESSION['adminaccount'])) {
         $_SESSION['adminaccount'] = array('login' => '', 'password' => '', 'password_confirm' => '', 'email' => '', 'alreadyInstalled' => $alreadyInstalled, 'errors' => array());
     }
     $tpl->assign($_SESSION['adminaccount']);
     return true;
 }
开发者ID:havefnubb,项目名称:havefnubb,代码行数:14,代码来源:adminaccount.page.php


示例17: onmapMiniDockable

 function onmapMiniDockable($event)
 {
     // creation du mini dock
     // id, titre, contenu html, index, [chemin vers css], [chemin vers js]
     $bp = jApp::config()->urlengine["basePath"];
     $tpl = new jTpl();
     $tpl->assign(array("depts" => $depts));
     $dock = new lizmapMapDockItem("localiz", "Se localiser", $tpl->fetch("localiz~map_localiz"), 10, $bp . "css/localiz.css", $bp . "js/localiz.js");
     $event->add($dock);
 }
开发者ID:aeag,项目名称:lizmap-web-client,代码行数:10,代码来源:localizDockable.listener.php


示例18: index

 /**
  * form to ask to reindex
  */
 function index()
 {
     $rep = $this->getResponse('html');
     $form = jForms::create('hfnusearch~indexing');
     $tpl = new jTpl();
     $tpl->assign('form', $form);
     $rep->body->assign('MAIN', $tpl->fetch('hfnusearch~admin.index'));
     $rep->body->assign('selectedMenuItem', 'searchengine');
     return $rep;
 }
开发者ID:havefnubb,项目名称:havefnubb,代码行数:13,代码来源:admin.classic.php


示例19: index

 function index()
 {
     $tpl = new jTpl();
     $dao = jDao::get('havefnubb~notify');
     $notify = $dao->findAll();
     $tpl->assign('notify', $notify);
     $rep = $this->getResponse('html');
     $rep->body->assign('MAIN', $tpl->fetch('hfnuadmin~notify_index'));
     $rep->body->assign('selectedMenuItem', 'notify');
     return $rep;
 }
开发者ID:havefnubb,项目名称:havefnubb,代码行数:11,代码来源:notify.classic.php


示例20: error

 /**
  * handle a possible flood protection from the same IP user
  */
 function error()
 {
     $resp = $this->getResponse('html');
     $title = stripslashes(jApp::config()->havefnubb['title']);
     $history = jApp::coord()->getPlugin('history');
     $history->change('label', ucfirst(htmlentities($title, ENT_COMPAT, 'UTF-8')));
     $history->change('title', jLocale::get('havefnubb~main.goto_homepage'));
     $tpl = new jTpl();
     $tpl->assign('message', jLocale::get('havefnubb~flood.detected'));
     $resp->body->assign('MAIN', $tpl->fetch('havefnubb~flood'));
     return $resp;
 }
开发者ID:havefnubb,项目名称:havefnubb,代码行数:15,代码来源:flood.classic.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP jUrl类代码示例发布时间:2022-05-23
下一篇:
PHP jText类代码示例发布时间: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