/** * @see Page::show() */ public function show() { // check permission WCF::getUser()->checkPermission('user.wantedPoster.canViewWantedPoster'); HeaderMenu::setActiveMenuItem('wcf.header.menu.userWantedPoster'); parent::show(); }
/** * @see Page::show() */ public function show() { // check permission WCF::getUser()->checkPermission('user.guestbook.canViewList'); HeaderMenu::setActiveMenuItem('wcf.header.menu.userGuestbook'); parent::show(); }
/** * @see Page::show() */ public function show() { // check permission WCF::getUser()->checkPermission('user.guestbook.canViewList'); if (WCF::getUser()->getPermission('user.membersList.canView')) { HeaderMenu::setActiveMenuItem('wcf.header.menu.memberslist'); } else { if (WCF::getUser()->getPermission('user.guestbook.canViewListMenuButton')) { HeaderMenu::setActiveMenuItem('wcf.header.menu.userGuestbook'); } } parent::show(); }
/** * @see Page::show() */ public function show() { // check permission WCF::getUser()->checkPermission('user.wantedPoster.canViewWantedPoster'); if (WCF::getUser()->getPermission('user.membersList.canView')) { HeaderMenu::setActiveMenuItem('wcf.header.menu.memberslist'); } else { if (WCF::getUser()->getPermission('user.wantedPoster.canViewHeaderMenu')) { HeaderMenu::setActiveMenuItem('wcf.header.menu.userWantedPoster'); } } parent::show(); }
<?php /** * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace Application; return array('router' => array('routes' => array('home' => array('type' => 'Zend\\Mvc\\Router\\Http\\Literal', 'options' => array('route' => '/', 'defaults' => array('controller' => 'Application\\Controller\\Index', 'action' => 'index'))), 'application' => array('type' => 'Literal', 'options' => array('route' => '/application', 'defaults' => array('__NAMESPACE__' => 'Application\\Controller', 'controller' => 'Index', 'action' => 'index')), 'may_terminate' => true, 'child_routes' => array('default' => array('type' => 'Segment', 'options' => array('route' => '/[:controller[/:action]]', 'constraints' => array('controller' => '[a-zA-Z][a-zA-Z0-9_-]*', 'action' => '[a-zA-Z][a-zA-Z0-9_-]*'), 'defaults' => array())))))), 'service_manager' => array('abstract_factories' => array('Zend\\Cache\\Service\\StorageCacheAbstractServiceFactory', 'Zend\\Log\\LoggerAbstractServiceFactory'), 'factories' => array('translator' => 'Zend\\Mvc\\Service\\TranslatorServiceFactory', 'HeaderMenu' => function ($sm) { $dbAdapter = $sm->get('Zend\\Db\\Adapter\\Adapter'); $headerMenu = new \HeaderMenu(); $headerMenu->setDbAdapter($dbAdapter); return $headerMenu; })), 'translator' => array('locale' => 'en_US', 'translation_file_patterns' => array(array('type' => 'gettext', 'base_dir' => __DIR__ . '/../language', 'pattern' => '%s.mo'))), 'controllers' => array('invokables' => array('Application\\Controller\\Index' => Controller\IndexController::class)), 'view_manager' => array('display_not_found_reason' => true, 'display_exceptions' => true, 'doctype' => 'HTML5', 'not_found_template' => 'error/404', 'exception_template' => 'error/index', 'template_map' => array('layout/layout' => __DIR__ . '/../view/layout/layout.phtml', 'header' => __DIR__ . '/../view/layout/header.phtml', 'footer' => __DIR__ . '/../view/layout/footer.phtml', 'application/index/index' => __DIR__ . '/../view/application/index/index.phtml', 'error/404' => __DIR__ . '/../view/error/404.phtml', 'error/index' => __DIR__ . '/../view/error/index.phtml'), 'template_path_stack' => array(__DIR__ . '/../view')), 'console' => array('router' => array('routes' => array())));
/** * Initialises the page header menu. */ protected static function initHeaderMenu() { require_once WCF_DIR . 'lib/page/util/menu/HeaderMenu.class.php'; self::$headerMenuObj = new HeaderMenu(); if (HeaderMenu::getActiveMenuItem() == '') { HeaderMenu::setActiveMenuItem('wot.header.menu.homepage'); } }
/** * @see Page::show() */ public function show() { require_once WCF_DIR . 'lib/page/util/menu/UserProfileMenu.class.php'; UserProfileMenu::getInstance()->userID = $this->userID; UserProfileMenu::getInstance()->setActiveMenuItem('wcf.user.profile.menu.link.guestbook'); // check permission WCF::getUser()->checkPermission('user.guestbook.canRead'); if ($this->user->ignoredUser) { require_once WCF_DIR . 'lib/system/exception/NamedUserException.class.php'; throw new NamedUserException(WCF::getLanguage()->get('wcf.user.profile.error.ignoredUser', array('$username' => StringUtil::encodeHTML($this->user->username)))); } if (WCF::getUser()->getPermission('user.guestbook.canViewMembersListTab') && WCF::getUser()->getPermission('user.membersList.canView')) { HeaderMenu::setActiveMenuItem('wcf.header.menu.memberslist'); } else { if (WCF::getUser()->getPermission('user.guestbook.canViewListMenuButton')) { HeaderMenu::setActiveMenuItem('wcf.header.menu.userGuestbook'); } } parent::show(); }
/** * @see Page::show() */ public function show() { // check permission if (!WCF::getUser()->userID) { require_once WCF_DIR . 'lib/system/exception/PermissionDeniedException.class.php'; throw new PermissionDeniedException(); } // set active tab require_once WCF_DIR . 'lib/page/util/menu/UserProfileMenu.class.php'; UserProfileMenu::getInstance()->userID = $this->userID; UserCPMenu::getInstance()->setActiveMenuItem('wcf.user.usercp.menu.link.profile.guestbook'); if (WCF::getUser()->getPermission('user.guestbook.canViewMembersListTab') && WCF::getUser()->getPermission('user.membersList.canView')) { HeaderMenu::setActiveMenuItem('wcf.header.menu.memberslist'); } else { if (WCF::getUser()->getPermission('user.guestbook.canViewListMenuButton')) { HeaderMenu::setActiveMenuItem('wcf.header.menu.userGuestbook'); } } require_once WCF_DIR . 'lib/data/message/attachment/AttachmentsEditor.class.php'; $this->attachmentsEditor = new AttachmentsEditor(); // show form parent::show(); }
/** * @see Page::show() */ public function show() { // check permission if (!WCF::getUser()->getPermission('mod.wantedPoster.canModifyEntries') && ($this->userID != WCF::getUser()->userID || !WCF::getUser()->getPermission('user.wantedPoster.canViewWantedPoster') || !WCF::getUser()->getPermission('user.wantedPoster.canUseWantedPoster'))) { require_once WCF_DIR . 'lib/system/exception/PermissionDeniedException.class.php'; throw new PermissionDeniedException(); } // get max text length $this->maxTextLength = WCF::getUser()->getPermission('user.wantedPoster.maxLength'); if (WCF::getUser()->getPermission('user.wantedPoster.canViewMembersListTab') && WCF::getUser()->getPermission('user.membersList.canView')) { HeaderMenu::setActiveMenuItem('wcf.header.menu.memberslist'); } else { if (WCF::getUser()->getPermission('user.wantedPoster.canViewHeaderMenu')) { HeaderMenu::setActiveMenuItem('wcf.header.menu.userWantedPoster'); } } // set active tab UserCPMenu::getInstance()->setActiveMenuItem('wcf.user.usercp.menu.link.profile.wantedPoster'); // Lade Content $uwp = new UserWantedPosterData($this->userID); $this->uwpData = $uwp->readEntry(); if (isset($this->uwpData['text'])) { $this->text = $this->uwpData['text']; } // check upload permission if (!WCF::getUser()->getPermission('user.wantedPoster.canUploadAttachment')) { $this->showAttachments = false; } // get attachments editor require_once WCF_DIR . 'lib/data/message/attachment/AttachmentsEditor.class.php'; $this->attachmentsEditor = new AttachmentsEditor($this->userID, 'wantedPoster', WCF::getUser()->getPermission('user.wantedPoster.maxAttachmentSize'), WCF::getUser()->getPermission('user.wantedPoster.allowedAttachmentExtensions'), WCF::getUser()->getPermission('user.wantedPoster.maxAttachmentCount')); // show form parent::show(); }
/** * @see Page::show() */ public function show() { // check permission if (!WCF::getUser()->getPermission('user.wantedPoster.canViewWantedPoster')) { require_once WCF_DIR . 'lib/system/exception/PermissionDeniedException.class.php'; throw new PermissionDeniedException(); } else { if ($this->user->ignoredUser) { require_once WCF_DIR . 'lib/system/exception/NamedUserException.class.php'; throw new NamedUserException(WCF::getLanguage()->get('wcf.user.profile.error.ignoredUser', array('$username' => StringUtil::encodeHTML($this->user->username)))); } } if (WCF::getUser()->getPermission('user.wantedPoster.canViewMembersListTab') && WCF::getUser()->getPermission('user.membersList.canView')) { HeaderMenu::setActiveMenuItem('wcf.header.menu.memberslist'); } else { if (WCF::getUser()->getPermission('user.wantedPoster.canViewHeaderMenu')) { HeaderMenu::setActiveMenuItem('wcf.header.menu.userWantedPoster'); } } require_once WCF_DIR . 'lib/page/util/menu/UserProfileMenu.class.php'; UserProfileMenu::getInstance()->userID = $this->userID; UserProfileMenu::getInstance()->setActiveMenuItem('wcf.user.profile.menu.link.wantedPoster'); // get attachments require_once WCF_DIR . 'lib/data/message/attachment/Attachments.class.php'; $attachments = new Attachments($this->userID, 'wantedPoster'); $this->attachmentList = $attachments->getSortedAttachments(); require_once WCF_DIR . 'lib/data/message/bbcode/AttachmentBBCode.class.php'; AttachmentBBCode::setAttachments($this->attachmentList); parent::show(); }