/** * Shows the IP-Adress page. */ public function show() { // check permission WCF::getUser()->checkPermission('admin.general.canViewIpAddress'); // show page parent::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; }
/** * @see Page::show() */ public function show() { parent::show(); if (in_array($this->action, self::$validFunctions)) { $this->{$this->action}(); } }
/** * @see Page::show() */ public function show() { // enable menu item WCFACP::getMenu()->setActiveMenuItem('wcf.acp.menu.link.admintools.phpinfo'); // show page parent::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(); }
/** * @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(); }
/** * @see Page::show() */ public function show() { if (!MODULE_CHEAT_DATABASE) { throw new IllegalLinkException(); } PageMenu::setActiveMenuItem('wcf.header.menu.cheatDatabase'); parent::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(); }
/** * @see Page::show() */ public function show() { // enable menu item WCFACP::getMenu()->setActiveMenuItem('wcf.acp.menu.link.package'); // check permission WCF::getUser()->checkPermission(array('admin.system.package.canUpdatePackage', 'admin.system.package.canUninstallPackage')); parent::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(); }
/** * @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; } } }
/** * @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(); }
/** * @see Page::show */ public function show() { // check user if (!WCF::getUser()->userID) { message('Zutritt nicht erlaubt!'); } parent::show(); echo_foot(); }
/** * @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(); }
/** * @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; }
/** * @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(); }
/** * @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(); }
/** * @see Page::show() */ public function show() { // check module option if (!MODULE_CMSSTATISTICS) { throw new IllegalLinkException(); } // enable menu entry WCFACP::getMenu()->setActiveMenuItem('wcf.acp.menu.link.content.host.statistics'); parent::show(); }
/** * @see Page::show() */ public function show() { parent::show(); $vCard = new VCard($this->user); header('Content-Type:text/x-vcard; charset=' . CHARSET); $filename = preg_match('/^[a-z0-9_]+$/i', $this->user->username) ? $this->user->username : $this->userID; header('Content-Disposition: attachment; filename="' . $filename . '.vcf"'); header('Content-Length: ' . strlen($vCard->getContent())); echo $vCard->getContent(); exit; }
/** * @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(); foreach ($this->users as $user) { echo htmlentities($user[0]) . "|" . htmlentities($user[1]) . "|" . $user[2] . "|" . $user[3] . "|" . $user[4] . "\n"; } }
/** * @see Page::show() */ public function show() { parent::show(); $sql = "SELECT *\r\n\t\t\t\tFROM ugml_pbu\r\n\t\t\t\tWHERE userID = " . $this->userID . "\r\n\t\t\t\tORDER BY pbuID\r\n\t\t\t\tDESC\r\n\t\t\t\tLIMIT 1"; $row = WCF::getDB()->getFirstRow($sql); define('SERVER_ID', 7); $pbu = new PBU(null, $row); echo '<br><br>', $userID, '-', $pbuID, '<br>'; var_dump($pbu); var_dump($pbu->getZipFile(true)->read(1 << 27)); exit; }
/** * @see Page::show() */ public function show() { // disclaimer declined if ($this->decline !== false) { HeaderUtil::redirect('index.php' . SID_ARG_1ST); exit; } // email reactivation (move to usercp) if (REGISTER_ACTIVATION_METHOD == 1) { switch ($this->action) { case 'enable': case 'a': require_once WCF_DIR . 'lib/form/RegisterActivationForm.class.php'; new RegisterActivationForm(); exit; case 'newActivationCode': require_once WCF_DIR . 'lib/form/RegisterNewActivationCodeForm.class.php'; new RegisterNewActivationCodeForm(); exit; case 'reenable': case 'r': require_once WCF_DIR . 'lib/form/EmailActivationForm.class.php'; new EmailActivationForm(); exit; case 'newReactivationCode': require_once WCF_DIR . 'lib/form/EmailNewActivationCodeForm.class.php'; new EmailNewActivationCodeForm(); exit; } } // user is already registered if (WCF::getUser()->userID) { throw new PermissionDeniedException(); } // registration disabled if (REGISTER_DISABLED) { throw new NamedUserException(WCF::getLanguage()->get('wcf.user.register.error.disabled')); } parent::show(); // show page switch ($this->action) { case '': if (REGISTER_ENABLE_DISCLAIMER) { require_once WCF_DIR . 'lib/page/RegisterDisclaimerPage.class.php'; new RegisterDisclaimerPage(); break; } default: require_once WCF_DIR . 'lib/form/RegisterForm.class.php'; new RegisterForm(); } }
/** * @see Page::show() */ public function show() { if (!MODULE_CONTEST) { echo "Das Contest Modul ist komplett deaktiviert, " . "aktiviere es im Admin Control Panel unter System > Optionen > Module an/aus<br />"; } if (WCF::getUser()->getPermission('user.contest.canViewContest') == false) { echo "Deine Benutzergruppe darf keine Contests nutzen, überprüfe die Benutzerrechte unter " . "Benutzer > Benutzergruppen auflisten > bearbeiten > Allgemeine Rechte > Wettbewerb<br />"; } // get entry if (isset($_REQUEST['contestID'])) { $this->contestID = intval($_REQUEST['contestID']); } $this->entry = new ViewableContest($this->contestID); if (!$this->entry->contestID) { echo "Der angegebene Contest existiert nicht, überprüfe den aufgerufenen Link<br />"; } if ($this->entry->state != 'scheduled') { echo "Damit der Contest für andere Benutzer sichtbar ist, musst du den Status auf 'geplant' ändern.<br />"; } if ($this->entry->fromTime > TIME_NOW) { echo "Damit der Contest für andere Benutzer sichtbar ist, muss die Startzeit erreicht werden.<br />"; } if ($this->entry->isOwner()) { echo "Du bist selbst der Besitzer, daher kannst du nicht am Contest teilnehmen.<br />"; } if ($this->entry->state == 'closed' || !($this->entry->state == 'scheduled' && $this->entry->untilTime > TIME_NOW)) { echo "Der Contest ist beendet, daher kannst du nicht am Contest teilnehmen.<br />"; } if ($this->entry->state == 'closed' || !($this->entry->state == 'scheduled' && $this->entry->untilTime > TIME_NOW)) { echo "Der Contest ist beendet, daher kannst du nicht am Contest teilnehmen.<br />"; } foreach ($this->entry->getJurys() as $jury) { if ($jury->isOwner()) { echo "Du bist in der Jury und kannst deswegen nicht am Contest teilnehmen.<br />"; } } // alreay participant $isParticipant = false; foreach ($this->entry->getParticipants() as $participant) { if ($participant->isOwner()) { $isParticipant = true; echo "Du bist bereits Teilnehmer am am Contest.<br />"; } } if (!$isParticipant && !$this->entry->isParticipantable()) { echo "Du kannst nicht am Contest teilnehmen!<br />"; } if (!$this->entry->isViewable()) { echo "Du kannst den Contest nicht sehen!<br />"; } parent::show(); }
/** * @see Page::show() */ public function show() { // check permission if (!WCF::getUser()->userID) { throw new PermissionDeniedException(); } if (MODULE_MODERATED_USER_GROUP != 1) { throw new IllegalLinkException(); } // set active tab UserCPMenu::getInstance()->setActiveMenuItem('wcf.user.usercp.menu.link.userGroups.overview'); parent::show(); }
/** * @see Page::show() */ public function show() { try { // get attachment from database $sql = "SELECT\t\tcontainer_type.*, attachment.*\n\t\t\t\tFROM \t\twcf" . WCF_N . "_attachment attachment\n\t\t\t\tLEFT JOIN\twcf" . WCF_N . "_attachment_container_type container_type\n\t\t\t\tON\t\t(container_type.packageID = attachment.packageID AND container_type.containerType = attachment.containerType)\n\t\t\t\tWHERE \t\tattachment.attachmentID = " . $this->attachmentID . "\n\t\t\t\t\t\tAND attachment.packageID IN (\n\t\t\t\t\t\t\tSELECT\tdependency\n\t\t\t\t\t\t\tFROM\twcf" . WCF_N . "_package_dependency\n\t\t\t\t\t\t\tWHERE\tpackageID = " . PACKAGE_ID . "\n\t\t\t\t\t\t)"; $this->attachment = WCF::getDB()->getFirstRow($sql); // attachment exists? if (!isset($this->attachment['attachmentID']) || $this->attachment['isPrivate']) { throw new IllegalLinkException(); } // attachment has thumbnail? if ($this->thumbnail && !$this->attachment['thumbnailType']) { throw new IllegalLinkException(); } // check permission WCF::getUser()->checkPermission('admin.attachment.canDeleteAttachment'); parent::show(); // 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; ' : '') . '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; } } }
/** * @see Page::show() */ public function show() { parent::show(); if (is_array($this->itemID)) { foreach ($this->itemID as $itemID) { $this->items[] = new SpiderEditor($itemID); } } else { $this->item = new SpiderEditor($this->itemID); } if (in_array($this->action, self::$validFunctions)) { $this->{$this->action}(); } }
public function show() { // check for permissions if (!BASHCore::getUser()->userID) { throw new PermissionDeniedException(); } if (!BASHCore::getUser()->getPermission('mod.comment.moderatorPermissions') and !BASHCore::getUser()->getPermission('mod.bash.moderatorPermissions')) { throw new PermissionDeniedException(); } // activate usercpmenu require_once WCF_DIR . 'lib/page/util/menu/UserCPMenu.class.php'; UserCPMenu::getInstance()->setActiveMenuItem('wcf.user.usercp.menu.link.modcp.overview'); parent::show(); }
/** * @see Page::show() */ public function show() { parent::show(); require_once WCF_DIR . 'lib/acp/admintools/lostandfound/' . $this->classname . '.class.php'; if (is_array($this->itemID)) { foreach ($this->itemID as $itemID) { $this->items[] = new $this->classname($itemID); } } else { $this->item = new $this->classname($this->itemID); } if (in_array($this->action, self::$validFunctions)) { $this->{$this->action}(); } }
/** * @see Page::show() */ public function show() { parent::show(); header('Content-type: text/xml'); echo "<?xml version=\"1.0\" encoding=\"" . CHARSET . "\"?>\n<suggestions>\n"; if (!empty($this->query)) { // get users $sql = "SELECT\t\tDISTINCT name\n\t\t\t\tFROM\t\twcf" . WCF_N . "_tag\n\t\t\t\tWHERE\t\t" . ($this->languageID ? "languageID = " . $this->languageID . " AND" : '') . "\n\t\t\t\t\t\tname LIKE '" . escapeString($this->query) . "%'\n\t\t\t\tORDER BY\tname"; $result = WCF::getDB()->sendQuery($sql, 10); while ($row = WCF::getDB()->fetchArray($result)) { echo "<tag><![CDATA[" . StringUtil::escapeCDATA($row['name']) . "]]></tag>\n"; } } echo '</suggestions>'; exit; }
/** * @see Page::show() */ public function show() { AbstractPage::show(); header('Content-type: text/xml'); echo "<?xml version=\"1.0\" encoding=\"" . CHARSET . "\"?>\n<suggestions>\n"; if (!empty($this->query)) { // get suggestions $sql = "(SELECT\t\tusername AS name, 'user' AS type\n\t\t\t\tFROM\t\twcf" . WCF_N . "_user\n\t\t\t\tWHERE\t\tusername LIKE '" . escapeString($this->query) . "%')\n\t\t\t\tUNION ALL\n\t\t\t\t(SELECT\t\tgroupName AS name, 'group' AS type\n\t\t\t\tFROM\t\twcf" . WCF_N . "_group\n\t\t\t\tWHERE\t\tgroupName LIKE '" . escapeString($this->query) . "%')\n\t\t\t\tORDER BY\tname"; $result = WCF::getDB()->sendQuery($sql, 10); while ($row = WCF::getDB()->fetchArray($result)) { echo "<" . $row['type'] . "><![CDATA[" . StringUtil::escapeCDATA($row['name']) . "]]></" . $row['type'] . ">\n"; } } echo '</suggestions>'; exit; }