當前位置: 首頁>>代碼示例>>PHP>>正文


PHP HTML_Template_IT類代碼示例

本文整理匯總了PHP中HTML_Template_IT的典型用法代碼示例。如果您正苦於以下問題:PHP HTML_Template_IT類的具體用法?PHP HTML_Template_IT怎麽用?PHP HTML_Template_IT使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了HTML_Template_IT類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: send_confirmation

function send_confirmation($user_name, $email)
{
    // Create a new template, and specify that the template files are
    // in the same directory as the as the php files.
    $template = new HTML_Template_IT("./templates");
    // Load the email template file
    $template->loadTemplatefile("confirmemail.tpl", true, true);
    $template->setVariable("USERNAME", $user_name);
    $template->setVariable("EMAIL", $email);
    $to = $email;
    // Setup the headers.
    $headers["From"] = "noreply@vanhlebarsoftware.com";
    $headers["Subject"] = "Fitness Log Confirmation Email";
    $headers["X-Sender"] = "noreply@vanhlebarsoftware.com";
    $headers["X-Mailer"] = "PHP";
    $headers["Return-Path"] = "noreply@vanhlebarsoftware.com";
    $headers["To"] = $email;
    $body = $template->get();
    $host = "mail.vanhlebarsoftware.com";
    $mail_user = "noreply@vanhlebarsoftware.com";
    $password = "Tanis*1973";
    $smtp = Mail::factory('smtp', array('host' => $host, 'auth' => true, 'username' => $mail_user, 'password' => $password));
    $mail = $smtp->send($to, $headers, $body);
    if (PEAR::isError($mail)) {
        echo "<p>" . $mail->getMessage() . "</p>";
    }
}
開發者ID:EABonney,項目名稱:Fitlog,代碼行數:27,代碼來源:createaccount.php

示例2: parseFooter

function parseFooter()
{
    global $_PATHS;
    $objTpl = new HTML_Template_IT($_PATHS['templates']);
    $objTpl->loadTemplatefile("footer.tpl.htm", false, false);
    return $objTpl->get();
}
開發者ID:laiello,項目名稱:punchcms,代碼行數:7,代碼來源:inc.tplparse_foot.php

示例3: buildMenuElement

 /**
  * This function creates a HTML-block for a menu item.
  *
  * @access public
  * @author k
  * @param MenuElement $parameters['menuElement']
  *        	the menu element
  * @param string $parameters['type']
  *        	the type
  * @see MenuElement::$type
  * @uses Error for error handling
  * @uses ErrorView for error handling
  * @uses MENU_COMMON for the common menu
  * @uses MENU_SIDE for the menu in sidebar
  */
 public static function buildMenuElement($parameters)
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT(ROOT_FOLDER . 'html');
     $tpl->loadTemplatefile('particle-template.html');
     switch ($parameters['type']) {
         case MENU_COMMON:
             $tpl->setCurrentBlock('item-in-common-menu');
             $tpl->setVariable(array('HREF-OF-ITEM-IN-COMMON-MENU' => null === $parameters['menuElement']->getHref() ? $parameters['menuElement']->translate(array('property' => 'href', 'isSlug' => true)) : $parameters['menuElement']->getHref(), 'LABEL-OF-ITEM-IN-COMMON-MENU' => $parameters['menuElement']->translate(array('property' => 'label'))));
             $tpl->parse('item-in-common-menu');
             // echo ' 38: ', $tpl->get('menu-item');
             return $tpl->get('item-in-common-menu');
             break;
         case MENU_SIDE:
             $tpl->setCurrentBlock('item-in-menu-in-sidebar');
             $tpl->setVariable(array('HREF-OF-ITEM-IN-MENU-IN-SIDEBAR' => null === $parameters['menuElement']->getHref() ? $parameters['menuElement']->translate(array('property' => 'href', 'isSlug' => true)) : $parameters['menuElement']->getHref(), 'LABEL-OF-ITEM-IN-MENU-IN-SIDEBAR' => $parameters['menuElement']->translate(array('property' => 'label'))));
             $tpl->parse('item-in-menu-in-sidebar');
             return $tpl->get('item-in-menu-in-sidebar');
             break;
         default:
             require_once dirname(__FILE__) . '/Error.php';
             $error = new Error();
             $error->setMessage(\pstk\String::translate('errorWhichMenu'));
             require_once dirname(__FILE__) . '/ErrorView.php';
             ErrorView::raiseError($error);
     }
 }
