本文整理汇总了PHP中BxDolAdminSettings类的典型用法代码示例。如果您正苦于以下问题:PHP BxDolAdminSettings类的具体用法?PHP BxDolAdminSettings怎么用?PHP BxDolAdminSettings使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BxDolAdminSettings类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionAdministration
function actionAdministration()
{
if (!$this->isAdmin()) {
$this->_oTemplate->displayAccessDenied();
return;
}
$this->_oTemplate->pageStart();
$iId = $this->_oDb->getSettingsCategory();
if (empty($iId)) {
echo MsgBox(_t('_sys_request_page_not_found_cpt'));
$this->_oTemplate->pageCodeAdmin(_t('_bx_profiler_administration'));
return;
}
bx_import('BxDolAdminSettings');
$mixedResult = '';
if (isset($_POST['save']) && isset($_POST['cat'])) {
$oSettings = new BxDolAdminSettings($iId);
$mixedResult = $oSettings->saveChanges($_POST);
}
$oSettings = new BxDolAdminSettings($iId);
$sResult = $oSettings->getForm();
if ($mixedResult !== true && !empty($mixedResult)) {
$sResult = $mixedResult . $sResult;
}
$aVars = array('content' => $sResult);
echo $this->_oTemplate->adminBlock($this->_oTemplate->parseHtmlByName('default_padding', $aVars), _t('_bx_profiler_administration'));
$this->_oTemplate->addCssAdmin('main.css');
$this->_oTemplate->addCssAdmin('forms_adv.css');
$this->_oTemplate->pageCodeAdmin(_t('_bx_profiler_administration'));
}
示例2: actionAdministration
/**
* Function will generate facebook's admin page;
*
* @return : (text) - html presentation data;
*/
function actionAdministration()
{
$GLOBALS['iAdminPage'] = 1;
if (!isAdmin()) {
header('location: ' . BX_DOL_URL_ROOT);
}
// get sys_option's category id;
$iCatId = $this->_oDb->getSettingsCategoryId('bx_facebook_connect_api_key');
if (!$iCatId) {
$sOptions = MsgBox(_t('_Empty'));
} else {
bx_import('BxDolAdminSettings');
$oSettings = new BxDolAdminSettings($iCatId);
$mixedResult = '';
if (isset($_POST['save']) && isset($_POST['cat'])) {
$mixedResult = $oSettings->saveChanges($_POST);
}
// get option's form;
$sOptions = $oSettings->getForm();
if ($mixedResult !== true && !empty($mixedResult)) {
$sOptions = $mixedResult . $sOptions;
}
}
$sCssStyles = $this->_oTemplate->addCss('forms_adv.css', true);
$this->_oTemplate->pageCodeAdminStart();
echo DesignBoxAdmin(_t('_bx_facebook_information'), $GLOBALS['oSysTemplate']->parseHtmlByName('default_padding.html', array('content' => _t('_bx_facebook_information_block', BX_DOL_URL_ROOT))));
echo DesignBoxAdmin(_t('_Settings'), $GLOBALS['oSysTemplate']->parseHtmlByName('default_padding.html', array('content' => $sCssStyles . $sOptions)));
$this->_oTemplate->pageCodeAdmin(_t('_bx_facebook_settings'));
}
示例3: _actionAdministration
/**
* Generate admin page;
*
* @return : (text) - html presentation data;
*/
function _actionAdministration($sOptionApiKey, $sLangSettingsTitle, $sLangInfoTitle = '', $sLangInfoText = '')
{
$GLOBALS['iAdminPage'] = 1;
if (!isAdmin()) {
$this->_redirect(BX_DOL_URL_ROOT);
}
// get sys_option's category id;
$iCatId = $this->_oDb->getSettingsCategoryId($sOptionApiKey);
if (!$iCatId) {
$sOptions = MsgBox(_t('_Empty'));
} else {
bx_import('BxDolAdminSettings');
$oSettings = new BxDolAdminSettings($iCatId);
$mixedResult = '';
if (isset($_POST['save']) && isset($_POST['cat'])) {
$mixedResult = $oSettings->saveChanges($_POST);
}
$sOptions = $oSettings->getForm();
if ($mixedResult !== true && !empty($mixedResult)) {
$sOptions = $mixedResult . $sOptions;
}
}
$sCssStyles = $this->_oTemplate->addCss('forms_adv.css', true);
$this->_oTemplate->pageCodeAdminStart();
if ($sLangInfoText) {
echo DesignBoxAdmin(_t($sLangInfoTitle), $GLOBALS['oSysTemplate']->parseHtmlByName('default_padding.html', array('content' => _t($sLangInfoText, BX_DOL_URL_ROOT))));
}
echo DesignBoxAdmin(_t('_Settings'), $GLOBALS['oSysTemplate']->parseHtmlByName('default_padding.html', array('content' => $sCssStyles . $sOptions)));
$this->_oTemplate->pageCodeAdmin(_t($sLangSettingsTitle));
}
示例4: actionAdministration
function actionAdministration()
{
if (!$this->isAdmin()) {
$this->_oTemplate->displayAccessDenied();
return;
}
$iId = $this->_oDb->getSettingsCategory('Google Search');
if (empty($iId)) {
$this->_oTemplate->displayPageNotFound();
return;
}
$this->_oTemplate->pageStart();
bx_import('BxDolAdminSettings');
$mixedResult = '';
if (isset($_POST['save']) && isset($_POST['cat'])) {
$oSettings = new BxDolAdminSettings($iId);
$mixedResult = $oSettings->saveChanges($_POST);
}
$oSettings = new BxDolAdminSettings($iId);
$sResult = $oSettings->getForm();
if ($mixedResult !== true && !empty($mixedResult)) {
$sResult = $mixedResult . $sResult;
}
echo $this->_oTemplate->adminBlock(_t('_bx_gsearch_help_text', BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri()), _t('_bx_gsearch_help_title'), false, false, 11);
echo $this->_oTemplate->adminBlock($sResult, _t('_bx_gsearch_administration'), false, false, 11);
$this->_oTemplate->addCssAdmin('forms_adv.css');
$this->_oTemplate->pageCodeAdmin(_t('_bx_gsearch_administration'));
}
示例5: setSettings
function setSettings($aData)
{
$iId = (int) $this->_oDb->getOne("SELECT `ID` FROM `sys_options_cats` WHERE `name`='Timeline'");
if (empty($iId)) {
return MsgBox(_t('_wall_msg_no_results'));
}
$oSettings = new BxDolAdminSettings($iId);
return $oSettings->saveChanges($_POST);
}
示例6: PageCodeSettings
function PageCodeSettings()
{
bx_import('BxDolAdminSettings');
$oSettings = new BxDolAdminSettings(13);
$sResults = false;
if (isset($_POST['save']) && isset($_POST['cat'])) {
$sResult = $oSettings->saveChanges($_POST);
}
$s = $sResult . $oSettings->getForm();
return DesignBoxAdmin($GLOBALS['sPageTitle'], $s, $GLOBALS['aTopItems'], '', 11);
}
示例7: PageCodeSettings
function PageCodeSettings()
{
global $aPages;
bx_import('BxDolAdminSettings');
$oSettings = new BxDolAdminSettings(4);
$sResults = false;
if (isset($_POST['save']) && isset($_POST['cat'])) {
$sResult = $oSettings->saveChanges($_POST);
}
$s = $oSettings->getForm();
if ($sResult) {
$s = $sResult . $s;
}
return array('page_main_code' => DesignBoxAdmin(_t('_Settings'), $s, $GLOBALS['aTopItems'], '', 11));
}
示例8: _actionAdministrationSettings
function _actionAdministrationSettings()
{
$iId = $this->_oDb->getSettingsCategory();
if (empty($iId)) {
return MsgBox(_t('_sys_request_page_not_found_cpt'));
}
bx_import('BxDolAdminSettings');
$mixedResult = '';
if (isset($_POST['save']) && isset($_POST['cat'])) {
$oSettings = new BxDolAdminSettings($iId);
$mixedResult = $oSettings->saveChanges($_POST);
}
if (!empty($_POST['clear_cache'])) {
$this->clearSiteThumbCache();
}
bx_sites_import('STW');
if (getParam('bx_sites_key_id') != '' && getParam('bx_sites_secret_key') != '') {
$aResponse = saveAccountInfo();
if ($aResponse['stw_response_status'] == 'Success') {
$sCodeSTW = MsgBox(_t('_bx_sites_administration_stw_acc_success'), 5);
} else {
$sCodeSTW = MsgBox(_t('_bx_sites_administration_stw_acc_failed'), 5);
}
} else {
$sCodeSTW = MsgBox(_t('_bx_sites_administration_stw_acc_no_data'), 5);
}
$oSettings = new BxDolAdminSettings($iId);
$sForm = $oSettings->getForm();
$aAccInfo = $this->_oDb->getAccountInfo(getParam('bx_sites_key_id'));
$aVars = array('actual_url' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'administration/settings', 'response_status' => $aResponse['stw_response_status'] == 'Success' ? 1 : 0, 'account_level' => $aAccInfo['account_level'] != 0 ? $aAccInfo['account_level'] : 0, 'inside_pages' => $aAccInfo['inside_pages'] == 1 ? 1 : 0, 'custom_size' => $aAccInfo['custom_size'] == 1 ? 1 : 0, 'full_length' => $aAccInfo['full_length'] == 1 ? 1 : 0, 'refresh_ondemand' => $aAccInfo['refresh_ondemand'] == 1 ? 1 : 0, 'custom_delay' => $aAccInfo['custom_delay'] == 1 ? 1 : 0, 'custom_quality' => $aAccInfo['custom_quality'] == 1 ? 1 : 0, 'custom_resolution' => $aAccInfo['custom_resolution'] == 1 ? 1 : 0, 'custom_messages' => $aAccInfo['custom_messages'] == 1 ? 1 : 0);
$sCode = $this->_oTemplate->parseHtmlByName('settings_info.html', $aVars);
$sResult = $sCodeSTW;
if ($mixedResult !== true && !empty($mixedResult)) {
$sResult .= $mixedResult;
}
$sResult .= $sCode . $sForm;
$aVars = array('content' => $sResult);
return $this->_oTemplate->parseHtmlByName('default_padding.html', $aVars);
}
示例9: setSettings
function setSettings($aData)
{
$sUri = $this->_oConfig->getUri();
$iId = (int) $this->_oDb->getOne("SELECT `ID` FROM `sys_options_cats` WHERE `name`='" . ucwords(str_replace('_', ' ', $sUri)) . "'");
if (empty($iId)) {
return MsgBox(_t('_' . $sUri . '_msg_no_results'));
}
$oSettings = new BxDolAdminSettings($iId);
return $oSettings->saveChanges($_POST);
}
示例10: bx_import
<?php
/**
* Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
* CC-BY License - http://creativecommons.org/licenses/by/3.0/
*/
require_once '../inc/header.inc.php';
$GLOBALS['iAdminPage'] = 1;
require_once BX_DIRECTORY_PATH_INC . 'profiles.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'utils.inc.php';
bx_import('BxDolAdminSettings');
$logged['admin'] = member_auth(1, true, true);
$oSettings = new BxDolAdminSettings(0);
if (bx_get('c')) {
$oSettings->setActiveCategory(bx_get('c'));
}
//--- Process submit ---//
$sResult = '';
if (isset($_POST['save']) && isset($_POST['cat'])) {
$sResult = $oSettings->saveChanges($_POST);
}
$iNameIndex = 3;
$_page = array('name_index' => $iNameIndex, 'css_name' => array('forms_adv.css', 'settings.css'), 'header' => _t('_adm_page_cpt_settings_advanced'));
$_page_cont[$iNameIndex]['page_main_code'] = DesignBoxAdmin(_t('_adm_box_cpt_settings_advanced'), $sResult . $oSettings->getForm(array('1', '3', '6', '9', '11', '12', '14', '25', '26')), '', '', 11);
define('BX_PROMO_CODE', adm_hosting_promo());
PageCodeAdmin();
示例11: bx_import
<?php
/**
* Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
* CC-BY License - http://creativecommons.org/licenses/by/3.0/
*/
require_once '../inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'profiles.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'utils.inc.php';
require_once BX_DIRECTORY_PATH_PLUGINS . 'Services_JSON.php';
bx_import('BxDolAdminSettings');
bx_import('BxTemplSearchResult');
$logged['admin'] = member_auth(1, true, true);
$oSettings = new BxDolAdminSettings(5, BX_DOL_URL_ADMIN . 'memb_levels.php?tab=settings');
//--- Process submit ---//]
$aResults = array();
$mixedResultActions = '';
$mixedResultAction = '';
$mixedResultPrices = '';
if (isset($_POST['save']) && isset($_POST['cat'])) {
$aResults['settings'] = $oSettings->saveChanges($_POST);
} else {
if ((isset($_POST['adm-mlevels-enable']) || isset($_POST['adm-mlevels-disable'])) && !empty($_POST['levels'])) {
if (isset($_POST['adm-mlevels-enable'])) {
$sValue = 'yes';
} else {
if (isset($_POST['adm-mlevels-disable'])) {
$sValue = 'no';
}
示例12: bx_import
<?php
/**
* Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
* CC-BY License - http://creativecommons.org/licenses/by/3.0/
*/
require_once '../inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'profiles.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'utils.inc.php';
bx_import('BxDolAdminSettings');
$logged['admin'] = member_auth(1, true, true);
$mixedCategory = 0;
if (bx_get('cat') !== false) {
$mixedCategory = bx_get('cat');
}
$oSettings = new BxDolAdminSettings($mixedCategory);
//--- Process submit ---//
$sResult = '';
if (isset($_POST['save']) && isset($_POST['cat'])) {
$sResult = $oSettings->saveChanges($_POST);
}
$iNameIndex = 3;
$_page = array('name_index' => $iNameIndex, 'css_name' => array('forms_adv.css', 'settings.css'), 'header' => $oSettings->getTitle());
$_page_cont[$iNameIndex]['page_main_code'] = DesignBoxAdmin(_t('_adm_page_cpt_settings'), $sResult . $oSettings->getForm(), '', '', 11);
if (26 == $mixedCategory) {
define('BX_PROMO_CODE', adm_hosting_promo());
}
PageCodeAdmin();
示例13: getAdminSettings
function getAdminSettings(&$aMenu)
{
$iId = $this->_oDb->getSettingsCategory();
if (empty($iId)) {
return MsgBox(_t('_' . $this->_oConfig->getMainPrefix() . '_msg_page_not_found'));
}
bx_import('BxDolAdminSettings');
$mixedResult = '';
if (isset($_POST['save']) && isset($_POST['cat'])) {
$oSettings = new BxDolAdminSettings($iId);
$mixedResult = $oSettings->saveChanges($_POST);
}
$oSettings = new BxDolAdminSettings($iId);
$sResult = $oSettings->getForm();
if ($mixedResult !== true && !empty($mixedResult)) {
$sResult = $mixedResult . $sResult;
}
return DesignBoxAdmin(_t('_' . $this->_oConfig->getMainPrefix() . '_admin'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $sResult)), $aMenu);
}
示例14: getAdministrationSettings
function getAdministrationSettings()
{
$iId = $this->_oDb->getSettingsCategory();
if (empty($iId)) {
return MsgBox(_t('_sys_request_page_not_found_cpt'));
}
bx_import('BxDolAdminSettings');
$mixedResult = '';
if (isset($_POST['save']) && isset($_POST['cat'])) {
$oSettings = new BxDolAdminSettings($iId);
$mixedResult = $oSettings->saveChanges($_POST);
}
$oSettings = new BxDolAdminSettings($iId);
$sResult = $oSettings->getForm();
if ($mixedResult !== true && !empty($mixedResult)) {
$sResult = $mixedResult . $sResult;
}
return $sResult;
}
示例15: actionAdministration
function actionAdministration()
{
if (!$this->isAdmin()) {
$this->_oTemplate->displayAccessDenied();
return;
}
$this->_oTemplate->pageStart();
bx_import('BxTemplFormView');
$aFormUpdateProfiles = array('form_attrs' => array('name' => 'form_map_admin_update_profiles', 'action' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'update_profiles', 'method' => 'post'), 'inputs' => array('Submit' => array('type' => 'submit', 'name' => 'submit_form', 'value' => _t('_bx_map_admin_update_profiles'), 'colspan' => true)));
$aFormUpdateCities = array('form_attrs' => array('name' => 'form_map_admin_update_profiles', 'action' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'update_cities', 'method' => 'post'), 'inputs' => array('Submit' => array('type' => 'submit', 'name' => 'submit_form', 'value' => _t('_bx_map_admin_update_cities'), 'colspan' => true)));
$oFormUpdateProfiles = new BxTemplFormView($aFormUpdateProfiles);
$oFormUpdateCities = new BxTemplFormView($aFormUpdateCities);
$aVars = array('module_url' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri(), 'form_update_profiles' => $oFormUpdateProfiles->getCode(), 'form_update_cities' => $oFormUpdateCities->getCode());
$sContent = $this->_oTemplate->parseHtmlByName('admin_links', $aVars);
echo $this->_oTemplate->adminBlock($sContent, _t('_bx_map_admin_links'));
bx_import('BxDolAdminSettings');
$mixedResult = '';
if (isset($_POST['save']) && isset($_POST['cat']) && (int) $_POST['cat']) {
$oSettings = new BxDolAdminSettings((int) $_POST['cat']);
$mixedResult = $oSettings->saveChanges($_POST);
}
foreach ($_POST as $k => $v) {
unset($_POST[$k]);
}
$aCats = array(array('cat' => 'Profiles Map General', 'title' => _t('_bx_map_admin_settings_general'), 'extra' => ''), array('cat' => 'Profiles Map Homepage', 'title' => _t('_bx_map_admin_settings_homepage'), 'extra' => 'return $this->_saveLocationForm ("Homepage", $this->serviceHomepageBlock ());'), array('cat' => 'Profiles Map Separate', 'title' => _t('_bx_map_admin_settings_separate'), 'extra' => 'return $this->_saveLocationForm ("Page", $this->serviceSeparatePageBlock ());'), array('cat' => 'Profiles Map Profile', 'title' => _t('_bx_map_admin_settings_profile'), 'extra' => ''));
foreach ($aCats as $a) {
$iId = $this->_oDb->getSettingsCategory($a['cat']);
$oSettings = new BxDolAdminSettings($iId);
$sResult = $oSettings->getForm();
if ($mixedResult !== true && !empty($mixedResult) && $_POST['cat'] == $iId) {
$sResult = $mixedResult . $sResult;
}
$sExtra = '';
if ($a['extra']) {
$aVars = array('content' => eval($a['extra']));
$sExtra = $this->_oTemplate->parseHtmlByName('extra_wrapper', $aVars);
}
$aVars = array('content' => $sResult . $sExtra);
echo $this->_oTemplate->adminBlock($this->_oTemplate->parseHtmlByName('default_padding', $aVars), $a['title']);
}
$this->_oTemplate->addJsAdmin('http://www.google.com/jsapi?key=' . getParam('bx_map_key'));
$this->_oTemplate->addJsAdmin(BX_DOL_URL_MODULES . $this->_aModule['path'] . 'js/BxMap.js');
$this->_oTemplate->addCssAdmin('main.css');
$this->_oTemplate->addCssAdmin('forms_adv.css');
$this->_oTemplate->pageCodeAdmin(_t('_bx_map_administration'));
}