示例#1
0
 public function getAdminPage()
 {
     if (installerGmp::isUsed()) {
         return $this->getView()->getAdminPage();
     } else {
         return frameGmp::_()->getModule('supsystic_promo')->showWelcomePage();
     }
 }
示例#2
0
 public function getAdminPage()
 {
     if (!installerGmp::isUsed()) {
         frameGmp::_()->getModule('promo_ready')->showWelcomePage();
         return;
     }
     $tabsData = array('gmpAllMaps' => array('title' => 'All Maps', 'content' => frameGmp::_()->getModule('gmap')->getMapsTab()), 'gmpMarkerList' => array('title' => 'Markers', 'content' => frameGmp::_()->getModule('marker')->getView()->showAllMarkers()), 'gmpMarkerGroups' => array('title' => 'Marker Groups', 'content' => $this->getMarkersGroupsTab()), 'gmpPluginSettings' => array('title' => 'Plugin Settings', 'content' => $this->getPluginSettingsTab()));
     $tabsData = dispatcherGmp::applyFilters('adminOptionsTabs', $tabsData);
     $indoWindowSize = utilsGmp::unserialize($this->getModel('options')->get('infowindow_size'));
     $defaultOpenTab = reqGmp::getVar('tab', 'get');
     $this->assign('tabsData', $tabsData);
     $this->assign('indoWindowSize', $indoWindowSize);
     $this->assign('defaultOpenTab', $defaultOpenTab);
     parent::display('optionsAdminPage');
 }
示例#3
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);
 }
示例#4
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();
 }
示例#5
0
importClassGmp('helperGmp');
importClassGmp('dispatcherGmp');
importClassGmp('fieldGmp');
importClassGmp('tableGmp');
importClassGmp('frameGmp');
/**
 * @deprecated since version 1.0.1
 */
importClassGmp('langGmp');
importClassGmp('reqGmp');
importClassGmp('uriGmp');
importClassGmp('htmlGmp');
importClassGmp('responseGmp');
importClassGmp('fieldAdapterGmp');
importClassGmp('validatorGmp');
importClassGmp('errorsGmp');
importClassGmp('utilsGmp');
importClassGmp('modInstallerGmp');
importClassGmp('installerDbUpdaterGmp');
importClassGmp('dateGmp');
/**
 * Check plugin version - maybe we need to update database, and check global errors in request
 */
installerGmp::update();
errorsGmp::init();
/**
 * Start application
 */
frameGmp::_()->parseRoute();
frameGmp::_()->init();
frameGmp::_()->exec();
示例#6
0
 public static function deactivatePlugin()
 {
     global $wpdb;
     if (function_exists('is_multisite') && is_multisite()) {
         $orig_id = $wpdb->blogid;
         $blog_id = $wpdb->get_col("SELECT blog_id FROM {$wpdb->blogs}");
         foreach ($blog_id as $id) {
             if (switch_to_blog($id)) {
                 installerGmp::deactivate();
             }
         }
         switch_to_blog($orig_id);
         return;
     } else {
         installerGmp::deactivate();
     }
 }
示例#7
0
 public function addWelcomePageToMainMenu($option)
 {
     $firstTimeLookedToPlugin = !installerGmp::isUsed();
     if ($firstTimeLookedToPlugin) {
         $option = $this->_getWelcomMessageMenuData($option, false);
     }
     return $option;
 }
示例#8
0
文件: mod.php 项目: Roman921/Step-21
 public function showWelcomePage()
 {
     $firstTimeLookedToPlugin = !installerGmp::isUsed();
     if ($firstTimeLookedToPlugin) {
         $this->getView()->showWelcomePage();
     }
 }