開發者ID:piiskop,項目名稱:pstk,代碼行數:42,代碼來源:MenuElementView.php

示例4: buildPersonView

 function buildPersonView($parameters)
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT(dirname(__FILE__) . '/');
     $tpl->loadTemplatefile('persons.html');
     $tpl->parse('persons');
     return $tpl->get('persons');
 }
開發者ID:piiskop,項目名稱:pstk,代碼行數:8,代碼來源:PersonView.php

示例5: executeUpdateScript

function executeUpdateScript(HTML_Template_IT &$objTpl)
{
    if (!verifyVersion($GLOBALS["_CONF"]["app"]["version"])) {
        $objTpl->setCurrentBlock("update");
        $objTpl->setVariable("VERSION", $GLOBALS["_CONF"]["app"]["version"]);
        $objTpl->parseCurrentBlock();
    }
}
開發者ID:laiello,項目名稱:punchcms,代碼行數:8,代碼來源:inc.verify_version.php

示例6: buildHeader

 /**
  * This function builds the header.
  * 
  * @access public
  * @author kalmer
  * @return string
  */
 public static function buildHeader()
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT(dirname(__FILE__) . '/../html');
     $tpl->loadTemplatefile('header.html');
     $tpl->touchBlock('header');
     $tpl->parse('header');
     return $tpl->get('header');
 }
開發者ID:piiskop,項目名稱:pstk,代碼行數:16,代碼來源:HeaderView.php

示例7: GetLoggedOutPage

function GetLoggedOutPage()
{
    $tpl = new HTML_Template_IT("./");
    $tpl->loadTemplatefile("loggedout.tpl.html", true, true);
    SetCommonLoginStatus($tpl);
    SetCommonToolbar($tpl);
    SetCommonFooter($tpl);
    // return the output
    return $tpl->get();
}
開發者ID:amjadtbssm,項目名稱:website,代碼行數:10,代碼來源:loggedout.php

示例8: GetLoginFailedPage

function GetLoginFailedPage()
{
    $tpl = new HTML_Template_IT("./");
    $tpl->loadTemplatefile("loginfailed.tpl.html", true, false);
    SetCommonLoginStatus($tpl);
    SetCommonToolbar($tpl);
    SetCommonFooter($tpl);
    // print the output
    return $tpl->get();
}
開發者ID:amjadtbssm,項目名稱:website,代碼行數:10,代碼來源:loginfailed.php

示例9: GetNotAPowerUserPage

function GetNotAPowerUserPage()
{
    $tpl = new HTML_Template_IT("./");
    $tpl->loadTemplatefile("not_a_power_user.tpl.html", true, false);
    SetCommonLoginStatus($tpl);
    SetAdminToolbar($tpl);
    SetCommonFooter($tpl);
    // print the output
    return $tpl->get();
}
開發者ID:amjadtbssm,項目名稱:website,代碼行數:10,代碼來源:not_a_power_user.php

示例10: GetNotAllowedPage

function GetNotAllowedPage($reason)
{
    $tpl = new HTML_Template_IT("./");
    $tpl->loadTemplatefile("not_allowed.tpl.html", true, false);
    SetCommonLoginStatus($tpl);
    SetAdminToolbar($tpl);
    SetCommonFooter($tpl);
    $tpl->SetVariable("REASON", $reason);
    // print the output
    return $tpl->get();
}
開發者ID:amjadtbssm,項目名稱:website,代碼行數:11,代碼來源:not_allowed.php

