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


PHP Template_Helper::displayTemplate方法代码示例

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


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

示例1: rssError

function rssError($msg)
{
    $tpl = new Template_Helper();
    $tpl->setTemplate('rss_error.tpl.xml');
    header('Content-Type: text/xml; charset=' . APP_CHARSET);
    $tpl->assign(array('error' => $msg));
    $tpl->displayTemplate();
}
开发者ID:korusdipl,项目名称:eventum,代码行数:8,代码来源:rss.php

示例2: array

/*
 * This file is part of the Eventum (Issue Tracking System) package.
 *
 * @copyright (c) Eventum Team
 * @license GNU General Public License, version 2 or later (GPL-2+)
 *
 * For the full copyright and license information,
 * please see the COPYING and AUTHORS files
 * that were distributed with this source code.
 */
require_once __DIR__ . '/../../init.php';
Auth::checkAuthentication();
if (!empty($_REQUEST['iss_id'])) {
    $fields = Custom_Field::getListByIssue(Auth::getCurrentProject(), $_REQUEST['iss_id']);
} else {
    $fields = Custom_Field::getListByProject(Auth::getCurrentProject(), $_REQUEST['form_type']);
}
$data = array();
foreach ($fields as $field) {
    $backend = Custom_Field::getBackend($field['fld_id']);
    if (is_object($backend) && is_subclass_of($backend, 'Dynamic_Custom_Field_Backend')) {
        $field['structured_data'] = $backend->getStructuredData();
        $data[] = $field;
    }
}
header('Content-Type: text/javascript; charset=UTF-8');
$tpl = new Template_Helper();
$tpl->setTemplate('js/dynamic_custom_field.tpl.js');
$tpl->assign('fields', $data);
$tpl->displayTemplate();
开发者ID:dabielkabuto,项目名称:eventum,代码行数:30,代码来源:dynamic_custom_field.js.php

示例3: displayErrorMessage

 public static function displayErrorMessage($msg)
 {
     self::setMessage($msg, self::MSG_ERROR);
     $tpl = new Template_Helper();
     $tpl->setTemplate('error_message.tpl.html');
     $tpl->displayTemplate();
     exit;
 }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:8,代码来源:class.misc.php

示例4: checkPermissions

$relative_url[] = '';
$relative_url = implode('/', $relative_url);
define('APP_REL_URL', $relative_url);
$tpl->assign('phpversion', phpversion());
$tpl->assign('core', array('rel_url' => $relative_url, 'app_title' => APP_NAME));
if (@$_SERVER['HTTPS'] == 'on') {
    $ssl_mode = 'enabled';
} else {
    $ssl_mode = 'disabled';
}
$tpl->assign('ssl_mode', $ssl_mode);
$tpl->assign('zones', Date_Helper::getTimezoneList());
$tpl->assign('default_timezone', getTimezone());
$tpl->assign('default_weekday', getFirstWeekday());
$tpl->setTemplate('setup.tpl.html');
$tpl->displayTemplate(false);
/**
 * Checks for $file for write permission.
 *
 * IMPORTANT: if the file does not exist, an empty file is created.
 */
function checkPermissions($file, $desc, $is_directory = false)
{
    clearstatcache();
    if (!file_exists($file)) {
        if (!$is_directory) {
            // try to create the file ourselves then
            $fp = @fopen($file, 'w');
            if (!$fp) {
                return getPermissionError($file, $desc, $is_directory, false);
            }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:31,代码来源:index.php

示例5: getAuthBackend

 /**
  * @return Auth_Backend_Interface
  */
 public static function getAuthBackend()
 {
     /** @var Auth_Backend_Interface $instance */
     static $instance = false;
     if ($instance == false) {
         $class = APP_AUTH_BACKEND;
         // legacy: allow lowercase variants
         if (strtolower($class) == 'mysql_auth_backend') {
             $class = 'Mysql_Auth_Backend';
         } elseif (strtolower($class) == 'ldap_auth_backend') {
             $class = 'LDAP_Auth_Backend';
         }
         try {
             $instance = new $class();
         } catch (AuthException $e) {
             $message = "Unable to use auth backend '{$class}'";
             Logger::app()->critical($message, array('exception' => $e));
             if (APP_AUTH_BACKEND_ALLOW_FALLBACK != true) {
                 $tpl = new Template_Helper();
                 $tpl->setTemplate('authentication_error.tpl.html');
                 $tpl->assign('error_message', $e->getMessage());
                 $tpl->displayTemplate();
                 exit;
             }
             $instance = self::getFallBackAuthBackend();
         }
     }
     return $instance;
 }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:32,代码来源:class.auth.php


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