当前位置: 首页>>代码示例>>PHP>>正文


PHP frameGmp类代码示例

本文整理汇总了PHP中frameGmp的典型用法代码示例。如果您正苦于以下问题:PHP frameGmp类的具体用法?PHP frameGmp怎么用?PHP frameGmp使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了frameGmp类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: checkAndSend

 public function checkAndSend()
 {
     $res = frameGmp::_()->getTable("usage_stat")->get("id", '`visits`>9');
     if (!empty($res)) {
         $this->sendUsageStat();
     }
 }
开发者ID:Roman921,项目名称:Step-21,代码行数:7,代码来源:promo_ready.php

示例2: put

 public function put($d = array())
 {
     $res = new responseGmp();
     $id = $this->_getIDFromReq($d);
     $d = prepareParamsGmp($d);
     if (is_numeric($id) && $id) {
         if (isset($d['active'])) {
             $d['active'] = is_string($d['active']) && $d['active'] == 'true' || $d['active'] == 1 ? 1 : 0;
         }
         //mmm.... govnokod?....)))
         /* else
            $d['active'] = 0;*/
         if (frameGmp::_()->getTable('modules')->update($d, array('id' => $id))) {
             $res->messages[] = __('Module Updated', GMP_LANG_CODE);
             $mod = frameGmp::_()->getTable('modules')->getById($id);
             $newType = frameGmp::_()->getTable('modules_type')->getById($mod['type_id'], 'label');
             $newType = $newType['label'];
             $res->data = array('id' => $id, 'label' => $mod['label'], 'code' => $mod['code'], 'type' => $newType, 'active' => $mod['active']);
         } else {
             if ($tableErrors = frameGmp::_()->getTable('modules')->getErrors()) {
                 $res->errors = array_merge($res->errors, $tableErrors);
             } else {
                 $res->errors[] = __('Module Update Failed', GMP_LANG_CODE);
             }
         }
     } else {
         $res->errors[] = __('Error module ID', GMP_LANG_CODE);
     }
     return $res;
 }
开发者ID:Vibeosys,项目名称:VibeosysWeb,代码行数:30,代码来源:modules.php

