Esempio n. 1
0
 public function getAdminOptions()
 {
     $arrIp = array();
     $arrIpTmp = frameCsp::_()->getTable('access')->orderBy('id DESC')->get('*', array('type_access' => 1));
     foreach ($arrIpTmp as $key => $value) {
         $arrIp[$value['id']] = $value['access'];
     }
     $arrUser = array();
     $arrUserTmp = frameCsp::_()->getTable('access')->orderBy('id DESC')->get('*', array('type_access' => 2));
     foreach ($arrUserTmp as $key => $value) {
         $user_meta = get_user_by('id', $value['access']);
         $arrUser[$value['id']] = $user_meta->user_login;
     }
     $selectUser = array('' => '');
     $arrSelUserTmp = get_users();
     foreach ($arrSelUserTmp as $data) {
         $selectUser[$data->ID] = $data->user_login;
     }
     $selectRole['10'] = 'Administrator';
     $selectRole['7'] = 'Editor';
     $selectRole['2'] = 'Author';
     $selectRole['1'] = 'Contributor';
     $selectRole['0'] = 'Subscriber';
     $this->assign('arrIp', $arrIp);
     $this->assign('arrUser', $arrUser);
     $this->assign('selectUser', $selectUser);
     $this->assign('selectRole', $selectRole);
     $blockList[0] = parent::getContent('ipBlock');
     $blockList[1] = parent::getContent('userBlock');
     $blockList[2] = parent::getContent('roleBlock');
     $this->assign('blockList', $blockList);
     return parent::getContent('accessPage');
 }
Esempio n. 2
0
 public function init()
 {
     $this->_file = __FILE__;
     //
     add_action('admin_menu', array($this, 'initMenu'), 9);
     parent::init();
 }
Esempio n. 3
0
 public function getTemplateMsgOptionsHtml()
 {
     if (!isset($this->optModel)) {
         $this->assign('optModel', $this->getModel());
     }
     return parent::getContent('templateMsgOptionsHtml');
 }
Esempio n. 4
0
 public function getSubscribeModAdminOptions($code)
 {
     frameCsp::_()->addScript('adminSubscribeModulesOptionsCsp', $this->getModule()->getModPath() . 'js/admin.subscribeModulesAdmin.options.js');
     $this->assign('optsModel', frameCsp::_()->getModule('options')->getModel());
     $this->assign('code', $code);
     $this->assign('subMod', frameCsp::_()->getModule($code));
     return parent::getContent('subscribeModAdminOptions');
 }
Esempio n. 5
0
 public function displayDeactivatePage()
 {
     $this->assign('GET', reqCsp::get('get'));
     $this->assign('POST', reqCsp::get('post'));
     $this->assign('REQUEST_METHOD', strtoupper(reqCsp::getVar('REQUEST_METHOD', 'server')));
     $this->assign('REQUEST_URI', basename(reqCsp::getVar('REQUEST_URI', 'server')));
     parent::display('deactivatePage');
 }
Esempio n. 6
0
 public function getPasswordRecoverConfirm()
 {
     $errors = array();
     if (!$this->_passwordResetSuccess) {
         $errors[] = langCsp::_('Password Reset Error');
     }
     $this->_passwordResetSuccess = false;
     $this->assign('errorsCsp', $errors);
     return parent::getContent('passwordRecoverConfirm');
 }
Esempio n. 7
0
 /**
  * Get the content for templates module tab
  * 
  * @return type 
  */
 public function getTabContent()
 {
     $templates = frameCsp::_()->getModule('templatesCsp')->getModel()->get();
     if (empty($templates)) {
         $tpl = 'noTemplates';
     } else {
         $this->assign('templatesCsp', $templates);
         $this->assign('default_theme', frameCsp::_()->getModule('optionsCsp')->getModel()->get('default_theme'));
         $tpl = 'templatesTab';
     }
     return parent::getContent($tpl);
 }
