public function render() { // TODO: Implement render() method. $action = isset($_GET['action']) ? $_GET['action'] : null; $pathView = ""; switch ($action) { case "add_search_shortcode": $pathView = TPOPlUGIN_DIR . "/app/includes/views/admin/menu/TPSearchFormsAdd.view.php"; break; case "save_search_shortcode": if (isset($_POST)) { $this->model->insert($_POST); $this->redirect('admin.php?page=tp_control_search_shortcodes'); } break; case "edit_search_shortcode": if (isset($_GET['id']) && !empty($_GET['id'])) { $this->data = $this->model->get_dataID((int) $_GET['id']); $pathView = TPOPlUGIN_DIR . "/app/includes/views/admin/menu/TPSearchFormsEdit.view.php"; } else { $this->redirect('admin.php?page=tp_control_search_shortcodes'); } break; case "update_search_shortcode": if (isset($_POST)) { $this->model->update($_POST); $this->redirect('admin.php?page=tp_control_search_shortcodes'); } break; case "delete_search_shortcode": if (isset($_GET['id']) && !empty($_GET['id'])) { $this->model->deleteId((int) $_GET['id']); } $this->redirect('admin.php?page=tp_control_search_shortcodes'); break; default: $this->data = $this->model->get_data(); $pathView = TPOPlUGIN_DIR . "/app/includes/views/admin/menu/TPSearchForms.view.php"; break; } parent::loadView($pathView); }
public function render() { global $locale; switch ($locale) { case "ru_RU": $this->local = 'ru'; $this->local_url = 'ru'; break; case "en_US": $this->local = 'en'; $this->local_url = 'en-us'; break; default: $this->local = 'en'; $this->local_url = 'en-us'; break; } // TODO: Implement render() method. $pathView = TPOPlUGIN_DIR . "/app/includes/views/admin/menu/TPWizard.view.php"; parent::loadView($pathView); }
public function render() { // TODO: Implement render() method. $pathView = TPOPlUGIN_DIR . "/app/includes/views/admin/menu/TPFlightTickets.view.php"; parent::loadView($pathView); }