예제 #1
0
 public function ajaxExec()
 {
     $reqType = reqGmp::getVar('reqType');
     $redirect = reqGmp::getVar('redirect');
     if (count($this->errors) > 0) {
         $this->error = true;
     }
     if ($reqType == 'ajax') {
         exit(json_encode($this));
     }
     if ($redirect) {
         redirectGmp($redirect);
     }
     return $this;
 }
예제 #2
0
 public function welcomePageSaveInfo()
 {
     $res = new responseGmp();
     installerGmp::setUsed();
     if ($this->getModel()->welcomePageSaveInfo(reqGmp::get('get'))) {
         $res->addMessage(__('Information was saved. Thank you!', GMP_LANG_CODE));
     } else {
         $res->pushError($this->getModel()->getErrors());
     }
     $originalPage = reqGmp::getVar('original_page');
     $http = isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) ? 'https://' : 'http://';
     if (strpos($originalPage, $http . $_SERVER['HTTP_HOST']) !== 0) {
         $originalPage = '';
     }
     redirectGmp($originalPage);
 }
예제 #3
0
 public function welcomePageSaveInfo()
 {
     $res = new responseGmp();
     // Start usage in any case
     installerGmp::setUsed();
     if ($this->getModel()->welcomePageSaveInfo(reqGmp::get('get'))) {
         $res->addMessage(langGmp::_('Information was saved. Thank you!'));
     } else {
         $res->pushError($this->getModel()->getErrors());
     }
     $originalPage = reqGmp::getVar('original_page');
     //$returnArr = explode('|', $originalPage);
     //$return = $this->getModule()->decodeSlug(str_replace('return=', '', $returnArr[1]));
     $return = admin_url(strpos($originalPage, '?') ? $return : 'admin.php?page=' . $originalPage);
     // Start usage in any case
     redirectGmp($return);
     //return $res->ajaxExec();
 }