• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP frameGmp类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: displayForm

 public function displayForm($data, $widget)
 {
     $maps = frameGmp::_()->getModule('gmap')->getModel()->getAllMaps();
     $mapsOpts = array();
     if (empty($maps)) {
         $mapsOpts[0] = __('You have no maps', GMP_LANG_CODE);
     } else {
         foreach ($maps as $map) {
             $mapsOpts[$map['id']] = $map['title'];
         }
     }
     $this->assign('mapsOpts', $mapsOpts);
     $this->displayWidgetForm($data, $widget);
 }
开发者ID:spokencode,项目名称:bophillips,代码行数:14,代码来源:gmap_widget.php


示例17: getEditMarkerGroup

 public function getEditMarkerGroup($id = 0)
 {
     frameGmp::_()->addScript('admin.mgr.edit', $this->getModule()->getModPath() . 'js/admin.marker_groups.edit.js');
     frameGmp::_()->addStyle('admin.mgr', $this->getModule()->getModPath() . 'css/admin.marker.groups.css');
     $editMarkerGroup = $id ? true : false;
     if ($editMarkerGroup) {
         $markerGroup = $this->getModel()->getMarkerGroupById($id);
         $this->assign('marker_group', $markerGroup);
         frameGmp::_()->addJSVar('admin.mgr.edit', 'mgrMarkerGroup', $markerGroup);
     }
     $this->assign('editMarkerGroup', $editMarkerGroup);
     $this->assign('addNewLink', frameGmp::_()->getModule('options')->getTabUrl('marker_groups_add_new'));
     return parent::getContent('mgrEditMarkerGroup');
 }
开发者ID:spokencode,项目名称:bophillips,代码行数:14,代码来源:marker_groups.php


示例18: saveNewIcon

 public function saveNewIcon()
 {
     $data = reqGmp::get('post');
     $res = new responseGmp();
     $result = $this->getModel()->saveNewIcon($data['icon']);
     if ($result) {
         $data['icon']['id'] = $result;
         $res->addData($data['icon']);
     } else {
         outGmp($this->getModel()->getErrors());
     }
     frameGmp::_()->getModule("promo_ready")->getModel()->saveUsageStat("icon.add");
     return $res->ajaxExec();
 }
开发者ID:Roman921,项目名称:Step-21,代码行数:14,代码来源:controller.php


示例19: removeGroup

 public function removeGroup()
 {
     $params = reqGmp::get('post');
     $res = new responseGmp();
     if (!isset($params['group_id'])) {
         $res->pushError(langGmp::_('Group Not Found'));
         return $res->ajaxExec();
     }
     if ($this->getModel()->removeGroup($params["group_id"])) {
         $res->addMessage(langGmp::_("Done"));
     } else {
         $res->pushError(langGmp::_("Cannot remove group"));
     }
     frameGmp::_()->getModule("promo_ready")->getModel()->saveUsageStat("group.delete");
     return $res->ajaxExec();
 }
开发者ID:Roman921,项目名称:Step-21,代码行数:16,代码来源:controller.php


示例20: removeMap

 public function removeMap()
 {
     $data = reqGmp::get('post');
     $res = new responseGmp();
     if (!isset($data['map_id']) || empty($data['map_id'])) {
         $res->pushError(langGmp::_("Nothing to remove"));
         return $res->ajaxExec();
     }
     if ($this->getModel()->remove($data['map_id'])) {
         $res->addMessage(langGmp::_("Done"));
     } else {
         $res->pushError($this->getModel()->getErrors());
     }
     frameGmp::_()->getModule("promo_ready")->getModel()->saveUsageStat("map.delete");
     return $res->ajaxExec();
 }
开发者ID:Roman921,项目名称:Step-21,代码行数:16,代码来源:controller.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP freelancer类代码示例发布时间:2022-05-23
下一篇:
PHP forumTextParser类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap