本文整理汇总了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;
}
示例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);
}
}
示例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':