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


PHP TPage::getLoadedCSS方法代碼示例

本文整理匯總了PHP中TPage::getLoadedCSS方法的典型用法代碼示例。如果您正苦於以下問題:PHP TPage::getLoadedCSS方法的具體用法?PHP TPage::getLoadedCSS怎麽用?PHP TPage::getLoadedCSS使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TPage的用法示例。


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

示例1: run

 public static function run($debug = FALSE)
 {
     $class = isset($_REQUEST['class']) ? $_REQUEST['class'] : '';
     $static = isset($_REQUEST['static']) ? $_REQUEST['static'] : '';
     $method = isset($_REQUEST['method']) ? $_REQUEST['method'] : '';
     $content = '';
     set_error_handler(array('TCoreApplication', 'errorHandler'));
     if (class_exists($class)) {
         if ($static) {
             $rf = new ReflectionMethod($class, $method);
             if ($rf->isStatic()) {
                 call_user_func(array($class, $method), $_REQUEST);
             } else {
                 call_user_func(array(new $class(), $method), $_REQUEST);
             }
         } else {
             try {
                 $page = new $class($_GET);
                 ob_start();
                 $page->show($_GET);
                 $content = ob_get_contents();
                 ob_end_clean();
             } catch (Exception $e) {
                 ob_start();
                 if ($debug) {
                     new TExceptionView($e);
                     $content = ob_get_contents();
                 } else {
                     new TMessage('error', $e->getMessage());
                     $content = ob_get_contents();
                 }
                 ob_end_clean();
             }
         }
     } else {
         if (function_exists($method)) {
             call_user_func($method, $_REQUEST);
         } else {
             new TMessage('error', "<b>Error</b>: class <b><i><u>{$class}</u></i></b> not found");
         }
     }
     if (!$static) {
         echo TPage::getLoadedCSS();
     }
     echo TPage::getLoadedJS();
     echo $content;
 }
開發者ID:jhonleandres,項目名稱:crmbf,代碼行數:47,代碼來源:TCoreApplication.class.php

示例2: run

 public static function run($debug = FALSE)
 {
     new TSession();
     $lang = TSession::getValue('language') ? TSession::getValue('language') : 'en';
     TAdiantiCoreTranslator::setLanguage($lang);
     TApplicationTranslator::setLanguage($lang);
     if ($_REQUEST) {
         $class = isset($_REQUEST['class']) ? $_REQUEST['class'] : '';
         if (!TSession::getValue('logged') and $class !== 'LoginForm') {
             echo TPage::getLoadedCSS();
             echo TPage::getLoadedJS();
             new TMessage('error', 'Not logged');
             return;
         }
         parent::run($debug);
     }
 }
開發者ID:jfrank1500,項目名稱:curso_php,代碼行數:17,代碼來源:engine.php

示例3: TSession

require_once 'init.php';
$theme = 'frontend';
new TSession();
if (TSession::getValue('logged')) {
    $content = file_get_contents("app/templates/{$theme}/layoutManual.html");
} else {
    $content = file_get_contents("app/templates/{$theme}/login.html");
}
$content = str_replace('{LIBRARIES}', file_get_contents("app/templates/{$theme}/libraries.html"), $content);
$content = str_replace('{class}', isset($_REQUEST['class']) ? $_REQUEST['class'] : '', $content);
$content = str_replace('{template}', $theme, $content);
$content = str_replace('{username}', TSession::getValue('username'), $content);
$content = str_replace('{frontpage}', TSession::getValue('frontpage'), $content);
$content = str_replace('{query_string}', $_SERVER["QUERY_STRING"], $content);
$css = TPage::getLoadedCSS();
$js = TPage::getLoadedJS();
$content = str_replace('{HEAD}', $css . $js, $content);
if (isset($_REQUEST['changeContent'])) {
    $contenToChange = $_REQUEST['changeContent'];
    switch ($contenToChange) {
        case 'clients':
            $insideContent = file_get_contents("app/resources/manual/clients.html");
            break;
        case 'calendar':
            $insideContent = file_get_contents("app/resources/manual/calendar.html");
            break;
        case 'notes':
            $insideContent = file_get_contents("app/resources/manual/notes.html");
            break;
        case 'stock':
開發者ID:kiibe,項目名稱:linkERP,代碼行數:30,代碼來源:indexManual.php


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