/** * @see Form::save() */ public function save() { CaptchaForm::save(); // save solution $this->entry->update($this->solution); $this->saved(); // forward HeaderUtil::redirect('index.php?page=Contest&contestID=' . $this->entry->contestID . '&solutionID=' . $this->entry->solutionID . SID_ARG_2ND_NOT_ENCODED . '#solution' . $this->entry->solutionID); exit; }
/** * @see Form::save() */ public function save() { CaptchaForm::save(); // save solution $this->entry->update($this->comment); $this->saved(); // get solution/contest require_once WCF_DIR . 'lib/data/contest/solution/ContestSolution.class.php'; $solution = new ContestSolution($this->entry->solutionID); // forward HeaderUtil::redirect('index.php?page=ContestSolutionEntry' . '&contestID=' . $solution->contestID . '&solutionID=' . $solution->solutionID . SID_ARG_2ND_NOT_ENCODED . '#comment' . $this->entry->commentID); exit; }
/** * @see Page::show() */ public function show() { WCF::getUser()->checkPermission('user.mail.canMail'); // can mail permission if (!$this->user->canMail()) { throw new PermissionDeniedException(); } parent::show(); }
/** * @see Form::validate() */ public function validate() { CaptchaForm::validate(); // validate moduleID if (empty($this->moduleID)) { throw new UserInputException('moduleID', 'empty'); } // create module object $this->module = new DynamicPageModuleTemplate($this->moduleID); // get dependencies $sql = "SELECT\r\n\t\t\t\t\tdependency.dependency\r\n\t\t\t\tFROM\r\n\t\t\t\t\twcf" . WCF_N . "_package_dependency dependency\r\n\t\t\t\tWHERE\r\n\t\t\t\t\tdependency.packageID = " . PACKAGE_ID; $result = WCF::getDB()->sendQuery($sql); $packageIDs = array(PACKAGE_ID); while ($row = WCF::getDB()->fetchArray($result)) { $packageIDs[] = $row['dependency']; } // validate module row if (!$this->module->moduleID or !in_array($this->module->packageID, $packageIDs)) { throw new UserInputException('moduleID', 'invalid'); } // validate position if (!in_array($this->position, $this->availablePositions)) { $this->position = 'top'; } }
/** * @see Page::assignVariables() */ public function assignVariables() { parent::assignVariables(); // display branding require_once WCF_DIR . 'lib/util/ContestUtil.class.php'; ContestUtil::assignVariablesBranding(); WCF::getTPL()->assign(array('comment' => $this->comment, 'username' => $this->username, 'maxTextLength' => WCF::getUser()->getPermission('user.contest.maxSolutionLength'))); }
/** * @see AbstractForm::assignVariables(); */ public function assignVariables() { parent::assignVariables(); WCF::getTPL()->assign(array('activeTab' => $this->activeTab, 'subject' => $this->subject, 'text' => $this->text, 'parseURL' => $this->parseURL, 'enableSmilies' => $this->enableSmilies, 'enableHtml' => $this->enableHtml, 'enableBBCodes' => $this->enableBBCodes, 'showSignature' => $this->showSignature, 'showSmilies' => $this->showSmilies, 'showSettings' => $this->showSettings, 'showAttachments' => $this->showAttachments, 'showPoll' => $this->showPoll, 'showSignatureSetting' => $this->showSignatureSetting, 'canUseBBCodes' => WCF::getUser()->getPermission('user.' . $this->permissionType . '.canUseBBCodes'), 'canUseSmilies' => WCF::getUser()->getPermission('user.' . $this->permissionType . '.canUseSmilies'), 'canUseHtml' => WCF::getUser()->getPermission('user.' . $this->permissionType . '.canUseHtml'), 'defaultSmileys' => $this->defaultSmileys, 'smileyCategories' => $this->smileyCategories, 'wysiwygBBCodes' => $this->wysiwygBBCodes, 'maxTextLength' => $this->maxTextLength, 'wysiwygEditorMode' => $this->wysiwygEditorMode, 'wysiwygEditorHeight' => $this->wysiwygEditorHeight)); }
/** * @see Page::show() */ public function show() { if (!count($_POST) && $this->submit) { if ($this->userID) { $this->useCaptcha = false; } $this->submit(); } parent::show(); }
/** * @see Page::assignVariables() */ public function assignVariables() { parent::assignVariables(); WCF::getTPL()->assign(array('username' => $this->username, 'email' => $this->email)); }
/** * @see Page::show() */ public function show() { // check aktiv modul if (!MODULE_CONTACT) { throw new IllegalLinkException(); } // set active header menu item require_once WCF_DIR . 'lib/page/util/menu/PageMenu.class.php'; PageMenu::setActiveMenuItem('wcf.header.menu.contact'); parent::show(); }
/** * @see Form::validate() */ public function validate() { CaptchaForm::validate(); }