示例3: init

 public function init()
 {
     if (frameGmp::isAdminPlugPage()) {
         $this->_styles = array('styleGmp' => array('path' => GMP_CSS_PATH . 'style.css'), 'adminStylesGmp' => array('path' => GMP_CSS_PATH . 'adminStyles.css'), 'farbtastic' => array(), 'wp-jquery-ui-dialog' => array(), 'jquery-dialog' => array('path' => GMP_CSS_PATH . 'jquery-dialog.css'));
     }
     $defaultPlugTheme = frameGmp::_()->getModule('options')->get('default_theme');
     $ajaxurl = admin_url('admin-ajax.php');
     if (frameGmp::_()->getModule('options')->get('ssl_on_ajax')) {
         $ajaxurl = uriGmp::makeHttps($ajaxurl);
     }
     $jsData = array('siteUrl' => GMP_SITE_URL, 'imgPath' => GMP_IMG_PATH, 'cssPath' => GMP_CSS_PATH, 'loader' => GMP_LOADER_IMG, 'close' => GMP_IMG_PATH . 'cross.gif', 'ajaxurl' => $ajaxurl, 'animationSpeed' => frameGmp::_()->getModule('options')->get('js_animation_speed'), 'siteLang' => langGmp::getData(), 'options' => frameGmp::_()->getModule('options')->getAllowedPublicOptions(), 'GMP_CODE' => GMP_CODE, 'ball_loader' => GMP_IMG_PATH . 'ajax-loader-ball.gif', 'ok_icon' => GMP_IMG_PATH . 'ok-icon.png', 'isHttps' => uriGmp::isHttps());
     if (frameGmp::isAdminPlugPage()) {
         frameGmp::_()->addScript('commonGmp', GMP_JS_PATH . 'common.js');
         frameGmp::_()->addScript('coreGmp', GMP_JS_PATH . 'core.js');
         $jsData = dispatcherGmp::applyFilters('jsInitVariables', $jsData);
         frameGmp::_()->addJSVar('coreGmp', 'GMP_DATA', $jsData);
         frameGmp::_()->addScript('datatable', GMP_JS_PATH . 'jquery.dataTables.min.js');
         frameGmp::_()->addScript('farbtastic', get_bloginfo('wpurl') . '/wp-admin/js/farbtastic.js', array('jquery'));
         frameGmp::_()->addScript('jquery-ui-tabs', '', array('jquery'), false, true);
         frameGmp::_()->addScript('jquery-ui-autocomplete', '', array('jquery'), false, true);
         frameGmp::_()->getModule('marker')->connectAssets();
         frameGmp::_()->addScript('jquery-ui-dialog', '', array('jquery'));
         frameGmp::_()->addScript('adminOptionsGmp', GMP_JS_PATH . 'admin.options.js');
     }
     if (is_admin()) {
         frameGmp::_()->addScript('ajaxupload', GMP_JS_PATH . 'ajaxupload.js');
         frameGmp::_()->addScript('postbox', get_bloginfo('wpurl') . '/wp-admin/js/postbox.js');
         add_action('wp_enqueue_scripts', array($this, 'addThickbox'));
         $jsData['allCheckRegPlugs'] = modInstallerGmp::getCheckRegPlugs();
     } else {
     }
     foreach ($this->_styles as $s => $sInfo) {
         if (isset($sInfo['for'])) {
             if ($sInfo['for'] == 'frontend' && is_admin() || $sInfo['for'] == 'admin' && !is_admin()) {
                 continue;
             }
         }
         $canBeSubstituted = true;
         if (isset($sInfo['substituteFor'])) {
             switch ($sInfo['substituteFor']) {
                 case 'frontend':
                     $canBeSubstituted = !is_admin();
                     break;
                 case 'admin':
                     $canBeSubstituted = is_admin();
                     break;
             }
         }
         if ($canBeSubstituted && file_exists(GMP_TEMPLATES_DIR . $defaultPlugTheme . DS . $s . '.css')) {
             frameGmp::_()->addStyle($s, GMP_TEMPLATES_PATH . $defaultPlugTheme . '/' . $s . '.css');
         } elseif ($canBeSubstituted && file_exists(utilsGmp::getCurrentWPThemeDir() . 'gmp' . DS . $s . '.css')) {
             frameGmp::_()->addStyle($s, utilsGmp::getCurrentWPThemePath() . '/toe/' . $s . '.css');
         } elseif (!empty($sInfo['path'])) {
             frameGmp::_()->addStyle($s, $sInfo['path']);
         } else {
             frameGmp::_()->addStyle($s);
         }
     }
     parent::init();
 }
开发者ID:Roman921,项目名称:Step-21,代码行数:60,代码来源:mod.php

示例4: getMarkerForm

 public function getMarkerForm($params)
 {
     $marker_opts = frameGmp::_()->getModule('marker')->getModel()->constructMarkerOptions();
     $this->assign('marker_opts', $marker_opts);
     $this->assign('params', $params);
     return parent::getContent('markerForm');
 }
开发者ID:Roman921,项目名称:Step-21,代码行数:7,代码来源:marker.php