示例11: GetLoginSuccessfulPage

function GetLoginSuccessfulPage($originPage)
{
    $tpl = new HTML_Template_IT("./");
    $tpl->loadTemplatefile("loginsuccessful.tpl.html", true, true);
    SetCommonLoginStatus($tpl);
    SetCommonToolbar($tpl);
    SetCommonFooter($tpl);
    $tpl->setVariable("USERNAME", GetLoggedUserName());
    $tpl->setVariable("ORIGIN_PAGE", $originPage);
    // print the output
    return $tpl->get();
}
開發者ID:amjadtbssm,項目名稱:website,代碼行數:12,代碼來源:loginsuccessful.php

示例12: GetNoAccessToProjectPage

function GetNoAccessToProjectPage($projectId)
{
    $tpl = new HTML_Template_IT("./");
    $tpl->loadTemplatefile("no_access_to_project.tpl.html", true, false);
    SetCommonLoginStatus($tpl);
    SetAdminToolbar($tpl);
    SetCommonFooter($tpl);
    $projectInfos = GetProjectInfos($projectId);
    $tpl->setVariable("PROJECT_NAME", $projectInfos["Name"]);
    // print the output
    return $tpl->get();
}
開發者ID:amjadtbssm,項目名稱:website,代碼行數:12,代碼來源:no_access_to_project.php

示例13: GetAskLoginPage

function GetAskLoginPage()
{
    global $lastLoginResult;
    $tpl = new HTML_Template_IT("./");
    $tpl->loadTemplatefile("ask_login.tpl.html", true, true);
    $msg = "";
    if ($lastLoginResult != LLR_NOT_LOGGED_IN) {
        $msg = LastLoginResultMessage();
    }
    $tpl->setVariable("MESSAGE", $msg);
    // print the output
    return $tpl->get();
}
開發者ID:amjadtbssm,項目名稱:website,代碼行數:13,代碼來源:ask_login.php

示例14: showLoginForm

function showLoginForm($liveUserObj = false)
{
    include_once 'HTML/Template/IT.php';
    $tpl = new HTML_Template_IT();
    $tpl->loadTemplatefile('loginform.tpl.php');
    $tpl->setVariable('form_action', $_SERVER['PHP_SELF']);
    if (is_object($liveUserObj)) {
        if ($liveUserObj->status) {
            switch ($liveUserObj->status) {
                case LIVEUSER_STATUS_ISINACTIVE:
                    $tpl->touchBlock('inactive');
                    break;
                case LIVEUSER_STATUS_IDLED:
                    $tpl->touchBlock('idled');
                    break;
                case LIVEUSER_STATUS_EXPIRED:
                    $tpl->touchBlock('expired');
                    break;
                default:
                    $tpl->touchBlock('failure');
                    break;
            }
        }
    }
    $tpl->show();
    exit;
}
開發者ID:BackupTheBerlios,項目名稱:hem,代碼行數:27,代碼來源:conf.php

示例15: showLoginForm

function showLoginForm(&$liveUserObj)
{
    $tpl = new HTML_Template_IT();
    $tpl->loadTemplatefile('loginform.tpl.php');
    $tpl->setVariable('form_action', $_SERVER['SCRIPT_NAME']);
    if (is_object($liveUserObj)) {
        if ($liveUserObj->getStatus()) {
            switch ($liveUserObj->getStatus()) {
                case LIVEUSER_STATUS_ISINACTIVE:
                    $tpl->touchBlock('inactive');
                    break;
                case LIVEUSER_STATUS_IDLED:
                    $tpl->touchBlock('idled');
                    break;
                case LIVEUSER_STATUS_EXPIRED:
                    $tpl->touchBlock('expired');
                    break;
                default:
                    $tpl->touchBlock('failure');
                    break;
            }
        }
    }
    $tpl->show();
    exit;
}
開發者ID:laiello,項目名稱:coopcrucial,代碼行數:26,代碼來源:conf.php


注:本文中的HTML_Template_IT類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。