本文整理汇总了PHP中AbstractPage::show方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractPage::show方法的具体用法?PHP AbstractPage::show怎么用?PHP AbstractPage::show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AbstractPage
的用法示例。
在下文中一共展示了AbstractPage::show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show
/**
* Shows the IP-Adress page.
*/
public function show()
{
// check permission
WCF::getUser()->checkPermission('admin.general.canViewIpAddress');
// show page
parent::show();
}
示例2: 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;
}
示例3: show
/**
* @see Page::show()
*/
public function show()
{
parent::show();
if (in_array($this->action, self::$validFunctions)) {
$this->{$this->action}();
}
}
示例4: show
/**
* @see Page::show()
*/
public function show()
{
// enable menu item
WCFACP::getMenu()->setActiveMenuItem('wcf.acp.menu.link.admintools.phpinfo');
// show page
parent::show();
}
示例5: 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();
}
示例6: 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();
}
示例7: show
/**
* @see Page::show()
*/
public function show()
{
if (!MODULE_CHEAT_DATABASE) {
throw new IllegalLinkException();
}
PageMenu::setActiveMenuItem('wcf.header.menu.cheatDatabase');
parent::show();
}
示例8: 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();
}
示例9: show
/**
* @see Page::show()
*/
public function show()
{
require_once WCF_DIR . 'lib/page/util/menu/PageMenu.class.php';
if (PageMenu::getActiveMenuItem() == '') {
PageMenu::setActiveMenuItem('bash.header.menu.bestBashEntries');
}
parent::show();
}
示例10: 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;
}
}
}
示例11: 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();
}
示例12: show
/**
* @see Page::show
*/
public function show()
{
// check user
if (!WCF::getUser()->userID) {
message('Zutritt nicht erlaubt!');
}
parent::show();
echo_foot();
}
示例13: 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();
}
示例14: 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;
}
示例15: 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();
}