本文整理汇总了PHP中AbstractPage类的典型用法代码示例。如果您正苦于以下问题:PHP AbstractPage类的具体用法?PHP AbstractPage怎么用?PHP AbstractPage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AbstractPage类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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));
}
开发者ID:joaocustodio,项目名称:EmuDevstore-1,代码行数:35,代码来源:PHPInfoPage.class.php
示例2: show
/**
* Shows the IP-Adress page.
*/
public function show()
{
// check permission
WCF::getUser()->checkPermission('admin.general.canViewIpAddress');
// show page
parent::show();
}
开发者ID:joaocustodio,项目名称:EmuDevstore-1,代码行数:10,代码来源:IpAddressPage.class.php
示例3: show
/**
* @see Page::show()
*/
public function show()
{
parent::show();
header('Content-Type: application/json');
echo json_encode(array(array('name' => $this->subject, 'type' => 'contestPrice', 'message' => $this->message, 'subject' => $this->subject, 'id' => rand(1, 1000))));
exit;
}
开发者ID:CaribeSoy,项目名称:contest-wcf,代码行数:10,代码来源:ContestPriceObjectsPage.class.php
示例4: show
/**
* @see Page::show()
*/
public function show()
{
parent::show();
if (in_array($this->action, self::$validFunctions)) {
$this->{$this->action}();
}
}
开发者ID:CaribeSoy,项目名称:contest-wcf,代码行数:10,代码来源:UserActionPage.class.php
示例5: show
/**
* @see Page::show()
*/
public function show()
{
// enable menu item
WCFACP::getMenu()->setActiveMenuItem('wcf.acp.menu.link.admintools.phpinfo');
// show page
parent::show();
}
开发者ID:Maggan22,项目名称:wbb3addons,代码行数:10,代码来源:AdminToolsPHPInfoPage.class.php
示例6: 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));
}
开发者ID:ZerGabriel,项目名称:PackageBuilder,代码行数:32,代码来源:IndexPage.class.php
示例7: show
/**
* @see Page::show()
*/
public function show()
{
// enable menu item
WCFACP::getMenu()->setActiveMenuItem('wcf.acp.menu.link.template.view');
// check permission
WCF::getUser()->checkPermission(array('admin.template.canEditTemplate', 'admin.template.canDeleteTemplate'));
parent::show();
}
开发者ID:joaocustodio,项目名称:EmuDevstore-1,代码行数:11,代码来源:TemplateListPage.class.php
示例8: show
/**
* @see Page::show()
*/
public function show()
{
if (!MODULE_CHEAT_DATABASE) {
throw new IllegalLinkException();
}
PageMenu::setActiveMenuItem('wcf.header.menu.cheatDatabase');
parent::show();
}
开发者ID:0xLeon,项目名称:com.leon.pokemon.cheatdatabase.core,代码行数:11,代码来源:CheatDatabaseEntryPage.class.php
示例9: show
/**
* @see Page::show()
*/
public function show()
{
// Set active header menu item
require_once WCF_DIR . 'lib/page/util/menu/PageMenu.class.php';
require_once WCF_DIR . 'lib/page/util/menu/HeaderMenu.class.php';
PageMenu::setActiveMenuItem('wcf.header.menu.aboutmepage');
parent::show();
}
开发者ID:joaocustodio,项目名称:EmuDevstore-1,代码行数:11,代码来源:AboutmePage.class.php
示例10: __construct
public function __construct()
{
parent::__construct();
$columns = array();
$columns[] = new picon\PropertyColumn('Sample Value', 'value');
$provider = new SampleDataProvider();
$this->add(new \picon\DefaultDataTable('table', $provider, $columns));
}
开发者ID:picon,项目名称:picon-framework,代码行数:8,代码来源:DataTablePage.php
示例11: show
/**
* @see Page::show()
*/
public function show()
{
// active default tab
UserCPMenu::getInstance()->setActiveMenuItem('wcf.user.usercp.menu.link.modcp.overview');
// check permission
WCF::getUser()->checkPermission(array('mod.board.canReadDeletedThread', 'mod.board.canEnableThread', 'mod.board.canReadDeletedPost', 'mod.board.canEnablePost'));
parent::show();
}
开发者ID:joaocustodio,项目名称:EmuDevstore-1,代码行数:11,代码来源:ModerationOverviewPage.class.php
示例12: show
/**
* @see Page::show()
*/
public function show()
{
try {
// get attachment from database
$sql = "SELECT\t*\n\t\t\t\tFROM \twcf" . WCF_N . "_attachment\n\t\t\t\tWHERE \tattachmentID = " . $this->attachmentID . " \n\t\t\t\t\tAND packageID IN (\n\t\t\t\t\t\tSELECT\tdependency\n\t\t\t\t\t\tFROM\twcf" . WCF_N . "_package_dependency\n\t\t\t\t\t\tWHERE\tpackageID = " . PACKAGE_ID . "\n\t\t\t\t\t)";
$this->attachment = WCF::getDB()->getFirstRow($sql);
// check attachment id
if (!isset($this->attachment['attachmentID'])) {
throw new IllegalLinkException();
}
// check thumbnail status
if ($this->thumbnail && !$this->attachment['thumbnailType']) {
throw new IllegalLinkException();
}
parent::show();
// reset URI in session
if ($this->thumbnail && WCF::getSession()->lastRequestURI) {
WCF::getSession()->setRequestURI(WCF::getSession()->lastRequestURI);
}
// update download count
if (!$this->thumbnail) {
$sql = "UPDATE\twcf" . WCF_N . "_attachment\n\t\t\t\t\tSET\tdownloads = downloads + 1,\n\t\t\t\t\t\tlastDownloadTime = " . TIME_NOW . "\n\t\t\t\t\tWHERE\tattachmentID = " . $this->attachmentID;
WCF::getDB()->registerShutdownUpdate($sql);
}
// send headers
// file type
$mimeType = $this->thumbnail ? $this->attachment['thumbnailType'] : $this->attachment['fileType'];
if ($mimeType == 'image/x-png') {
$mimeType = 'image/png';
}
@header('Content-Type: ' . $mimeType);
// file name
@header('Content-disposition: ' . (!in_array($mimeType, self::$inlineMimeTypes) ? 'attachment; ' : 'inline; ') . 'filename="' . $this->attachment['attachmentName'] . '"');
// send file size
@header('Content-Length: ' . ($this->thumbnail ? $this->attachment['thumbnailSize'] : $this->attachment['attachmentSize']));
// no cache headers
if (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443) {
// internet explorer doesn't cache files downloaded from a https website, if 'Pragma: no-cache' was sent
// @see http://support.microsoft.com/kb/316431/en
@header('Pragma: public');
} else {
@header('Pragma: no-cache');
}
@header('Expires: 0');
// show attachment
readfile(WCF_DIR . 'attachments/' . ($this->thumbnail ? 'thumbnail' : 'attachment') . '-' . $this->attachment['attachmentID']);
exit;
} catch (Exception $e) {
if ($this->embedded == 1) {
@header('Content-Type: image/png');
@header('Content-disposition: filename="imageNoPermissionL.png"');
readfile(WCF_DIR . 'icon/imageNoPermissionL.png');
exit;
} else {
throw $e;
}
}
}
开发者ID:joaocustodio,项目名称:EmuDevstore-1,代码行数:61,代码来源:AttachmentPage.class.php
示例13: show
/**
* @see Page::show()
*/
public function show()
{
// check user
if (!WCF::getUser()->userID) {
require_once WCF_DIR . 'lib/system/exception/PermissionDeniedException.class.php';
throw new PermissionDeniedException();
}
parent::show();
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:12,代码来源:OverviewPage.class.php
示例14: __construct
public function __construct()
{
parent::__construct();
$self = $this;
$this->add(new Link('login', function () use($self) {
$_SESSION['auth'] = true;
$self->setPage(HomePage::getIdentifier());
}));
}
开发者ID:picon,项目名称:picon-framework,代码行数:9,代码来源:LoginPage.php
示例15: show
/**
* @see Page::show();
*/
public function show()
{
$this->user->checkPermission('user.source.general.canViewSources');
parent::show();
WCF::getCache()->addResource('update-' . $this->source->sourceID . '-' . $this->type, PB_DIR . 'cache/cache.update-' . $this->source->sourceID . '-' . $this->type . '.php', PB_DIR . 'lib/system/cache/CacheBuilderUpdateServer.class.php', 0, 3600);
@header('Content-Type: text/xml');
echo WCF::getCache()->get('update-' . $this->source->sourceID . '-' . $this->type);
exit;
}
开发者ID:ZerGabriel,项目名称:PackageBuilder,代码行数:12,代码来源:UpdateServerPage.class.php
示例16: show
/**
* @see Page::show
*/
public function show()
{
// check user
if (!WCF::getUser()->userID) {
message('Zutritt nicht erlaubt!');
}
parent::show();
echo_foot();
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:12,代码来源:LinkListPage.class.php
示例17: show
/**
* @see Page::show()
*/
public function show()
{
// permission
WCF::getUser()->checkPermission('admin.system.adminTools.canView');
// enable menu item
WCFACP::getMenu()->setActiveMenuItem('wcf.acp.menu.link.adminTools');
// show page
parent::show();
}
开发者ID:Maggan22,项目名称:wbb3addons,代码行数:12,代码来源:AdminToolsLinkPage.class.php
示例18: show
/**
* @see Page::show()
*/
public function show()
{
// set active menu item
WCFACP::getMenu()->setActiveMenuItem('wcf.acp.menu.link.autoupdate');
// check permission
WCF::getUser()->checkPermission('admin.system.package.canUpdatePackage');
// check master password
WCFACP::checkMasterPassword();
parent::show();
}
开发者ID:CaribeSoy,项目名称:contest-wcf,代码行数:13,代码来源:PackageAutoUpdateListPage.class.php
示例19:
function __construct()
{
global $USER;
parent::__construct();
$this->hasAlliance = $USER['ally_id'] != 0;
$this->hasApply = $this->isApply();
if ($this->hasAlliance && !$this->hasApply) {
$this->setAllianceData($USER['ally_id']);
}
}
开发者ID:fuding,项目名称:Antaris,代码行数:10,代码来源:class.ShowAlliancePage.php
示例20: show
/**
* @see Page::show()
*/
public function show()
{
// set active menu item
require_once WCF_DIR . 'lib/page/util/menu/PageMenu.class.php';
PageMenu::setActiveMenuItem('wcf.header.menu.versionChecker');
// check permission
WCF::getUser()->checkPermission('user.managepages.canViewversionChecker');
// show form
parent::show();
}
开发者ID:Maggan22,项目名称:wbb3addons,代码行数:13,代码来源:VersionCheckerPage.class.php
注:本文中的AbstractPage类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论