/**
  * @see Page::show()
  */
 public function show()
 {
     if (!MODULE_PM) {
         throw new IllegalLinkException();
     }
     // check permission
     WCF::getUser()->checkPermission('user.pm.canUsePm');
     if (!WCF::getUser()->userID) {
         throw new PermissionDeniedException();
     }
     parent::show();
     // handle action request
     switch ($this->action) {
         // mark/unmark pm
         case 'mark':
         case 'unmark':
             if ($this->pmID) {
                 require_once WCF_DIR . 'lib/data/message/pm/PMAction.class.php';
                 $a = $this->action;
                 PMAction::$a($this->pmID);
             }
             break;
             // disable notifications
         // disable notifications
         case 'disableNotifications':
             require_once WCF_DIR . 'lib/data/message/pm/PM.class.php';
             PM::disableNotifications();
             if (!isset($_REQUEST['ajax'])) {
                 HeaderUtil::redirect('index.php' . SID_ARG_1ST);
                 exit;
             }
             break;
             // unmark all
         // unmark all
         case 'unmarkAll':
             require_once WCF_DIR . 'lib/data/message/pm/PMAction.class.php';
             PMAction::unmarkAll();
             break;
             // empty recycle bin
         // empty recycle bin
         case 'emptyRecycleBin':
             require_once WCF_DIR . 'lib/data/message/pm/PMAction.class.php';
             PMAction::emptyRecycleBin();
             break;
             // delete
             // edit unread
             // cancel
             // recover
             // download
             // mark as read/unread
         // delete
         // edit unread
         // cancel
         // recover
         // download
         // mark as read/unread
         case 'delete':
         case 'edit':
         case 'cancel':
         case 'recover':
         case 'download':
         case 'markAsRead':
         case 'markAsUnread':
             require_once WCF_DIR . 'lib/data/message/pm/PMAction.class.php';
             $action = new PMAction($this->pmID, $this->folderID);
             $action->{$this->action}();
             break;
             // move to
         // move to
         case 'moveTo':
             require_once WCF_DIR . 'lib/data/message/pm/PMAction.class.php';
             $action = new PMAction($this->pmID);
             $action->moveTo($this->folderID);
             break;
             // move marked to
         // move marked to
         case 'moveMarkedTo':
             require_once WCF_DIR . 'lib/data/message/pm/PMAction.class.php';
             PMAction::moveMarkedTo($this->folderID);
             break;
             // download marked
             // delete marked
             // cancel marked
         // download marked
         // delete marked
         // cancel marked
         case 'downloadMarked':
         case 'deleteMarked':
         case 'cancelMarked':
             require_once WCF_DIR . 'lib/data/message/pm/PMAction.class.php';
             $a = $this->action;
             PMAction::$a($this->folderID);
             break;
     }
 }