本文整理汇总了PHP中DesignBoxAdmin函数的典型用法代码示例。如果您正苦于以下问题:PHP DesignBoxAdmin函数的具体用法?PHP DesignBoxAdmin怎么用?PHP DesignBoxAdmin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DesignBoxAdmin函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionAdmin
function actionAdmin($sName = '')
{
$GLOBALS['iAdminPage'] = 1;
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
$sUri = $this->_oConfig->getUri();
check_logged();
if (!@isAdmin()) {
send_headers_page_changed();
login_form("", 1);
exit;
}
//--- Process actions ---//
$mixedResultSettings = '';
if (isset($_POST['save']) && isset($_POST['cat'])) {
$mixedResultSettings = $this->setSettings($_POST);
}
//--- Process actions ---//
$aDetailsBox = $this->getDetailsForm(BX_PMT_ADMINISTRATOR_ID);
$aPendingOrdersBox = $this->getOrdersBlock(BX_PMT_ORDERS_TYPE_PENDING, BX_PMT_ADMINISTRATOR_ID);
$aProcessedOrdersBox = $this->getOrdersBlock(BX_PMT_ORDERS_TYPE_PROCESSED, BX_PMT_ADMINISTRATOR_ID);
$aSubscriptionOrdersBox = $this->getOrdersBlock(BX_PMT_ORDERS_TYPE_SUBSCRIPTION, BX_PMT_ADMINISTRATOR_ID);
$sContent = '';
$sContent .= $this->_oTemplate->getJsCode('orders', true);
$sContent .= DesignBoxAdmin(_t($this->_sLangsPrefix . 'bcpt_settings'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $this->getSettingsForm($mixedResultSettings))));
$sContent .= DesignBoxAdmin(_t($this->_sLangsPrefix . 'bcpt_details'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $aDetailsBox[0])));
$sContent .= DesignBoxAdmin(_t($this->_sLangsPrefix . 'bcpt_pending_orders'), $aPendingOrdersBox[0]);
$sContent .= DesignBoxAdmin(_t($this->_sLangsPrefix . 'bcpt_processed_orders'), $aProcessedOrdersBox[0]);
$sContent .= DesignBoxAdmin(_t($this->_sLangsPrefix . 'bcpt_subscription_orders'), $aSubscriptionOrdersBox[0]);
$sContent .= $this->getMoreWindow();
$sContent .= $this->getManualOrderWindow();
$this->_oTemplate->addAdminJs(array('orders.js', '_orders.js'));
$this->_oTemplate->addAdminCss(array('orders.css', '_orders.css'));
$aParams = array('title' => array('page' => _t($this->_sLangsPrefix . 'pcpt_administration')), 'content' => array('page_main_code' => $sContent));
$this->_oTemplate->getPageCodeAdmin($aParams);
}
示例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: adm_hosting_promo
function adm_hosting_promo()
{
if (getParam('feeds_enable') != 'on') {
return '';
}
return DesignBoxAdmin(_t('_adm_txt_hosting_title'), $GLOBALS['oAdmTemplate']->parseHtmlByName('hosting_promo.html', array()), '', '', 11);
}
示例4: getInstalled
function getInstalled()
{
//--- Get Items ---//
$oModules = new BxDolModuleDb();
$aModules = $oModules->getModules();
$aItems = array();
foreach ($aModules as $aModule) {
if (strpos($aModule['dependencies'], $aModule['uri']) !== false) {
continue;
}
$sUpdate = '';
if (in_array($aModule['path'], $this->_aCheckPathes)) {
$aCheckInfo = BxDolInstallerUi::checkForUpdates($aModule);
$sUpdate = $this->_parseUpdate($aCheckInfo);
}
$aItems[] = array('name' => $aModule['uri'], 'value' => $aModule['path'], 'title' => _t('_adm_txt_modules_title_module', $aModule['title'], !empty($aModule['version']) ? $aModule['version'] : $this->_sDefVersion, $aModule['vendor']), 'can_update' => isset($aModule['update_url']) && !empty($aModule['update_url']) ? 1 : 0, 'update' => $sUpdate);
}
//--- Get Controls ---//
$aButtons = array('modules-uninstall' => array('type' => 'submit', 'name' => 'modules-uninstall', 'value' => _t('_adm_btn_modules_uninstall'), 'onclick' => 'onclick="javascript: return ' . BX_DOL_ADM_MM_JS_NAME . '.onSubmitUninstall(this);"'), 'modules-recompile-languages' => _t('_adm_btn_modules_recompile_languages'));
$oZ = new BxDolAlerts('system', 'admin_modules_buttons', 0, 0, array('place' => 'installed', 'buttons' => &$aButtons));
$oZ->alert();
$sContent = $GLOBALS['oAdmTemplate']->parseHtmlByName('modules_list.html', array('type' => 'installed', 'bx_repeat:items' => !empty($aItems) ? $aItems : MsgBox(_t('_Empty')), 'controls' => BxTemplSearchResult::showAdminActionsPanel('modules-installed-form', $aButtons, 'pathes')));
$aTopMenu = array('modules-update' => array('title' => '_adm_btn_modules_update', 'href' => 'javascript:void(0)', 'onclick' => 'javascript:' . BX_DOL_ADM_MM_JS_NAME . '.checkForUpdates(this);'));
$GLOBALS['oAdmTemplate']->addJsTranslation(array('_adm_txt_modules_data_will_be_lost'));
return DesignBoxAdmin(_t('_adm_box_cpt_installed_modules'), $sContent, $aTopMenu);
}
示例5: _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));
}
示例6: PageCodeLogo
function PageCodeLogo($mixedResultLogo)
{
$aForm = array('form_attrs' => array('id' => 'adm-settings-form-logo', 'name' => 'adm-settings-form-logo', 'action' => $GLOBALS['site']['url_admin'] . 'basic_settings.php', 'method' => 'post', 'enctype' => 'multipart/form-data'), 'params' => array(), 'inputs' => array('upload_header_beg' => array('type' => 'block_header', 'caption' => _t('_adm_txt_settings_logo_header'), 'collapsable' => false, 'collapsed' => false), 'old_file' => array('type' => 'custom', 'content' => getMainLogo(), 'colspan' => true), 'new_file' => array('type' => 'file', 'name' => 'new_file', 'caption' => _t('_adm_txt_settings_logo_upload'), 'value' => ''), 'resize_header_beg' => array('type' => 'block_header', 'caption' => _t('_adm_txt_settings_resize_header'), 'collapsable' => false, 'collapsed' => false), 'resize' => array('type' => 'checkbox', 'name' => 'resize', 'caption' => _t('_adm_txt_settings_resize_enable'), 'value' => 'yes', 'checked' => true), 'new_width' => array('type' => 'text', 'name' => 'new_width', 'caption' => _t('_adm_txt_settings_resize_width'), 'value' => '64'), 'new_height' => array('type' => 'text', 'name' => 'new_height', 'caption' => _t('_adm_txt_settings_resize_height'), 'value' => '64'), 'resize_header_end' => array('type' => 'block_end'), 'upload' => array('type' => 'submit', 'name' => 'upload', 'value' => _t("_adm_btn_settings_upload"))));
$oForm = new BxTemplFormView($aForm);
$sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $oForm->getCode()));
if ($mixedResultLogo !== true && !empty($mixedResultLogo)) {
$sResult = MsgBox(_t($mixedResultLogo), 3) . $sResult;
}
return DesignBoxAdmin(_t('_adm_box_cpt_logo'), $sResult);
}
示例7: 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);
}
示例8: PageCodeSitemap
function PageCodeSitemap()
{
global $aPages;
$oForm = new BxDolAdmFormSitemap();
$aList = BxDolSiteMapsQuery::getAllActiveSystemsFromCache();
$aListForTemplate = array();
foreach ($aList as $i => $a) {
$aListForTemplate[] = array('title_translated' => _t($a['title']));
}
$s = $GLOBALS['oAdmTemplate']->parseHtmlByName('sitemap.html', array('form' => $oForm->getCode(), 'desc' => _t('_sys_sitemap_desc', BxDolSiteMaps::getSiteMapIndexUrl()), 'bx_repeat:list' => $aListForTemplate));
return DesignBoxAdmin($GLOBALS['sPageTitle'], $s);
}
示例9: actionGetPageRules
function actionGetPageRules()
{
send_headers_page_changed();
if (!isAdmin()) {
$this->_oTemplate->displayAccessDenied();
}
header('Content-Type: text/html; charset=utf-8');
$sRet = DesignBoxAdmin(_t('_bx_pageac_current_rules'), $this->actionGetRulesList(true), '', '', 11);
$sRet .= DesignBoxAdmin(_t('_bx_pageac_new_rule'), $this->_oTemplate->displayNewRuleForm(), '', '', 11);
$sRet .= DesignBoxAdmin(_t('_bx_pageac_note'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => _t('_bx_pageac_note_text'))));
return $sRet;
}
示例10: displaySearchBox
function displaySearchBox($sCode, $sPaginate = '', $bAdminBox = false)
{
$sMenu = '';
if (isset($this->aCurrent['rss']) && $this->aCurrent['rss']['link']) {
bx_import('BxDolPageView');
$sMenu = BxDolPageView::getBlockCaptionItemCode(time(), array(_t('RSS') => array('href' => $this->aCurrent['rss']['link'] . (false === strpos($this->aCurrent['rss']['link'], '?') ? '?' : '&') . 'rss=1', 'icon' => 'rss')));
}
$sTitle = _t($this->aCurrent['title']);
if (!$bAdminBox) {
$sCode = DesignBoxContent($sTitle, $sCode . $sPaginate, 1, $sMenu);
} else {
$sCode = DesignBoxAdmin($sTitle, $sCode, '', $sPaginate, 1);
}
if (!isset($_GET['searchMode'])) {
$sCode = '<div id="page_block_' . $this->id . '">' . $sCode . '<div class="clear_both"></div></div>';
}
return $sCode;
}
示例11: 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);
}
示例12: getManageClassifiedsForm
/**
* Compose Form to managing with Classifieds, subs, and custom fields
*
* @return HTML presentation of data
*/
function getManageClassifiedsForm($iCategoryID = 0, $bOnlyForm = false)
{
$sAction = 'add_main_category';
$sTitle = $sDescription = '';
$sCustomName1 = $sCustomName2 = $sUnit = $sUnit2 = $sPicture = '';
if ($iCategoryID) {
$aCatInfos = $this->_oDb->getCatInfo($iCategoryID);
$sTitle = $aCatInfos[0]['Name'];
$sDescription = $aCatInfos[0]['Description'];
$sCustomName1 = $aCatInfos[0]['CustomFieldName1'];
$sCustomName2 = $aCatInfos[0]['CustomFieldName2'];
$sUnit = $aCatInfos[0]['Unit1'];
$sUnit2 = $aCatInfos[0]['Unit2'];
$sPicture = $aCatInfos[0]['Picture'];
}
//adding form
$aForm = array('form_attrs' => array('name' => 'create_main_cats_form', 'action' => $oAds->sCurrBrowsedFile, 'method' => 'post'), 'params' => array('db' => array('table' => $this->_oConfig->sSQLCatTable, 'key' => 'ID', 'submit_name' => 'add_button')), 'inputs' => array('action' => array('type' => 'hidden', 'name' => 'action', 'value' => $sAction), 'Name' => array('type' => 'text', 'name' => 'Name', 'caption' => _t('_Title'), 'required' => true, 'value' => $sTitle, 'checker' => array('func' => 'length', 'params' => array(3, 64), 'error' => _t('_bx_ads_title_error_desc', 64)), 'db' => array('pass' => 'Xss')), 'Description' => array('type' => 'text', 'name' => 'Description', 'caption' => _t('_Description'), 'required' => true, 'value' => $sDescription, 'checker' => array('func' => 'length', 'params' => array(3, 128), 'error' => _t('_bx_ads_description_error_desc', 128)), 'db' => array('pass' => 'Xss')), 'CustomFieldName1' => array('type' => 'text', 'name' => 'CustomFieldName1', 'caption' => _t('_bx_ads_customFieldName1'), 'required' => false, 'value' => $sCustomName1, 'db' => array('pass' => 'Xss')), 'Unit1' => array('type' => 'text', 'name' => 'Unit1', 'caption' => _t('_bx_ads_Unit') . ' 1', 'required' => false, 'value' => $sUnit, 'db' => array('pass' => 'Xss')), 'CustomFieldName2' => array('type' => 'text', 'name' => 'CustomFieldName2', 'caption' => _t('_bx_ads_customFieldName2'), 'required' => false, 'value' => $sCustomName2, 'db' => array('pass' => 'Xss')), 'Unit2' => array('type' => 'text', 'name' => 'Unit2', 'caption' => _t('_bx_ads_Unit') . ' 2', 'required' => false, 'value' => $sUnit2, 'db' => array('pass' => 'Xss')), 'Picture' => array('type' => 'text', 'name' => 'Picture', 'caption' => _t('_Picture'), 'info' => _t('_In') . ' \\modules\\boonex\\ads\\templates\\base\\images\\icons\'', 'value' => $sPicture, 'db' => array('pass' => 'Xss')), 'add_button' => array('type' => 'submit', 'name' => 'add_button', 'value' => $iCategoryID ? _t('_Edit') : _t('_bx_ads_add_main_category'))));
if ($iCategoryID) {
$aForm['inputs']['hidden_postid'] = array('type' => 'hidden', 'name' => 'id', 'value' => $iCategoryID);
}
$sCode = '';
$oForm = new BxTemplFormView($aForm);
$oForm->initChecker();
if ($oForm->isSubmittedAndValid()) {
$aValsAdd = array();
if ($iCategoryID == 0) {
$sCategUri = uriGenerate(bx_get('Name'), $this->_oConfig->sSQLCatTable, 'CEntryUri');
$aValsAdd['CEntryUri'] = $sCategUri;
}
$iLastId = -1;
if ($iCategoryID > 0) {
$oForm->update($iCategoryID, $aValsAdd);
$iLastId = $iCategoryID;
} else {
$iLastId = $oForm->insert($aValsAdd);
}
if ($iLastId > 0) {
$sCode = MsgBox(_t('_bx_ads_Main_category_successfully_added'), 3);
} else {
$sCode = MsgBox(_t('_bx_ads_Main_category_failed_add'), 3);
}
}
if ($bOnlyForm) {
return $sCode . $oForm->getCode();
}
$sActions = array('add_subcat' => array('href' => 'javascript: void(0);', 'title' => _t('_bx_ads_add_subcategory'), 'onclick' => 'loadHtmlInPopup(\'ads_add_sub_category\', \'modules/boonex/ads/post_mod_ads.php?action=add_sub_category\');', 'active' => 0), 'manager' => array('href' => 'javascript: void(0);', 'title' => _t('_bx_ads_category_manager'), 'onclick' => 'loadHtmlInPopup(\'ads_category_manager\', \'modules/boonex/ads/post_mod_ads.php?action=category_manager\');', 'active' => 0));
return DesignBoxAdmin(_t('_bx_ads_Manage_categories_form'), $sCode . $oForm->getCode(), $sActions, '', 11);
}
示例13: array
$sResult = $oInstallerUi->actionRecompile($_POST['pathes']);
}
}
}
}
if (isset($_POST['updates-install']) && is_array($_POST['pathes']) && !empty($_POST['pathes'])) {
$sResult = $oInstallerUi->actionUpdate($_POST['pathes']);
}
if (isset($_POST['updates-delete']) && is_array($_POST['pathes']) && !empty($_POST['pathes'])) {
$sResultDeleteUpdate = $oInstallerUi->actionDelete($_POST['pathes']);
} else {
if (isset($_POST['submit_upload']) && isset($_FILES['module']) && !empty($_FILES['module']['tmp_name'])) {
$sResultUpload = $oInstallerUi->actionUpload('module', $_FILES['module'], $_POST);
} else {
if (isset($_POST['submit_upload']) && isset($_FILES['update']) && !empty($_FILES['update']['tmp_name'])) {
$sResultUpload = $oInstallerUi->actionUpload('update', $_FILES['update'], $_POST);
}
}
}
//--- Display cotent ---//
$iNameIndex = 7;
$_page['name_index'] = $iNameIndex;
$_page['css_name'] = array('forms_adv.css', 'modules.css');
$_page['header'] = "Modules";
$_page_cont[$iNameIndex] = array('page_code_results' => !empty($sResult) ? DesignBoxAdmin(_t('_adm_box_cpt_operation_results'), $sResult) : '', 'page_code_uploader' => DesignBoxAdmin(_t('_adm_box_cpt_upload'), $oInstallerUi->getUploader($sResultUpload), array(array('title' => _t('_adm_txt_get_new_modules'), 'href' => "http://www.boonex.com/unity/extensions/home/"))), 'page_code_installed' => DesignBoxAdmin(_t('_adm_box_cpt_installed_modules'), $oInstallerUi->getInstalled()), 'page_code_not_installed' => DesignBoxAdmin(_t('_adm_box_cpt_not_installed_modules'), $oInstallerUi->getNotInstalled($sResultDeleteModule)), 'page_code_updates' => DesignBoxAdmin(_t('_adm_box_cpt_available_updates'), $oInstallerUi->getUpdates($sResultDeleteUpdate)), 'page_code_market_feed' => 'on' == getParam('feeds_enable') ? DesignBoxAdmin(_t('_adm_box_cpt_featured_modules'), '
<div class="RSSAggrCont" rssid="boonex_unity_market_featured" rssnum="5" member="0">
<div class="loading_rss">
<img src="' . getTemplateImage('loading.gif') . '" alt="' . _t('_loading ...') . '" />
</div>
</div>') : '');
PageCodeAdmin();
示例14: actionAdmin
function actionAdmin()
{
$GLOBALS['iAdminPage'] = 1;
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
check_logged();
if (!@isAdmin()) {
send_headers_page_changed();
login_form("", 1);
exit;
}
//--- Process actions ---//
$mixedResultSettings = '';
if (isset($_POST['save']) && isset($_POST['cat'])) {
$mixedResultSettings = $this->setSettings($_POST);
}
if (isset($_POST['feedback-approve'])) {
$this->_actPublish($_POST['feedback-ids'], true);
} else {
if (isset($_POST['feedback-reject'])) {
$this->_actPublish($_POST['feedback-ids'], false);
} else {
if (isset($_POST['feedback-delete'])) {
$this->_actDelete($_POST['feedback-ids']);
}
}
}
//--- Process actions ---//
$sFilterValue = '';
if (isset($_GET['feedback-filter'])) {
$sFilterValue = process_db_input($_GET['feedback-filter'], BX_TAGS_STRIP);
}
$sContent = DesignBoxAdmin(_t('_feedback_bcaption_settings'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $this->getSettingsForm($mixedResultSettings))));
$sContent .= DesignBoxAdmin(_t('_feedback_bcaption_view_admin'), $this->serviceAdminBlock(0, 0, $sFilterValue));
$aParams = array('title' => array('page' => _t('_feedback_pcaption_admin')), 'content' => array('page_main_code' => $sContent));
$this->_oTemplate->getPageCodeAdmin($aParams);
}
示例15: adminBlock
/**
* Methods for admin-panel
*/
function adminBlock($sContent, $sTitle, $aMenu = array())
{
return DesignBoxAdmin($sTitle, $sContent, $aMenu);
}