public function action_password_reset() { list($valid, $data, $recipient) = self::validatePasswordResetForm($_REQUEST); if ($valid !== true) { return ControllerDispatcher::renderModuleView(self::MODULE_NAME, CURRENT_MODULE_ACTION, ['formErrors' => $data]); } MailHelper::sendPasswordResetLink($recipient); return ControllerDispatcher::renderModuleView(self::MODULE_NAME, CURRENT_MODULE_ACTION, ['resetMsg' => true]); }
public function action_contact_submit() { list($valid, $data) = self::validateContactForm($_REQUEST); if ($valid !== true) { return ControllerDispatcher::renderModuleView(self::MODULE_NAME, 'contact', ['formErrors' => $data]); } MailHelper::sendContactFormMail($data['email'], $data['phone'], $data['name'], $data['subject'], $data['message']); return ControllerDispatcher::renderModuleView(self::MODULE_NAME, 'contact', ['successmsg' => true, 'formVal' => []]); }
public function dispatchAction($action, $params) { if (!isset($this->actions[$action])) { throw new PageNotFoundException(); } if (!is_callable([$this, "{$this->actionPrefix}{$action}"])) { return ControllerDispatcher::renderModuleView(static::MODULE_NAME, $action); } return call_user_func_array([$this, "{$this->actionPrefix}{$action}"], $params); }
public function action_girls_schools() { return ControllerDispatcher::renderModuleView(self::MODULE_NAME, 'girls_schools'); }
public function action_index() { return ControllerDispatcher::renderModuleView(self::MODULE_NAME, 'index'); }
public function action_total_invoice() { $login = Session::getLogin(); if ($login->getType() < \Member::TYPE_SALES_MANAGER) { throw new PageNotFoundException(); } return ControllerDispatcher::renderModuleView(self::MODULE_NAME, 'index', ['member' => Session::getLogin()]); }
public function action_bonus_levels_signup() { $login = Session::getLogin(); if ($login->getType() !== \Member::TYPE_CEO) { throw new PermissionDeniedException(); } list($valid, $data, $recipient) = \Member::validateBonusLevelForm($_REQUEST); if ($valid !== true) { return ControllerDispatcher::renderModuleView(self::MODULE_NAME, 'index', ['member' => $login, 'tab' => 'bonus_levels', 'formErrors' => $data, 'recipient' => $recipient]); } if ($data['recipient_id'] === '') { $data['recipient_id'] = $recipient->getId(); return ControllerDispatcher::renderModuleView(self::MODULE_NAME, 'index', ['member' => $login, 'tab' => 'bonus_levels', 'formVal' => $data, 'recipient' => $recipient]); } $recipient->setBonusLevel($data['level']); $recipient->save(); return ControllerDispatcher::renderModuleView(self::MODULE_NAME, 'index', ['member' => $login, 'tab' => 'bonus_levels', 'formVal' => [], 'successmsg' => true]); }
public function action_change_profile_signup() { $login = Session::getLogin(); if (!$login) { throw new PageNotFoundException(); } list($valid, $data) = self::validateChangeBankingForm($login, $_REQUEST); if ($valid !== true) { return ControllerDispatcher::renderModuleView(self::MODULE_NAME, 'change_profile', ['formErrors' => $data]); } $login->setTitle($data['title']); $login->setLastName($data['lastName']); $login->setFirstName($data['firstName']); $login->setEmail($data['email']); if ($login->isExtended()) { $login->setCity($data['city']); $login->setZipCode($data['zip_code']); $login->setBic($data['bic']); $login->setIban($data['iban']); $login->setBankRecipient($data['bank_recipient']); } $login->save(); return ControllerDispatcher::renderModuleView(self::MODULE_NAME, 'change_profile', ['successmsg' => true]); }