本文整理汇总了PHP中AbstractPage::assignVariables方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractPage::assignVariables方法的具体用法?PHP AbstractPage::assignVariables怎么用?PHP AbstractPage::assignVariables使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AbstractPage
的用法示例。
在下文中一共展示了AbstractPage::assignVariables方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: assignVariables
/**
* @see Page::assignVariables()
*/
public function assignVariables()
{
parent::assignVariables();
// get phpinfo() output
ob_start();
phpinfo();
$info = ob_get_contents();
ob_end_clean();
// parse output
$info = preg_replace('%^.*<body>(.*)</body>.*$%s', '$1', $info);
// style fixes
// remove first table
$info = preg_replace('%<table.*?</table><br />%s', '', $info, 1);
// fix tables
$info = preg_replace('%<h2>(.*?)</h2>\\s*<table border="0" cellpadding="3" width="600">%', '<div class="border titleBarPanel"><div class="containerHead"><h3>\\1</h3></div></div><div class="border borderMarginRemove"><table class="tableList">', $info);
$info = preg_replace('%<table border="0" cellpadding="3" width="600">%', '<div class="border titleBarPanel"><table class="tableList">', $info);
$info = str_replace('</table>', '</table></div>', $info);
$info = str_replace('<tr class="h">', '<thead><tr class="tableHead">', $info);
$info = str_replace('</th></tr>', '</th></tr></thead>', $info);
$info = preg_replace('%</td></tr>%', '</th></tr></thead>', $info, 1);
$info = str_replace('<tr class="tableHead"><td>', '<tr class="tableHead"><th>', $info);
$info = preg_replace('%<th(\\s+.*?)?>%', '<th\\1><div><span class="emptyHead">', $info);
$info = str_replace('</th>', '</span></div></th>', $info);
// fix row colors
$info = preg_replace_callback('%<tr>%', array($this, 'insertRowColorsCallback'), $info);
// h1, h2 fixes
$info = str_replace('</h2>', '</h3>', $info);
$info = str_replace('<h2>', '<h3>', $info);
$info = str_replace('</h1>', '</h2>', $info);
$info = str_replace('<h1', '<h2', $info);
WCF::getTPL()->assign(array('phpInfo' => $info));
}
示例2: assignVariables
/**
* @see Page::assignVariables()
*/
public function assignVariables()
{
parent::assignVariables();
if (empty($this->disabledFunctions) && empty($this->recommendFunctions)) {
$functionErrorType = 'success';
} else {
if (empty($this->disabledFunctions)) {
$functionErrorType = 'warning';
} else {
$functionErrorType = 'error';
}
}
$functions = array();
foreach ($this->disabledFunctions as $key => $val) {
if (isset($this->recommendFunctions[$key])) {
$functions[$key] = array_merge($this->disabledFunctions[$key], $this->recommendFunctions[$key]);
} else {
$functions[$key] = $this->disabledFunctions[$key];
}
}
foreach ($this->recommendFunctions as $key => $val) {
if (isset($this->disabledFunctions[$key])) {
$functions[$key] = array_merge($this->disabledFunctions[$key], $this->recommendFunctions[$key]);
} else {
$functions[$key] = $this->recommendFunctions[$key];
}
}
WCF::getTPL()->assign(array('disabledFunctions' => $functions, 'functionErrorType' => $functionErrorType, 'size' => $this->size));
}
示例3: assignVariables
/**
* @see Page::assignVariables()
*/
public function assignVariables()
{
parent::assignVariables();
if ($this->target == '_iframe') {
$this->iFrame = AdminTools::getIframeSettings();
}
WCF::getTPL()->assign(array('wbbExists' => AdminTools::wbbExists(), 'url' => $this->url, 'target' => $this->target, 'iFrame' => $this->iFrame));
}
示例4: assignVariables
/**
* @see Form::assignVariables()
*/
public function assignVariables()
{
parent::assignVariables();
// display branding
require_once WCF_DIR . 'lib/util/ContestUtil.class.php';
ContestUtil::assignVariablesBranding();
$this->sidebar->assignVariables();
WCF::getTPL()->assign(array('entry' => $this->entry, 'contestID' => $this->contestID, 'templateName' => $this->templateName, 'allowSpidersToIndexThisPage' => true, 'contestmenu' => ContestMenu::getInstance()));
}
示例5: assignVariables
/**
* @see Page::assignVariables()
*/
public function assignVariables() {
parent::assignVariables();
$this->frame->assignVariables();
WCF::getTPL()->assign(array(
'page' => $this->page
));
}
示例6: assignVariables
/**
* @see Page::assignVariables()
*/
public function assignVariables()
{
parent::assignVariables();
// disk space in GB
$di = AdminTools::getDiskInfo();
if (is_array($di) && count($di)) {
$totalSpace = StringUtil::formatNumeric($di['TOTAL_SPACE']) . ' GB';
$freeSpace = StringUtil::formatNumeric($di['FREE_SPACE']) . ' GB (' . StringUtil::formatNumeric($di['FREE_QUOTA']) . '%)';
$usedSpace = StringUtil::formatNumeric($di['USED_SPACE']) . ' GB (' . StringUtil::formatNumeric($di['USED_QUOTA']) . '%)';
$this->diskInfo = WCF::getLanguage()->get('wcf.acp.adminTools.diskInfo', array('$totalSpace' => $totalSpace, '$freeSpace' => $freeSpace, '$usedSpace' => $usedSpace));
}
WCF::getTPL()->assign(array('wbbExists' => AdminTools::wbbExists(), 'atPHP' => AdminTools::parsePHPConfig(), 'diskInfo' => $this->diskInfo));
}
示例7: assignVariables
/**
* @see Page::assignVariables();
*/
public function assignVariables()
{
parent::assignVariables();
$this->renderBoards();
if (MODULE_TAGGING && THREAD_ENABLE_TAGS && INDEX_ENABLE_TAGS) {
$this->readTags();
}
if (INDEX_ENABLE_STATS) {
$this->renderStats();
}
if (MODULE_USERS_ONLINE && INDEX_ENABLE_ONLINE_LIST) {
$this->renderOnlineList();
}
WCF::getTPL()->assign(array('selfLink' => 'index.php?page=Index' . SID_ARG_2ND_NOT_ENCODED, 'allowSpidersToIndexThisPage' => true, 'tags' => $this->tags));
if (WCF::getSession()->spiderID) {
if ($lastChangeTime = @filemtime(WBB_DIR . 'cache/cache.stat.php')) {
@header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $lastChangeTime) . ' GMT');
}
}
}
示例8: assignVariables
/**
* @see Page::assignVariables()
*/
public function assignVariables()
{
parent::assignVariables();
WCF::getTPL()->assign(array('alliance' => $this->alliance, 'leader' => new LWUser($this->alliance->ally_owner), 'applicationsCount' => $this->applicationsCount));
}
示例9: assignVariables
/**
* @see Page::assignVariables()
*/
public function assignVariables()
{
parent::assignVariables();
WCF::getTPL()->assign(array('headerMenuItemList' => $this->headerMenuItemList, 'footerMenuItemList' => $this->footerMenuItemList, 'deletedPageMenuItemID' => $this->deletedPageMenuItemID, 'successfullSorting' => $this->successfullSorting));
}
示例10: assignVariables
public function assignVariables()
{
parent::assignVariables();
WCF::getTPL()->assign(array('entry' => $this->entry, 'sidebarFactory' => $this->sidebarFactory));
}
示例11: assignVariables
/**
* @see Page::assignVariables()
*/
public function assignVariables()
{
parent::assignVariables();
WCF::getTPL()->assign(array('ovents' => $this->ovents, 'hovents' => $this->hovents, 'news' => $this->news));
}
示例12: assignVariables
/**
* @see Page::assignVariables()
*/
public function assignVariables()
{
parent::assignVariables();
WCF::getTPL()->assign(array('languageCode' => $this->languageCode, 'availableLanguages' => $this->availableLanguages, 'licenseText' => $this->licenseTexts[$this->languageCode], 'package' => $this->package));
}
示例13: assignVariables
/**
* @see Page::assignVariables()
*/
public function assignVariables()
{
parent::assignVariables();
WCF::getTPL()->assign(array('deletedThreads' => $this->deletedThreads, 'hiddenThreads' => $this->hiddenThreads, 'markedThreads' => $this->markedThreads, 'deletedPosts' => $this->deletedPosts, 'hiddenPosts' => $this->hiddenPosts, 'markedPosts' => $this->markedPosts, 'reports' => $this->reports));
}
示例14: assignVariables
/**
* @see Page::assignVariables()
*/
public function assignVariables()
{
parent::assignVariables();
WCF::getTPL()->assign(array('memberships' => $this->memberships, 'openGroups' => $this->openGroups, 'applications' => $this->applications, 'groupLeaders' => $this->groupLeaders));
}
示例15: assignVariables
/**
* @see Page::assignVariables()
*/
public function assignVariables()
{
parent::assignVariables();
WCF::getTPL()->assign(array('comments' => $this->comments));
}