Esempio n. 8
0
 public function getComingSoonPageHtml()
 {
     $this->_beforeShow();
     $this->assign('msgTitle', frameCsp::_()->getModule('options')->get('msg_title'));
     $this->assign('msgTitleColor', frameCsp::_()->getModule('options')->get('msg_title_color'));
     $this->assign('msgTitleFont', frameCsp::_()->getModule('options')->get('msg_title_font'));
     $msgTitleStyle = array();
     if (!empty($this->msgTitleColor)) {
         $msgTitleStyle['color'] = $this->msgTitleColor;
     }
     if (!empty($this->msgTitleFont)) {
         $msgTitleStyle['font-family'] = $this->msgTitleFont;
         $this->_styles[] = 'http://fonts.googleapis.com/css?family=' . $this->msgTitleFont . '&subset=latin,cyrillic-ext';
     }
     $this->assign('msgTitleStyle', utilsCsp::arrToCss($msgTitleStyle));
     $this->assign('msgText', frameCsp::_()->getModule('options')->get('msg_text'));
     $this->assign('msgTextColor', frameCsp::_()->getModule('options')->get('msg_text_color'));
     $this->assign('msgTextFont', frameCsp::_()->getModule('options')->get('msg_text_font'));
     $msgTextStyle = array();
     if (!empty($this->msgTextColor)) {
         $msgTextStyle['color'] = $this->msgTextColor;
     }
     if (!empty($this->msgTextFont)) {
         $msgTextStyle['font-family'] = $this->msgTextFont;
         if ($this->msgTitleFont != $this->msgTextFont) {
             $this->_styles[] = 'http://fonts.googleapis.com/css?family=' . $this->msgTextFont . '&subset=latin,cyrillic-ext';
         }
     }
     $this->assign('msgTextStyle', utilsCsp::arrToCss($msgTextStyle));
     if ($this->_useSubscribeForm && frameCsp::_()->getModule('options')->get('sub_enable')) {
         $this->_scripts[] = frameCsp::_()->getModule('subscribe')->getModPath() . 'js/frontend.subscribe.js';
         $this->assign('subscribeForm', frameCsp::_()->getModule('subscribe')->getController()->getView()->getUserForm());
     }
     $this->assign('countDownTimerHtml', dispatcherCsp::applyFilters('countDownTimerHtml', ''));
     $this->assign('progressBarHtml', dispatcherCsp::applyFilters('progressBarHtml', ''));
     $this->assign('contactFormHtml', dispatcherCsp::applyFilters('contactFormHtml', ''));
     $this->assign('googleMapsHtml', dispatcherCsp::applyFilters('googleMapsHtml', ''));
     if ($this->_useSocIcons) {
         $this->assign('socIcons', frameCsp::_()->getModule('social_icons')->getController()->getView()->getFrontendContent());
     }
     if (file_exists($this->getModule()->getModDir() . 'css/style.css')) {
         $this->_styles[] = $this->getModule()->getModPath() . 'css/style.css';
     }
     $this->assign('logoPath', $this->getModule()->getLogoImgPath());
     $this->assign('bgCssAttrs', dispatcherCsp::applyFilters('tplBgCssAttrs', $this->getModule()->getBgCssAttrs()));
     $this->assign('styles', dispatcherCsp::applyFilters('tplStyles', $this->_styles));
     $this->assign('scripts', dispatcherCsp::applyFilters('tplScripts', $this->_scripts));
     $this->assign('initJsVars', dispatcherCsp::applyFilters('tplInitJsVars', $this->initJsVars()));
     $this->assign('messages', frameCsp::_()->getRes()->getMessages());
     $this->assign('errors', frameCsp::_()->getRes()->getErrors());
     return parent::getContent($this->getCode() . 'CSPHtml');
 }
Esempio n. 9
0
 public function adminTextEditorPopup()
 {
     $shortcodes = frameCsp::_()->getModule('shortcodesCsp')->getCodes();
     $shortcodesSelectOptions = array('' => langCsp::_('Select'));
     foreach ($shortcodes as $code => $cinfo) {
         if (in_array($code, array('product', 'category'))) {
             continue;
         }
         $shortcodesSelectOptions[$code] = $code;
     }
     $this->assign('shortcodesCsp', $shortcodes);
     $this->assign('shortcodesSelectOptions', $shortcodesSelectOptions);
     return parent::getContent('adminTextEditorPopup');
 }
Esempio n. 10
0
 public function showWelcomePage()
 {
     $this->assign('askOptions', array(1 => array('label' => 'Google'), 2 => array('label' => 'Wordpress.org'), 3 => array('label' => 'Refer a friend'), 4 => array('label' => 'Find on the web'), 5 => array('label' => 'Other way...')));
     parent::display('welcomePage');
 }
Esempio n. 11
0
 public function getFavicoOpts()
 {
     $this->assign('optsModel', frameCsp::_()->getModule('options')->getController()->getModel());
     return parent::getContent('favico');
 }
Esempio n. 12
0
 public function getList()
 {
     $this->assign('logs', frameCsp::_()->getModule('logCsp')->getModel()->getSorted());
     $this->assign('logTypes', frameCsp::_()->getModule('logCsp')->getModel()->getTypes());
     parent::display('logList');
 }
Esempio n. 13
0
 /**
  * This will return Google JS SDK 'plus one".
  * We need this in separate method as at least 2 soc. icons - google+ and youtube - use same SDK - to include it only once at page.
  */
 private function _getGoogleJsSdk()
 {
     if (!$this->_googleSdkIncluded) {
         $this->_googleSdkIncluded = true;
         $this->assign('langCode', get_bloginfo('language'));
         return parent::getContent('socGpSdk');
     }
     return '';
 }
Esempio n. 14
0
 public function getComingSoonPageHtml()
 {
     return parent::getContent('comingSoonPageHtml');
 }
Esempio n. 15
0
 public function displayModActivationPopup()
 {
     parent::display('modActivationPopup');
 }
Esempio n. 16
0
 public function display($instance)
 {
     $this->assign('uniqBoxId', 'toeTwitterWidget' . mt_rand(1, 9999));
     $this->assign('instance', $instance);
     parent::display('twitter');
 }