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