/**
  * Returns an instance of the UserCPMenu class.
  * 
  * @return	UserCPMenu
  */
 public static function getInstance()
 {
     if (self::$instance == null) {
         self::$instance = new UserCPMenu();
     }
     return self::$instance;
 }
 /**
  * @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()
 {
     if (!WCF::getUser()->userID) {
         throw new PermissionDeniedException();
     }
     // set active tab
     UserCPMenu::getInstance()->setActiveMenuItem('wcf.user.usercp.menu.link.management.attachment');
     parent::show();
 }
 /**
  * @see Page::show()
  */
 public function show()
 {
     // active default tab
     UserCPMenu::getInstance()->setActiveMenuItem('wcf.user.usercp.menu.link.modcp.' . $this->action);
     // check permission
     if (!empty($this->neededPermissions)) {
         WCF::getUser()->checkPermission($this->neededPermissions);
     }
     parent::show();
 }
 public function show()
 {
     if (!BASHCore::getUser()->userID) {
         throw new PermissionDeniedException();
     }
     // set active tab
     require_once WCF_DIR . 'lib/page/util/menu/UserCPMenu.class.php';
     UserCPMenu::getInstance()->setActiveMenuItem('wcf.user.usercp.menu.link.management.favorites');
     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();
 }
 /**
  * Sets the active usercp menu item.
  */
 protected function setCategory()
 {
     $category = $this->activeCategory;
     // check category
     if (!isset($this->cachedCategories[$category])) {
         throw new IllegalLinkException();
     }
     // set active tab
     if ($category == 'profile') {
         UserCPMenu::getInstance()->setActiveMenuItem('wcf.user.usercp.menu.link.profile.personalDetails');
     } else {
         UserCPMenu::getInstance()->setActiveMenuItem('wcf.user.option.category.' . $category);
     }
 }
 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()
 {
     if (!WCF::getUser()->userID) {
         throw new PermissionDeniedException();
     }
     if (!MODULE_AVATAR) {
         throw new IllegalLinkException();
     }
     // check permission
     WCF::getUser()->checkPermission(array('user.profile.avatar.canUseDefaultAvatar', 'user.profile.avatar.canUploadAvatar'));
     // set active tab
     UserCPMenu::getInstance()->setActiveMenuItem('wcf.user.usercp.menu.link.profile.avatar');
     // show form
     parent::show();
 }
Esempio n. 10
0
 /**
  * Initialises the user cp menu.
  */
 protected static function initUserCPMenu()
 {
     require_once WCF_DIR . 'lib/page/util/menu/UserCPMenu.class.php';
     self::$userCPMenuObj = UserCPMenu::getInstance();
 }
 /**
  * @see Page::show()
  */
 public function show()
 {
     if (!$this->userID) {
         require_once WCF_DIR . 'lib/system/exception/PermissionDeniedException.class.php';
         throw new PermissionDeniedException();
     }
     WCF::getUser()->checkPermission('user.profile.attachmentManager.canView');
     // set active tab
     UserCPMenu::getInstance()->setActiveMenuItem('wcf.user.usercp.menu.link.profile.attachmentManager');
     WCF::getSession()->register('showThumbnails', $this->showThumbnails);
     WCF::getSession()->register('showOnlyMessageType', $this->showOnlyMessageType);
     WCF::getSession()->register('showOnlyFileType', $this->showOnlyFileType);
     WCF::getSession()->register('showOnlyImages', $this->showOnlyImages);
     // show form
     parent::show();
 }
 /**
  * @see Page::show()
  */
 public function show()
 {
     // check permission
     if (!WCF::getUser()->userID || !GroupApplicationEditor::isGroupLeader(WCF::getUser(), $this->groupID)) {
         throw new PermissionDeniedException();
     }
     if (MODULE_MODERATED_USER_GROUP != 1) {
         throw new IllegalLinkException();
     }
     // set active tab
     UserCPMenu::getInstance()->setActiveMenuItem('wcf.user.usercp.menu.link.userGroups');
     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()
 {
     if (!WCF::getUser()->userID) {
         throw new PermissionDeniedException();
     }
     if (MODULE_USER_SIGNATURE != 1) {
         throw new IllegalLinkException();
     }
     // get max text length
     $this->maxTextLength = WCF::getUser()->getPermission('user.profile.signature.maxLength');
     // set active tab
     UserCPMenu::getInstance()->setActiveMenuItem('wcf.user.usercp.menu.link.profile.signature');
     // get signature
     if ($this->signatureCache == null) {
         $this->signatureCache = WCF::getUser()->signatureCache;
     }
     $this->text = WCF::getUser()->signature;
     // show form
     AbstractForm::show();
 }
 /**
  * @see Page::show()
  */
 public function show()
 {
     if (!WCF::getUser()->userID) {
         throw new PermissionDeniedException();
     }
     if (!MODULE_INVITATION) {
         throw new IllegalLinkException();
     }
     WCF::getUser()->checkPermission($this->neededPermissions);
     UserCPMenu::getInstance()->setActiveMenuItem('wcf.user.usercp.menu.link.management.invitations');
     parent::show();
 }