示例5: initMenu

 public function initMenu()
 {
     $mainCap = $this->getMainCap();
     $mainSlug = dispatcherGmp::applyFilters('adminMenuMainSlug', $this->_mainSlug);
     $mainMenuPageOptions = array('page_title' => GMP_WP_PLUGIN_NAME, 'menu_title' => GMP_WP_PLUGIN_NAME, 'capability' => $mainCap, 'menu_slug' => $mainSlug, 'function' => array(frameGmp::_()->getModule('options'), 'getAdminPage'));
     $mainMenuPageOptions = dispatcherGmp::applyFilters('adminMenuMainOption', $mainMenuPageOptions);
     add_menu_page($mainMenuPageOptions['page_title'], $mainMenuPageOptions['menu_title'], $mainMenuPageOptions['capability'], $mainMenuPageOptions['menu_slug'], $mainMenuPageOptions['function'], 'dashicons-admin-site');
     //remove duplicated WP menu item
     //add_submenu_page($mainMenuPageOptions['menu_slug'], '', '', $mainMenuPageOptions['capability'], $mainMenuPageOptions['menu_slug'], $mainMenuPageOptions['function']);
     $tabs = frameGmp::_()->getModule('options')->getTabs();
     $subMenus = array();
     foreach ($tabs as $tKey => $tab) {
         if ($tKey == 'main_page') {
             continue;
         }
         // Top level menu item - is main page, avoid place it 2 times
         if (isset($tab['hidden']) && $tab['hidden'] || isset($tab['hidden_for_main']) && $tab['hidden_for_main'] || isset($tab['is_main']) && $tab['is_main']) {
             continue;
         }
         $subMenus[] = array('title' => $tab['label'], 'capability' => $mainCap, 'menu_slug' => 'admin.php?page=' . $mainSlug . '&tab=' . $tKey, 'function' => '');
     }
     $subMenus = dispatcherGmp::applyFilters('adminMenuOptions', $subMenus);
     foreach ($subMenus as $opt) {
         add_submenu_page($mainSlug, $opt['title'], $opt['title'], $opt['capability'], $opt['menu_slug'], $opt['function']);
     }
 }
开发者ID:spokencode,项目名称:bophillips,代码行数:26,代码来源:mod.php

示例6: isAdmin

 public function isAdmin()
 {
     if (!function_exists('wp_get_current_user')) {
         frameGmp::_()->loadPlugins();
     }
     return current_user_can('administrator');
 }
开发者ID:Roman921,项目名称:Step-21,代码行数:7,代码来源:mod.php

示例7: getSettingsTabContent

 public function getSettingsTabContent()
 {
     frameGmp::_()->addScript('admin.settings', $this->getModule()->getModPath() . 'js/admin.settings.js');
     frameGmp::_()->addStyle('admin.settings', $this->getModule()->getModPath() . 'css/admin.settings.css');
     frameGmp::_()->getModule('templates')->loadJqueryUi();
     $options = frameGmp::_()->getModule('options')->getAll();
     $this->assign('options', $options);
     return parent::getContent('optionsSettingsTabContent');
 }
开发者ID:spokencode,项目名称:bophillips,代码行数:9,代码来源:options.php

示例8: initMenu

 public function initMenu()
 {
     $mainSlug = dispatcherGmp::applyFilters('adminMenuMainSlug', $this->_mainSlug);
     $this->_options = dispatcherGmp::applyFilters('adminMenuOptions', $this->_options);
     add_menu_page(langGmp::_('Ready! Google Maps'), langGmp::_('Ready! Google Maps'), 10, $this->_mainSlug, array(frameGmp::_()->getModule('options')->getView(), 'getAdminPage'), 'dashicons-admin-site');
     foreach ($this->_options as $opt) {
         add_submenu_page($mainSlug, langGmp::_($opt['title']), langGmp::_($opt['title']), $opt['capability'], $opt['menu_slug'], $opt['function']);
     }
 }
开发者ID:Roman921,项目名称:Step-21,代码行数:9,代码来源:adminmenu.php

示例9: drawMapFromShortcode

 public function drawMapFromShortcode($params = null)
 {
     frameGmp::_()->addScript('commonGmp', GMP_JS_PATH . 'common.js', array('jquery'));
     frameGmp::_()->addScript('coreGmp', GMP_JS_PATH . 'core.js');
     frameGmp::_()->addScript('mutal_opts', GMP_JS_PATH . 'mutal.js');
     if (!isset($params['id'])) {
         return $this->getController()->getDefaultMap();
     }
     return $this->getController()->getView()->drawMap($params);
 }
开发者ID:Roman921,项目名称:Step-21,代码行数:10,代码来源:mod.php

示例10: getTabContent

 /**
  * Get the content for templates module tab
  * 
  * @return type 
  */
 public function getTabContent()
 {
     $templates = frameGmp::_()->getModule('templatesGmp')->getModel()->get();
     if (empty($templates)) {
         $tpl = 'noTemplates';
     } else {
         $this->assign('templatesGmp', $templates);
         $this->assign('default_theme', frameGmp::_()->getModule('optionsGmp')->getModel()->get('default_theme'));
         $tpl = 'templatesTab';
     }
     return parent::getContent($tpl);
 }
