Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for Zend Encoder/SafeGuard & PhpExpress)
- *
- * @ Version : 2.0.0.3
- * @ Author : DeZender
- * @ Release on : 06.05.2013
- * @ Official site : http://DeZender.Net
- *
- */
- class Paypals_AdminController {
- public function preDispatch() {
- $this->view->children = (array("header_part" => "admin/layout/header_part", "footer_part" => "admin/layout/footer_part"));
- if (!WM_Rebuild::allow($this->sysModule())) {
- JO_Session::set("error", $this->translate("Error: Error with license file!"));
- $this->redirect($this->getRequest()->getServer("HTTP_REFERER"));
- }
- }
- public function installAction() {
- $this->noViewRenderer();
- $ext = Extensions_Model_Admin::getExtension("paypals");
- if (!WM_Users::allow($this->getRequest()->getModule(), $this->getRequest()->getController(), $this->getRequest()->getAction())) {
- JO_Session::set("error_permision", $this->translate("You do not have permission to this action"));
- $this->redirect(WM_Router::create($this->getRequest()->getBaseUrl() . "?module=extensions&controller=admin&group_id=" . $ext["group_id"]));
- }
- Extensions_Model_Admin::installExtensions("paypals");
- JO_Session::set("success", $this->translate("The extension was installed successfuly"));
- $this->redirect(WM_Router::create($this->getRequest()->getBaseUrl() . "?module=extensions&controller=admin&group_id=" . $ext["group_id"]));
- }
- public function settingsAction() {
- $ext = Extensions_Model_Admin::getExtension("paypals");
- $request = $this->getRequest();
- if (JO_Session::get("successfu_edite")) {
- $this->view->successfu_edite = true;
- JO_Session::clear("successfu_edite");
- }
- if (JO_Session::get("error_permision")) {
- $this->view->error_permision = JO_Session::get("error_permision");
- JO_Session::clear("error_permision");
- }
- if ($request->isPost()) {
- if (!WM_Users::allow($this->getRequest()->getModule(), $this->getRequest()->getController(), $this->getRequest()->getAction())) {
- $this->view->error = $this->translate("You do not have permission to this action");
- }
- else {
- if ($this->validate()) {
- Settings_Model_Settings::updateAll(array("paypals" => $request->getPost("paypals")));
- JO_Session::set("successfu_edite", true);
- $this->redirect(WM_Router::create($this->getRequest()->getBaseUrl() . "?module=paypals&controller=admin&action=settings"));
- }
- else {
- $this->view->error = implode("<br />", $this->error);
- }
- }
- }
- ..................................................................
- ..............................
- ............
Advertisement
Add Comment
Please, Sign In to add comment