function perform() { if ($this->_config->getValue("summary_show_agreement")) { $this->_view = new SummaryView("registerstep0"); $this->setCommonData(); } else { SummaryController::setForwardAction("RegisterStep1"); } }
function perform() { $this->_page = $this->_request->getValue("page"); $val = new CustomSummaryPageValidator(); if (!$val->validate($this->_page)) { // instead of showing an ugly smarty error, let's forward processing // to the default action so that at least we can show something! SummaryController::setForwardAction("Default"); } else { // let's cache the page... After all, we're not expecting much dynamic context in here! $this->_view = new SummaryCachedView($this->_page, array("page" => $this->_page, "locale" => $this->_locale->getLocaleCode())); $this->setCommonData(); } return true; }
function perform() { // get the data from the request, as it's already been validated $this->templateId = $this->_request->getValue("templateId"); $this->blogName = $this->_request->getValue("blogName"); $this->blogLocale = $this->_request->getValue("blogLocale"); $this->userName = $this->_request->getValue("userName"); $this->userPassword = $this->_request->getValue("userPassword"); $this->userEmail = $this->_request->getValue("userEmail"); $this->userFullName = $this->_request->getValue("userFullName"); // show some info, and we're all happy! //$this->_view = new SummaryView( "registerstep4" ); //$rg =$blogInfo->getBlogRequestGenerator(); //$blogUrl = $rg->blogLink($blogInfo); //$this->_view->setValue( "blogurl", $blogUrl ); //$this->setValues(); SummaryController::setForwardAction("RegisterStep5"); }
public function getRoute() { // Retrieve the URI if (strlen($this->_basepath) > 1) { // Local Server $uri = str_replace($this->_basepath, "", $_SERVER['REQUEST_URI']); } else { // AWS Server $uri = substr($_SERVER['REQUEST_URI'], 1); } // If the user is not logged in, go back to Home. if ($uri != 'Login') { if (!isset($_SESSION['loggedin'])) { $uri = 'Home'; } } if (strrpos($uri, '/') !== false) { $uri = explode('/', $uri); $id = $uri[1]; $uri = $uri[0] . '-'; } // Calls the appropriate controller based on the URI. switch ($uri) { case 'Home': $home = new HomeController(); $home->display(); break; case 'Account-Summary': $summary = new SummaryController(); $summary->display(); break; case 'Transaction-History-': $_SESSION['accountID'] = $id; $pos = strrpos($_SERVER['HTTP_REFERER'], '/'); $pos = strlen($_SERVER['HTTP_REFERER']) - $pos; header("Location: " . substr($_SERVER['HTTP_REFERER'], 0, -$pos + 1) . "Transaction-History"); break; case 'Transaction-History': $history = new HistoryController(); $history->display(); break; case 'Account-Details-': $_SESSION['detAccountID'] = $id; $pos = strrpos($_SERVER['HTTP_REFERER'], '/'); $pos = strlen($_SERVER['HTTP_REFERER']) - $pos; header("Location: " . substr($_SERVER['HTTP_REFERER'], 0, -$pos + 1) . "Account-Details"); break; case 'Account-Details': $details = new DetailsController(); $details->display(); break; case 'New-Bill-Payment-': $payment = new Paymentamt(); $payment->setAccountSelected($id); $pos = strrpos($_SERVER['HTTP_REFERER'], '/'); $pos = strlen($_SERVER['HTTP_REFERER']) - $pos; header("Location: " . substr($_SERVER['HTTP_REFERER'], 0, -$pos + 1) . "New-Bill-Payment"); break; case 'New-Bill-Payment': $payment = new PaymentController(); $payment->display(); break; case 'Bill-Payment-Amount': $paymentamt = new PaymentamtController(); $paymentamt->display(); break; case 'Bill-Payment-Confirmation': $paymentconf = new PaymentconfController(); $paymentconf->display(); break; case 'Bill-Payment-Acknowledgement': $paymentack = new PaymentackController(); $paymentack->display(); break; case 'Payment-List': $paymentlist = new PaymentlistController(); $paymentlist->display(); break; case 'Bill-Payment-List': $_SESSION['billPayment'] = true; unset($_SESSION['fundsTransferPayment']); $pos = strrpos($_SERVER['HTTP_REFERER'], '/'); $pos = strlen($_SERVER['HTTP_REFERER']) - $pos; header("Location: " . substr($_SERVER['HTTP_REFERER'], 0, -$pos + 1) . "Payment-List"); break; case 'Funds-Transfer-Payment-List': $_SESSION['fundsTransferPayment'] = true; unset($_SESSION['billPayment']); $pos = strrpos($_SERVER['HTTP_REFERER'], '/'); $pos = strlen($_SERVER['HTTP_REFERER']) - $pos; header("Location: " . substr($_SERVER['HTTP_REFERER'], 0, -$pos + 1) . "Payment-List"); break; case 'Payee-List': $payeelist = new PayeelistController(); $payeelist->display(); break; case 'Bill-Payee-List': $_SESSION['billPayee'] = true; unset($_SESSION['fundsTransferPayee']); $pos = strrpos($_SERVER['HTTP_REFERER'], '/'); $pos = strlen($_SERVER['HTTP_REFERER']) - $pos; header("Location: " . substr($_SERVER['HTTP_REFERER'], 0, -$pos + 1) . "Payee-List"); break; case 'Funds-Transfer-Payee-List': $_SESSION['fundsTransferPayee'] = true; unset($_SESSION['billPayee']); $pos = strrpos($_SERVER['HTTP_REFERER'], '/'); $pos = strlen($_SERVER['HTTP_REFERER']) - $pos; header("Location: " . substr($_SERVER['HTTP_REFERER'], 0, -$pos + 1) . "Payee-List"); break; case 'Biller-Add': $billeradd = new BilleraddController(); $billeradd->display(); break; case 'Biller-Modify-': $_SESSION['billerModifyID'] = $id; $pos = strrpos($_SERVER['HTTP_REFERER'], '/'); $pos = strlen($_SERVER['HTTP_REFERER']) - $pos; header("Location: " . substr($_SERVER['HTTP_REFERER'], 0, -$pos + 1) . "Biller-Modify"); break; case 'Biller-Modify': $billermodify = new BillermodifyController(); $billermodify->display(); break; case 'Biller-Delete-': $_SESSION['billerDeleteID'] = $id; $pos = strrpos($_SERVER['HTTP_REFERER'], '/'); $pos = strlen($_SERVER['HTTP_REFERER']) - $pos; header("Location: " . substr($_SERVER['HTTP_REFERER'], 0, -$pos + 1) . "Biller-Delete"); break; case 'Biller-Delete': $billerdelete = new BillerdeleteController(); $billerdelete->display(); break; case 'New-Funds-Transfer-': $transfer = new CheckTransfer(); $transfer->setAccountSelected($id); $pos = strrpos($_SERVER['HTTP_REFERER'], '/'); $pos = strlen($_SERVER['HTTP_REFERER']) - $pos; header("Location: " . substr($_SERVER['HTTP_REFERER'], 0, -$pos + 1) . "New-Funds-Transfer"); break; case 'New-Funds-Transfer': $transfer = new TransferController(); $transfer->display(); break; case 'Check-Transfer': $checktransfer = new ChecktransferController(); $checktransfer->display(); break; case 'Funds-Transfer-Acknowledgement': $transferack = new TransferackController(); $transferack->display(); break; case 'Payee-Add': $payeeadd = new PayeeaddController(); $payeeadd->display(); break; case 'Payee-Modify-': $_SESSION['payeeModifyID'] = $id; $pos = strrpos($_SERVER['HTTP_REFERER'], '/'); $pos = strlen($_SERVER['HTTP_REFERER']) - $pos; header("Location: " . substr($_SERVER['HTTP_REFERER'], 0, -$pos + 1) . "Payee-Modify"); break; case 'Payee-Modify': $payeemodify = new PayeemodifyController(); $payeemodify->display(); break; case 'Payee-Delete-': $_SESSION['payeeDeleteID'] = $id; $pos = strrpos($_SERVER['HTTP_REFERER'], '/'); $pos = strlen($_SERVER['HTTP_REFERER']) - $pos; header("Location: " . substr($_SERVER['HTTP_REFERER'], 0, -$pos + 1) . "Payee-Delete"); break; case 'Payee-Delete': $payeedelete = new PayeedeleteController(); $payeedelete->display(); break; case 'Login': $login = new LoginController(); $login->login(); break; case 'Logout': $logout = new LoginController(); $logout->logout(); break; default: $home = new HomeController(); $home->display(); break; } }
$_actionMap["BlogList"] = "BlogListAction"; $_actionMap["UserList"] = "UserListAction"; $_actionMap["UserProfile"] = "UserProfileAction"; $_actionMap["BlogProfile"] = "BlogProfileAction"; // conditional action registration... you've got to love this :))) if (!$config->getValue('summary_disable_registration')) { $_actionMap["RegisterStep0"] = "doReadAgreement"; $_actionMap["RegisterStep1"] = "doUserRegister"; $_actionMap["RegisterStep2"] = "doUserCreation"; $_actionMap["RegisterStep3"] = "doBlogRegistration"; $_actionMap["RegisterStep4"] = "ChooseBlogTemplateAction"; $_actionMap["RegisterStep5"] = "doFinishRegister"; } else { $_actionMap["RegisterStep0"] = "SummaryRegistrationDisabledAction"; $_actionMap["RegisterStep1"] = "SummaryRegistrationDisabledAction"; $_actionMap["RegisterStep2"] = "SummaryRegistrationDisabledAction"; $_actionMap["RegisterStep3"] = "SummaryRegistrationDisabledAction"; $_actionMap["RegisterStep4"] = "SummaryRegistrationDisabledAction"; $_actionMap["RegisterStep5"] = "SummaryRegistrationDisabledAction"; } $_actionMap["resetPasswordForm"] = "SummaryShowResetPasswordForm"; $_actionMap["sendResetEmail"] = "SummarySendResetEmail"; $_actionMap["setNewPassword"] = "******"; $_actionMap["updatePassword"] = "******"; $_actionMap["rss"] = "SummaryRssAction"; $_actionMap["summarySearch"] = "SummarySearchAction"; $_actionMap["activeAccount"] = "ActiveAccountAction"; $_actionMap["display"] = "SummaryCustomPageAction"; //// main part //// $controller = new SummaryController(); $controller->process(HttpVars::getRequest());