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); }
/** * 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')); }
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); }
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); }
/** * 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)); }
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); }
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); }
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); }
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; }
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; }
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); }
/** * 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); }
$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();
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); }
/** * Methods for admin-panel */ function adminBlock($sContent, $sTitle, $aMenu = array()) { return DesignBoxAdmin($sTitle, $sContent, $aMenu); }
function PrintStatus($sActionResult) { $sSubjC = _t('_Subject'); $sEmailsC = _t('_adm_mmail_emails'); $sEmptyQueueC = _t('_adm_mmail_Empty_Queue'); $sCupidStatusC = _t('_adm_mmail_Cupid_mails_status'); $sSingleEmailsTRs = ''; // Select count of emails in queue per one message $iCount = (int) $GLOBALS['MySQL']->getOne("SELECT COUNT(`id`) AS `count` FROM `sys_sbs_queue`"); if ($iCount <= 0) { $sSingleEmailsTRs .= "<tr><td align=center><b class='sys-adm-failed'>" . _t('_adm_mmail_no_emails_in_queue') . "</b></td></tr>"; } else { $sSingleEmailsTRs .= "<tr><td align='center'>" . _t('_adm_mmail_mails_in_queue', $iCount) . "</td></tr>"; } $sEmptyQueueTable = ''; // If queue is not empty then show link to clear it if ($iCount > 0) { $sEmptyQueueTable = "\n <div class=\"bx-def-hr\"></div>\n <table class=\"text\" width=\"50%\" style=\"height: 30px;\">\n <tr class=\"table\">\n <td align=\"center\" colspan=\"3\">\n <a href=\"" . BX_DOL_URL_ADMIN . "notifies.php?action=empty\">{$sEmptyQueueC}</a>\n </td>\n </tr>\n </table>\n <div class=\"bx-def-hr\"></div>"; } ob_start(); ?> <center> <table cellspacing=2 cellpadding=2 class=text border=0> <tr class=header align="center"><td><?php echo _t('_adm_mmail_Queue_status'); ?> :</td></tr> <?php echo $sSingleEmailsTRs; ?> </table> <?php echo $sEmptyQueueTable; ?> </center> <?php $sResult = ob_get_clean(); if (!empty($sActionResult)) { $sResult = MsgBox($sActionResult, 3) . $sResult; } return DesignBoxAdmin(_t('_adm_mmail_title'), $sResult, $GLOBALS['aTopItems'], '', 11); }
function adminBlock($sContent, $sTitle, $aMenu = array(), $sBottomItems = '', $iIndex = 1) { return DesignBoxAdmin($sTitle, $sContent, $aMenu, $sBottomItems, $iIndex); }
$sResult = $oInstallerUi->actionRecompile($_POST['pathes']); } } } } if (isset($_POST['updates-install']) && is_array($_POST['pathes']) && !empty($_POST['pathes']) && isset($aEnabledModuleAction['update_install'])) { $sResult = $oInstallerUi->actionUpdate($_POST['pathes']); } if (isset($_POST['updates-delete']) && is_array($_POST['pathes']) && !empty($_POST['pathes']) && isset($aEnabledModuleAction['update_delete'])) { $sResultDeleteUpdate = $oInstallerUi->actionDelete($_POST['pathes']); } else { if (isset($_POST['submit_upload']) && isset($_FILES['module']) && !empty($_FILES['module']['tmp_name']) && isset($aEnabledModuleAction['upload_module'])) { $sResultUpload = $oInstallerUi->actionUpload('module', $_FILES['module'], $_POST); } else { if (isset($_POST['submit_upload']) && isset($_FILES['update']) && !empty($_FILES['update']['tmp_name']) && isset($aEnabledModuleAction['upload_update'])) { $sResultUpload = $oInstallerUi->actionUpload('update', $_FILES['update'], $_POST); } } } //--- Display cotent ---// $iNameIndex = 7; $_page = array('name_index' => $iNameIndex, 'css_name' => array('forms_adv.css', 'modules.css'), 'js_name' => array('modules.js'), 'header' => _t('_adm_page_cpt_manage_modules')); $_page_cont[$iNameIndex] = array('page_code_results' => !empty($sResult) ? DesignBoxAdmin(_t('_adm_box_cpt_operation_results'), $sResult, '', '', 11) : '', 'page_code_installed' => $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_uploader' => DesignBoxAdmin(_t('_adm_box_cpt_upload'), $oInstallerUi->getUploader($sResultUpload), array(array('title' => _t('_adm_txt_get_new_modules'), 'href' => "http://www.boonex.com/market")), '', 11), '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>') : '', 'obj_name' => BX_DOL_ADM_MM_JS_NAME, 'actions_url' => $GLOBALS['site']['url_admin'] . 'modules.php'); $oZ = new BxDolAlerts('system', 'admin_modules_page', 0, 0, array('page_vars' => &$_page, 'page_cont' => &$_page_cont)); $oZ->alert(); PageCodeAdmin();
<?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();
function PageCodeMembers($sDefaultCtl = BX_DOL_ADM_MP_CTL, $sDefaultView = BX_DOL_ADM_MP_VIEW) { $aTopMenu = array('view-type-simple' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:' . BX_DOL_ADM_MP_JS_NAME . '.changeTypeView(this);', 'title' => _t('_adm_btn_mp_simple'), 'active' => $sDefaultView == 'simple' ? 1 : 0), 'view-type-extended' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:' . BX_DOL_ADM_MP_JS_NAME . '.changeTypeView(this);', 'title' => _t('_adm_btn_mp_extended'), 'active' => $sDefaultView == 'extended' ? 1 : 0), 'view-type-geeky' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:' . BX_DOL_ADM_MP_JS_NAME . '.changeTypeView(this);', 'title' => _t('_adm_btn_mp_geeky'), 'active' => $sDefaultView == 'geeky' ? 1 : 0)); $oPaginate = new BxDolPaginate(array('per_page' => BX_DOL_ADM_MP_PER_PAGE, 'per_page_step' => BX_DOL_ADM_MP_PER_PAGE_STEP, 'on_change_per_page' => BX_DOL_ADM_MP_JS_NAME . '.changePerPage(this);')); $sTopControls = $GLOBALS['oAdmTemplate']->parseHtmlByName('mp_members_top_controls.html', array('change_order' => BX_DOL_ADM_MP_JS_NAME . '.changeOrder(this);', 'per_page' => $oPaginate->getPages())); $aResult = array('action_url' => $GLOBALS['site']['url_admin'] . 'profiles.php', 'ctl_type' => is_array($sDefaultCtl) && !empty($sDefaultCtl) ? $sDefaultCtl['ctl_type'] : $sDefaultCtl, 'view_type' => $sDefaultView, 'top_controls' => $sTopControls, 'loading' => LoadingBox('adm-mp-members-loading')); foreach (array('simple', 'extended', 'geeky') as $sType) { if ($sType == $sDefaultView) { $aParams = array('view_type' => $sType); if (is_array($sDefaultCtl) && !empty($sDefaultCtl)) { $aParams = array_merge($aParams, $sDefaultCtl); } $aResult = array_merge($aResult, array('style_' . $sType => '', 'content_' . $sType => getMembers($aParams))); } else { $aResult = array_merge($aResult, array('style_' . $sType => 'display: none;', 'content_' . $sType => '')); } } return DesignBoxAdmin(_t('_adm_box_cpt_mp_members'), $GLOBALS['oAdmTemplate']->parseHtmlByName('mp_members.html', $aResult), $aTopMenu); }
<?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();
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); } if (isset($_POST[$sUri . '-publish'])) { $this->_actPublish($_POST[$sUri . '-ids'], true); } else { if (isset($_POST[$sUri . '-unpublish'])) { $this->_actPublish($_POST[$sUri . '-ids'], false); } else { if (isset($_POST[$sUri . '-featured'])) { $this->_actFeatured($_POST[$sUri . '-ids'], true); } else { if (isset($_POST[$sUri . '-unfeatured'])) { $this->_actFeatured($_POST[$sUri . '-ids'], false); } else { if (isset($_POST[$sUri . '-delete'])) { $this->_actDelete($_POST[$sUri . '-ids']); } } } } } //--- Process actions ---// //--- Get New/Edit form ---// $sPostForm = ''; if (!empty($sName)) { $sPostForm = $this->serviceEditBlock(process_db_input($sName, BX_TAGS_STRIP)); } else { if (isset($_POST['id'])) { $sPostForm = $this->serviceEditBlock((int) $_POST['id']); } else { $sPostForm = $this->servicePostBlock(); } } //--- Get New/Edit form ---// $sFilterValue = ''; if (isset($_GET[$sUri . '-filter'])) { $sFilterValue = process_db_input($_GET[$sUri . '-filter'], BX_TAGS_STRIP); } $sContent = DesignBoxAdmin(_t('_' . $sUri . '_bcaption_settings'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $this->getSettingsForm($mixedResultSettings)))); $sContent .= DesignBoxAdmin(_t('_' . $sUri . '_bcaption_post'), $sPostForm); $sContent .= DesignBoxAdmin(_t('_' . $sUri . '_bcaption_all'), $this->serviceAdminBlock(0, 0, $sFilterValue)); $aParams = array('title' => array('page' => _t('_' . $sUri . '_pcaption_admin')), 'content' => array('page_main_code' => $sContent)); $this->_oTemplate->getPageCodeAdmin($aParams); }
</div> </div> EOF; } $sRequest = bx_html_attribute($_SERVER['PHP_SELF']) . '?page={page}&per_page={per_page}'; ///////////////pagination///////////////////// // gen pagination block ; $oPaginate = new BxDolPaginate(array('page_url' => $sRequest, 'count' => $iTotalNum, 'per_page' => $iPerPage, 'page' => $iCurPage)); $sPagination = $oPaginate->getPaginate(); ///////////////eof pagination///////////////////// bx_import('BxTemplSearchResult'); $oSearchResult = new BxTemplSearchResult(); $sAdmPanel = $oSearchResult->showAdminActionsPanel('crss_box', array('action_approve' => '_Approve', 'action_disapprove' => '_Disapprove', 'action_delete' => '_Delete'), 'crsss'); $sUrl = bx_html_attribute($_SERVER['PHP_SELF']); $sCode .= <<<EOF <form action="{$sUrl}" method="post" name="ads_moderation"> <div id="crss_box" class="bx-def-bc-padding"> {$sRSSs} </div> {$sPagination} {$sAdmPanel} </form> EOF; } $sHeaderValue = _t('_crss_Manager'); $sCode = $sCode == '' ? MsgBox(_t('_Empty')) : $sCode; $sResult = DesignBoxAdmin($sHeaderValue, $sCode); $iNameIndex = 9; $_page = array('name_index' => $iNameIndex, 'css_name' => array('common.css', 'forms_adv.css'), 'header' => $sHeaderValue, 'header_text' => $sHeaderValue); $_page_cont[$iNameIndex]['page_main_code'] = $sResult; PageCodeAdmin();
<?php /** * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/ * CC-BY License - http://creativecommons.org/licenses/by/3.0/ */ define('BX_SECURITY_EXCEPTIONS', true); $aBxSecurityExceptions = array(); $aBxSecurityExceptions[] = 'POST.Check'; $aBxSecurityExceptions[] = 'REQUEST.Check'; $aBxSecurityExceptions[] = 'POST.Values'; $aBxSecurityExceptions[] = 'REQUEST.Values'; $aBxSecurityExceptions[] = 'POST.Desc'; $aBxSecurityExceptions[] = 'REQUEST.Desc'; 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'; $logged['admin'] = member_auth(1, true, true); $iNameIndex = 11; $_page = array('name_index' => $iNameIndex, 'css_name' => array('fields.css'), 'js_name' => array('jquery.ui.core.min.js', 'jquery.ui.widget.min.js', 'jquery.ui.mouse.min.js', 'jquery.ui.tabs.min.js', 'jquery.ui.sortable.min.js', 'fields.js'), 'header' => _t('_adm_fields_title')); $_page_cont[$iNameIndex]['page_main_code'] = DesignBoxAdmin(_t('_adm_fields_box_title'), $GLOBALS['oAdmTemplate']->parseHtmlByName('fields.html', array()), array('adm-fb-ctl-m1' => array('title' => _t('_adm_fields_join_form'), 'href' => 'javascript:void(0)', 'onclick' => 'javascript:changeType(this)', 'active' => 1), 'adm-fb-ctl-edit-tab' => array('title' => _t('_adm_fields_edit_profile'), 'href' => 'javascript:void(0)', 'onclick' => 'javascript:changeType(this)', 'active' => 0), 'adm-fb-ctl-view-tab' => array('title' => _t('_adm_fields_view_profile'), 'href' => 'javascript:void(0)', 'onclick' => 'javascript:changeType(this)', 'active' => 0), 'adm-fb-ctl-search-tab' => array('title' => _t('_adm_fields_search_profiles'), 'href' => 'javascript:void(0)', 'onclick' => 'javascript:changeType(this)', 'active' => 0))); $GLOBALS['oAdmTemplate']->addJsTranslation(array('_adm_mbuilder_active_items', '_adm_txt_pb_inactive_blocks', '_adm_mbuilder_inactive_items')); PageCodeAdmin();
function getCodeStats() { $aStats = getSiteStatArray(); $aTmplItemsCom = $aTmplItemsImp = array(); foreach ($aStats as $aStat) { $mixedItem = $this->_getStatsItem($aStat); if ($mixedItem !== false) { $aTmplItemsCom[] = $mixedItem; } $mixedItem = $this->_getStatsItem($aStat, 'adm_'); if ($mixedItem !== false) { $aTmplItemsImp[] = $mixedItem; } } $aCommonChartData = array(); foreach ($aTmplItemsCom as $r) { $aCommonChartData[] = array('value' => $r['number'], 'color' => '#' . dechex(rand(0x0, 0xffffff)), 'highlight' => '', 'label' => bx_js_string($r['caption'], BX_ESCAPE_STR_APOS)); } $sCommonChartData = json_encode($aCommonChartData); $GLOBALS['oAdmTemplate']->addJsSystem(array('chart.min.js')); $sContent = $GLOBALS['oAdmTemplate']->parseHtmlByName('dashboard_stats.html', array('bx_repeat:items_common' => $aTmplItemsCom, 'bx_repeat:items_important' => $aTmplItemsImp, 'common_chart_data' => $sCommonChartData)); return DesignBoxAdmin(_t('_adm_box_cpt_content'), $sContent, '', '', 11); }
$sComposerInit = "\n <script type=\"text/javascript\">\n topParentID = 'menu_app_wrapper';\n parserUrl = '" . $GLOBALS['site']['url_admin'] . "service_menu_compose.php?';\n\n allowNewItem = true;\n allowAddToTop = true;\n allowAddToCustom = false;\n iInactivePerRow = 5;\n sendSystemOrder = false;\n\n aCoords = {};\n aCoords['startX'] = 6;\n aCoords['startY'] = 24;\n aCoords['width'] = 117;\n aCoords['height'] = 28;\n aCoords['diffX'] = 122;\n aCoords['diffY'] = 32;\n\n aTopItems = {};\n aCustomItems = {};\n aSystemItems = {};\n aAllItems = {};\n"; $iIndex = 0; while (($aTopItem = $rTopItems->fetch()) !== false) { $sComposerInit .= "\n\n aTopItems[{$iIndex}] = [{$aTopItem['ID']}, '" . addslashes($aTopItem['Name']) . "', {$aTopItem['Movable']}];\n aCustomItems[{$iIndex}] = {};"; $iIndex++; } $sComposerInit .= "\n"; while (($aAllItem = $rAllItems->fetch()) !== false) { $sComposerInit .= "\n aAllItems['{$aAllItem['ID']} '] = '" . bx_js_string($aAllItem['Name'], BX_ESCAPE_STR_APOS) . "';"; } $sComposerInit .= "\n </script>\n"; $iNameIndex = 12; $_page = array('name_index' => $iNameIndex, 'css_name' => array('menu_compose.css', 'forms_adv.css'), 'js_name' => array('menu_compose.js', 'BxDolMenu.js'), 'header' => _t('_adm_smbuilder_page_title')); $sContent = $GLOBALS['oAdmTemplate']->parseHtmlByName('menu_compose.html', array('extra_js' => $sComposerInit)); $_page_cont[$iNameIndex]['controls'] = ''; $_page_cont[$iNameIndex]['page_main_code'] = DesignBoxAdmin(_t('_adm_smbuilder_box_title'), $sContent); PageCodeAdmin(); function showEditForm($aItem) { $aForm = array('form_attrs' => array('id' => 'formItemEdit', 'name' => 'formItemEdit', 'action' => $GLOBALS['site']['url_admin'] . 'bottom_menu_compose.php', 'method' => 'post', 'enctype' => 'multipart/form-data'), 'inputs' => array('Name' => array('type' => 'text', 'name' => 'Name', 'caption' => _t('_adm_mbuilder_System_Name'), 'value' => $aItem['Name'], 'attrs' => array()), 'Caption' => array('type' => 'text', 'name' => 'Caption', 'caption' => _t('_adm_mbuilder_Language_Key'), 'value' => $aItem['Caption'], 'attrs' => array()), 'LangCaption' => array('type' => 'text', 'name' => 'LangCaption', 'caption' => _t('_adm_mbuilder_Default_Name'), 'value' => _t($aItem['Caption']), 'attrs' => array()), 'Link' => array('type' => 'text', 'name' => 'Link', 'caption' => _t('_URL'), 'value' => htmlspecialchars_adv($aItem['Link']), 'attrs' => array()), 'Script' => array('type' => 'text', 'name' => 'Script', 'caption' => _t('_adm_mbuilder_script'), 'value' => htmlspecialchars_adv($aItem['Script']), 'attrs' => array()), 'Icon' => array('type' => 'text', 'name' => 'Icon', 'caption' => _t('_adm_mbuilder_icon'), 'value' => htmlspecialchars_adv($aItem['Icon']), 'attrs' => array()), 'Target' => array('type' => 'radio_set', 'name' => 'Target', 'caption' => _t('_adm_mbuilder_Target_Window'), 'value' => $aItem['Target'] == '_blank' ? '_blank' : '_self', 'values' => array('_self' => _t('_adm_mbuilder_Same'), '_blank' => _t('_adm_mbuilder_New')), 'attrs' => array()), 'Visible' => array('type' => 'checkbox_set', 'name' => 'Visible', 'caption' => _t('_adm_mbuilder_Visible_for'), 'value' => array(), 'values' => array('non' => _t('_Guest'), 'memb' => _t('_Member')), 'attrs' => array()), 'submit' => array('type' => 'input_set', array('type' => 'button', 'name' => 'save', 'value' => _t('_Save Changes'), 'attrs' => array('onclick' => 'javascript:saveItem(' . $aItem['ID'] . ');')), array('type' => 'button', 'name' => 'delete', 'value' => _t('_Delete'), 'attrs' => array('onclick' => 'javascript:deleteItem(' . $aItem['ID'] . ');'))))); foreach ($aForm['inputs'] as $sKey => $aInput) { if (in_array($aInput['type'], array('text', 'checkbox')) && !$aItem['Editable']) { $aForm['inputs'][$sKey]['attrs']['disabled'] = "disabled"; } } if (strpos($aItem['Visible'], 'non') !== false) { $aForm['inputs']['Visible']['value'][] = 'non'; } if (strpos($aItem['Visible'], 'memb') !== false) { $aForm['inputs']['Visible']['value'][] = 'memb'; }
function GenAdminTabbedPage() { $sTitleC = _t('_bx_blog_Administration'); $sPendingC = _t('_bx_blog_pending_approval'); $sSettingsC = _t('_Settings'); $sPendingTab = $this->GenBlogAdminIndex(); $sSettingsTab = $this->getAdministrationSettings(); $sContent = ''; $sContent .= DesignBoxAdmin($sSettingsC, $sSettingsTab, '', '', 11); $sContent .= DesignBoxAdmin($sPendingC, $sPendingTab); return $sContent; }
$rAllItems = db_res($sAllQuery); $sComposerInit = "\n <script type=\"text/javascript\">\n topParentID = 'menu_app_wrapper';\n urlIconLoading = '{$site['url_admin']}images/loading.gif';\n parserUrl = '" . $GLOBALS['site']['url_admin'] . "member_menu_compose.php?menu_position={$sMenuSection}';\n\n allowNewItem = true;\n allowAddToTop = true;\n allowAddToCustom = false;\n iInactivePerRow = 5;\n sendSystemOrder = false;\n\n aCoords = {};\n aCoords['startX'] = 325;\n aCoords['startY'] = 215;\n aCoords['width'] = 92;\n aCoords['height'] = 21;\n aCoords['diffX'] = 122;\n aCoords['diffY'] = 32;\n\n aTopItems = {};\n aCustomItems = {};\n aSystemItems = {};\n aAllItems = {};\n"; $iIndex = 0; while (($aTopItem = mysql_fetch_assoc($rTopItems)) !== false) { $sComposerInit .= "\n\n aTopItems[{$iIndex}] = [{$aTopItem['ID']}, '" . addslashes($aTopItem['Name']) . "', {$aTopItem['Movable']}];\n aCustomItems[{$iIndex}] = {};"; $iIndex++; } $sComposerInit .= "\n"; while (($aAllItem = mysql_fetch_assoc($rAllItems)) !== false) { $sComposerInit .= "\n aAllItems[{$aAllItem['ID']}] = '" . addslashes($aAllItem['Name']) . "';"; } $sComposerInit .= "\n </script>\n"; $iNameIndex = 12; $_page = array('name_index' => $iNameIndex, 'css_name' => array('menu_compose.css', 'forms_adv.css'), 'js_name' => array('menu_compose.js', 'BxDolMenu.js'), 'header' => _t('_mmbuilder_page_title')); $sContent = $GLOBALS['oAdmTemplate']->parseHtmlByName('menu_compose.html', array('extra_js' => $sComposerInit)); $_page_cont[$iNameIndex]['page_main_code'] = DesignBoxAdmin(_t('_mmbuilder_box_title'), $sContent, $aMenuSection); PageCodeAdmin(); function showEditForm($aItem, $sMenuSection) { $aForm = array('form_attrs' => array('id' => 'formItemEdit', 'name' => 'formItemEdit', 'action' => $GLOBALS['site']['url_admin'] . 'member_menu_compose.php', 'method' => 'post', 'enctype' => 'multipart/form-data'), 'inputs' => array('Name' => array('type' => 'text', 'name' => 'Name', 'caption' => _t('_adm_mbuilder_System_Name'), 'value' => $aItem['Name'], 'attrs' => array()), 'Caption' => array('type' => 'text', 'name' => 'Caption', 'caption' => _t('_adm_mbuilder_Language_Key'), 'value' => $aItem['Caption'], 'attrs' => array()), 'LangCaption' => array('type' => 'text', 'name' => 'LangCaption', 'caption' => _t('_adm_mbuilder_Default_Name'), 'value' => _t($aItem['Caption']), 'attrs' => array()), 'Link' => array('type' => 'text', 'name' => 'Link', 'caption' => _t('_URL'), 'value' => htmlspecialchars_adv($aItem['Link']), 'attrs' => array()), 'Script' => array('type' => 'text', 'name' => 'Script', 'caption' => _t('_adm_mbuilder_script'), 'value' => htmlspecialchars_adv($aItem['Script']), 'attrs' => array()), 'Icon' => array('type' => 'text', 'name' => 'Icon', 'caption' => _t('_adm_mbuilder_icon'), 'value' => htmlspecialchars_adv($aItem['Icon']), 'attrs' => array()), 'Target' => array('type' => 'radio_set', 'name' => 'Target', 'caption' => _t('_adm_mbuilder_Target_Window'), 'value' => $aItem['Target'] == '_blank' ? '_blank' : '_self', 'values' => array('_self' => _t('_adm_mbuilder_Same'), '_blank' => _t('_adm_mbuilder_New')), 'attrs' => array()), 'submit' => array('type' => 'input_set', array('type' => 'button', 'name' => 'save', 'value' => _t('_Save Changes'), 'attrs' => array('onclick' => 'javascript:saveItem(' . $aItem['ID'] . ');')), array('type' => 'button', 'name' => 'delete', 'value' => _t('_Delete'), 'attrs' => array('onclick' => 'javascript:deleteItem(' . $aItem['ID'] . ');'))))); foreach ($aForm['inputs'] as $sKey => $aInput) { if (in_array($aInput['type'], array('text', 'checkbox')) && !$aItem['Editable']) { $aForm['inputs'][$sKey]['attrs']['disabled'] = "disabled"; } } if (strpos($aItem['Visible'], 'non') !== false) { $aForm['inputs']['Visible']['value'][] = 'non'; } if (strpos($aItem['Visible'], 'memb') !== false) { $aForm['inputs']['Visible']['value'][] = 'memb'; }
function PageMainCode() { $oDashboard = new BxDolAdminDashboard(); $sResult = $oDashboard->getCode(); $iNameIndex = 1; $GLOBALS['_page'] = array('name_index' => $iNameIndex, 'css_name' => array('index.css'), 'header' => _t('_adm_page_cpt_dashboard')); $GLOBALS['_page_cont'][$iNameIndex]['page_main_code'] = $sResult; if (getParam('news_enable') == 'on') { $GLOBALS['_page_cont'][$iNameIndex]['page_main_code'] .= DesignBoxAdmin(_t('_adm_box_cpt_boonex_news'), ' <div class="RSSAggrCont" rssid="boonex_news" rssnum="5" member="0">' . $GLOBALS['oFunctions']->loadingBoxInline() . '</div>'); } if (getParam('feeds_enable') == 'on') { $GLOBALS['_page_cont'][$iNameIndex]['page_main_code'] .= DesignBoxAdmin(_t('_adm_box_cpt_featured_modules'), ' <div class="RSSAggrCont" rssid="boonex_unity_market_featured" rssnum="5" member="0">' . $GLOBALS['oFunctions']->loadingBoxInline() . '</div>'); } }
function adm_hosting_promo() { return 'on' == getParam('feeds_enable') ? DesignBoxAdmin(_t('_adm_txt_hosting_title'), $GLOBALS['oAdmTemplate']->parseHtmlByName('hosting_promo.html', array())) : ''; }