/** * Action * * Actions handled by this page: * new_account (form) * new_account_confirm (form) * * @param string $action_name Action */ function action($action_name) { switch ($action_name) { case "new_account": // If Continue is pressed, or form is submitted by pressing enter if (isset($this->post['cancel'])) { // Canceled $this->gotoPage("accounts_browse"); } else { // Process new account form $this->process_new_account(); } break; case "new_account_confirm": if (isset($this->post['continue'])) { // Go ahead $this->add_account(); } else { // Go back $this->setTemplate("default"); } break; default: // No matching action - refer to base class parent::action($action_name); } }
/** * Initialize Fulfilled Orders Page */ public function init() { parent::init(); // Tell the orders table widget to only show "pending" orders $widget = $this->forms['fulfilled_orders']->getField("orders")->getWidget(); $widget->setStatus("Fulfilled"); }
/** * Initialize Inactive Accounts Page */ public function init() { parent::init(); // Tell the accounts table widget to only show "pending" accounts $widget = $this->forms['inactive_accounts']->getField("accounts")->getWidget(); $widget->setStatus("Inactive"); }
/** * Action * * Actions handled by this page: * * @param string $action_name Action */ function action($action_name) { switch ($action_name) { case "customer_information": if (isset($this->post['back'])) { $this->gotoPage("cart"); } elseif (isset($this->post['continue'])) { $this->process(); } elseif (isset($this->post['startover'])) { $this->newOrder(); } break; case "repeat_customer": if (isset($this->post['back'])) { $this->gotoPage("cart"); } elseif (isset($this->post['continue'])) { $this->process(); } elseif (isset($this->post['startover'])) { $this->newOrder(); } break; default: // No matching action, refer to base class parent::action($action_name); } }
/** * Initialize Outstanding Invoices Page */ public function init() { parent::init(); // Tell the orders table widget to only show "pending" orders $widget = $this->forms['outstanding_invoices']->getField("invoices")->getWidget(); $widget->setOutstanding("Yes"); }
/** * Initialize Page */ function init() { parent::init(); // Reference the order object from the local session so the template can see it $this->session['order'] =& $_SESSION['order']; // Supress the login link $this->smarty->assign("supressWelcome", true); }
/** * Action * * Actions handled by this page: * none * * @param string $action_name Action */ function action($action_name) { switch ($action_name) { default: // No matching action, refer to base class parent::action($action_name); } }
/** * Initialize the Page */ public function init() { parent::init(); // Setup the theme drop-down $tField = $this->forms['login']->getField("theme"); $tField->getWidget()->setType("manager"); $tField->getValidator()->setType("manager"); }
/** * Initialize the Page */ public function init() { parent::init(); // Setup the pricing/term menu $widget = $this->forms['edit_product_purchase']->getField("term")->getWidget(); $widget->setPurchasable($this->get['ppurchase']->getPurchasable()); // Give the template access to the purchase DBO $this->smarty->assign_by_ref("purchaseDBO", $this->get['ppurchase']); // Set URL Fields $this->setURLField("ppurchase", $this->get['ppurchase']->getID()); }
/** * Action * * Actions handled by this page: * none * * @param string $action_name Action */ function action($action_name) { switch ($action_name) { case "search_all_accounts": $this->searchTable("active_accounts", "accounts", $this->post); break; default: // No matching action, refer to base class parent::action($action_name); } }
/** * Initialize the Page */ public function init() { parent::init(); // Setup the pricing/term menu $widget = $this->forms['edit_hosting_purchase']->getField("term")->getWidget(); $widget->setPurchasable($this->get['hspurchase']->getPurchasable()); // Provide the purchase and server objects to the template $this->smarty->assign_by_ref("purchaseDBO", $this->get['hspurchase']); $this->smarty->assign_by_ref("serverDBO", $this->get['hspurchase']->getServerDBO()); // Set URL Fields $this->setURLField("hspurchase", $this->get['hspurchase']->getID()); }
/** * Initialize the Page */ function init() { parent::init(); $registry = ModuleRegistry::getModuleRegistry(); $this->ppModule = $registry->getModule('paypalwps'); $this->smarty->assign("account", $this->ppModule->getAccount()); $this->smarty->assign("cartURL", $this->ppModule->getCartURL()); $this->smarty->assign("currencyCode", $this->ppModule->getCurrencyCode()); $this->smarty->assign("orderid", $_SESSION['order']->getID()); // Dump the cart contents into a Smarty variable. The Paypal cart upload // form will be generated by the template. $this->smarty->assign("paypalCart", $this->dumpCart()); }
/** * Action * * Actions handled by this page: * logout * * @param string $action_name Action */ function action($action_name) { switch ($action_name) { case "logout": // Logout log_notice("Logout", "User: "******" logged out"); session_destroy(); $this->gotoPage("home"); break; default: // No matching action, refer to base class parent::action($action_name); } }
/** * Handles actions for this Page * * Actions handled by this Page: * email_invoice (Form) */ function action($action_name) { switch ($action_name) { case "welcome_email": if (isset($this->session['welcome_email']['continue'])) { $this->send_email(); } elseif (isset($this->session['welcome_email']['cancel'])) { $this->cancel(); } break; default: // No matching action, refer to base class parent::action($action_name); } }
/** * Handles actions for this Page * * Actions handled by this Page: * email_invoice (Form) * * @param string $action_name Action */ function action($action_name) { switch ($action_name) { case "email_invoice": if (isset($this->post['continue'])) { $this->send_invoice(); } elseif (isset($this->post['cancel'])) { $this->cancel(); } break; default: // No matching action, refer to base class parent::action($action_name); } }
/** * Initialize Page */ public function init() { parent::init(); // Access the registrar module for the selected TLD $moduleName = $this->get['tld']->getModuleName(); $registrar = ModuleRegistry::getModuleRegistry()->getModule($moduleName); $fqdn = $this->get['domain'] . '.' . $this->get['tld']->getTLD(); $this->smarty->assign("fqdn", $fqdn); if (!$registrar->checkAvailability($fqdn)) { $this->setTemplate("unavailable"); } else { $this->setURLField("domain", $this->get['domain']); $this->setURLField("tld", $this->get['tld']->getTLD()); } }
/** * Action * * Actions handled by this page: * browse_invoices_action (form) * * @param string $action_name Action */ function action($action_name) { switch ($action_name) { case "browse_invoices_action": // Create a new invoice $this->gotoPage("accounts_add_invoice"); break; case "search_invoices": $this->searchTable("browse_invoices", "invoices", $this->post); break; default: // No matching action, refer to base class parent::action($action_name); } }
/** * Action * * Actions handled by this page: * login (form) * * @param string $action_name Action */ function action($action_name) { switch ($action_name) { case "login": if (isset($this->post['login'])) { $this->login(); } elseif (isset($this->post['back'])) { $this->goback(); } break; default: // No matching action, refer to base class parent::action($action_name); } }
/** * Initialize the Edit Domain Page */ function init() { parent::init(); // Set URL Field $this->setURLField("dpurchase", $this->get['dpurchase']->getID()); // Store DBO in session $this->smarty->assign_by_ref("domainDBO", $this->get['dpurchase']); try { $widget = $this->forms['edit_domain']->getField("term")->getWidget(); $widget->setPurchasable($this->get['dpurchase']->getPurchasable()); $widget = $this->forms['renew_domain']->getField("term")->getWidget(); $widget->setPurchasable($this->get['dpurchase']->getPurchasable()); } catch (DBNoRowsFoundException $e) { throw new SWUserException("[THERE_ARE_NO_DOMAIN_SERVICES]"); } }
/** * Action * * Actions handled by this page: * remove_ip * * @param string $action_name Action */ function action($action_name) { switch ($action_name) { case "ippool": if (isset($this->post['remove'])) { $this->deleteIP(); } break; case "search_ips": $this->searchTable("ippool", "ipaddresses", $this->post); break; default: // No matching action, refer to base class parent::action($action_name); } }
/** * Action * * Actions handled by this page: * * @param string $action_name Action */ function action($action_name) { switch ($action_name) { case "servers_action": if (isset($this->post['add'])) { $this->gotoPage("services_add_server"); } break; case "search_servers": $this->searchTable("servers", "servers", $this->post); break; default: // No matching action, refer to base class parent::action($action_name); } }
/** * Initialize Assign Product Page */ function init() { parent::init(); // Set URL Fields $this->setURLField("account", $this->get['account']->getID()); // Store service DBO in session $this->session['account_dbo'] = $dbo; try { $products = load_array_ProductDBO(); } catch (DBNoRowsFoundException $e) { throw new SWUserException("[THERE_ARE_NO_PRODUCTS]"); } if (!isset($this->post['product'])) { $this->updatePrices(array_shift($products)); } }
/** * Action * * Actions handled by this page: * new_payment * * @param string $action_name Action */ function action($action_name) { switch ($action_name) { case "new_payment": if (isset($this->post['cancel'])) { // Cancel $this->goback(); } elseif (isset($this->post['continue'])) { // Add Payment $this->add_payment(); } break; default: // No matching action, refer to base class parent::action($action_name); } }
/** * Action * * Actions handled by this page: * * @param string $action_name Action */ function action($action_name) { switch ($action_name) { case "domain_contact": if (isset($this->session['domain_contact']['startover'])) { $this->newOrder(); } elseif (isset($this->session['domain_contact']['back'])) { $this->gotoPage("customer"); } elseif (isset($this->session['domain_contact']['continue'])) { $this->processContact(); } break; default: // No matching action, refer to base class parent::action($action_name); } }
/** * Action * * Actions handled by this page: * browse_taxes_action (form) * * @param string $action_name Action */ function action($action_name) { switch ($action_name) { case "taxes_action": // Create a new tax rule $this->gotoPage("add_tax_rule"); break; case "tax_rules": if (isset($this->post['remove'])) { $this->remove(); } break; default: // No matching action, refer to base class parent::action($action_name); } }
/** * Action * * Actions handled by this page: * view_product_action (form) * * @param string $action_name Action */ function action($action_name) { switch ($action_name) { case "view_product_action": if (isset($this->post['edit'])) { // Edit this Domain Service $this->gotoPage("services_edit_product", null, "product=" . $this->get['product']->getID()); } elseif (isset($this->post['delete'])) { // Delete this Product $this->gotoPage("services_delete_product", null, "product=" . $this->get['product']->getID()); } break; default: // No matching action, refer to base class parent::action($action_name); } }
/** * Action * * Actions handled by this page: * delete_account (form) */ function action($action_name) { switch ($action_name) { case "delete_account": if (isset($this->session['delete_account']['delete'])) { // Delete $this->delete_account(); } elseif (isset($this->session['delete_account']['cancel'])) { // Cancel $this->goback(); } break; default: // No matching action, refer to base class parent::action($action_name); } }
/** * Action * * Actions handled by this page: * view_hosting_action (form) * * @param string $action_name Action */ function action($action_name) { switch ($action_name) { case "view_hosting_action": if (isset($this->post['edit'])) { // Edit this Hosting Service $this->gotoPage("services_edit_hosting", null, "hservice=" . $this->get['hservice']->getID()); } elseif (isset($this->post['delete'])) { // Delete this Hosting Service $this->gotoPage("services_delete_hosting", null, "hservice=" . $this->get['hservice']->getID()); } break; default: // No matching action, refer to base class parent::action($action_name); } }
/** * Action * * Actions handled by this page: * delete_invoice (form) * * @param string $action_name Action */ function action($action_name) { switch ($action_name) { case "delete_invoice": if (isset($this->post['delete'])) { // Delete $this->delete_invoice(); } elseif (isset($this->post['cancel'])) { // Cancel $this->goback(); } break; default: // No matching action, refer to base class parent::action($action_name); break; } }
/** * Action * * Actions handled by this page: * edit_account (form) * * @param string $action_name Action */ function action($action_name) { switch ($action_name) { case "edit_account": if (isset($this->session['edit_account']['save'])) { // Save changes $this->update_account(); $this->gotoPage("accounts_view_account", array(array("type" => "ACCOUNT_UPDATED")), "account=" . $this->get['account']->getID()); } elseif (isset($this->session['edit_account']['cancel'])) { // Cancel (return to view page) $this->gotoPage("accounts_view_account", null, "account=" . $this->get['account']->getID()); } break; default: // No matching action, refer to base class parent::action($action_name); } }