开发者ID:Roman921,项目名称:Step-21,代码行数:17,代码来源:templates.php

示例11: _loadUserData

 protected function _loadUserData()
 {
     if (!$this->_dataLoaded) {
         if (!function_exists('wp_get_current_user')) {
             frameGmp::_()->loadPlugins();
         }
         $user = wp_get_current_user();
         $this->_data = $user->data;
         $this->_curentID = $user->ID;
         $this->_dataLoaded = true;
     }
 }
开发者ID:spokencode,项目名称:bophillips,代码行数:12,代码来源:mod.php

示例12: initJsVars

    public function initJsVars()
    {
        $ajaxurl = admin_url('admin-ajax.php');
        if (frameGmp::_()->getModule('options')->get('ssl_on_ajax')) {
            $ajaxurl = uriGmp::makeHttps($ajaxurl);
        }
        $jsData = array('siteUrl' => GMP_SITE_URL, 'imgPath' => GMP_IMG_PATH, 'loader' => GMP_LOADER_IMG, 'close' => GMP_IMG_PATH . 'cross.gif', 'ajaxurl' => $ajaxurl, 'animationSpeed' => frameGmp::_()->getModule('options')->get('js_animation_speed'), 'GMP_CODE' => GMP_CODE);
        return '<script type="text/javascript">
		// <!--
			var GMP_DATA = ' . utilsGmp::jsonEncode($jsData) . ';
		// -->
		</script>';
    }
开发者ID:Roman921,项目名称:Step-21,代码行数:13,代码来源:templateView.php

示例13: getOrdersList

 public function getOrdersList($uid = 0)
 {
     $user = frameGmp::_()->getModule('user')->getCurrent();
     $searchCriteria = array();
     if (!$user->isAdmin) {
         if (!$uid || !is_numeric($uid)) {
             //!is_numeric($uid) is becouse WP add some first parametr when adding the_content hook
             $uid = $user->ID;
         }
         $searchCriteria['user_id'] = $uid;
     }
     frameGmp::_()->getModule('order')->getView()->getAllOrders($searchCriteria);
 }
开发者ID:Roman921,项目名称:Step-21,代码行数:13,代码来源:user.php

示例14: getOverviewTabContent

 public function getOverviewTabContent()
 {
     frameGmp::_()->getModule('templates')->loadJqueryUi();
     frameGmp::_()->getModule('templates')->loadSlimscroll();
     frameGmp::_()->addScript('admin.overview', $this->getModule()->getModPath() . 'js/admin.overview.js');
     frameGmp::_()->addStyle('admin.overview', $this->getModule()->getModPath() . 'css/admin.overview.css');
     $this->assign('mainLink', $this->getModule()->getMainLink());
     $this->assign('faqList', $this->getFaqList());
     $this->assign('serverSettings', $this->getServerSettings());
     $this->assign('news', $this->getNewsContent());
     $this->assign('contactFields', $this->getModule()->getContactFormFields());
     return parent::getContent('overviewTabContent');
 }
开发者ID:spokencode,项目名称:bophillips,代码行数:13,代码来源:supsystic_promo.php

示例15: adminTextEditorPopup

 public function adminTextEditorPopup()
 {
     $shortcodes = frameGmp::_()->getModule('shortcodesGmp')->getCodes();
     $shortcodesSelectOptions = array('' => langGmp::_('Select'));
     foreach ($shortcodes as $code => $cinfo) {
         if (in_array($code, array('product', 'category'))) {
             continue;
         }
         $shortcodesSelectOptions[$code] = $code;
     }
     $this->assign('shortcodesGmp', $shortcodes);
     $this->assign('shortcodesSelectOptions', $shortcodesSelectOptions);
     return parent::getContent('adminTextEditorPopup');
 }
开发者ID:Roman921,项目名称:Step-21,代码行数:14,代码来源:shortcodes.php


注:本文中的frameGmp类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。