function getBlockCode_DeleteMembers() { //--- Get Control ---// $aButtons = array('ps-del-members-delete' => _t('_ps_btncpt_delete')); $sControl = BxDolPrivacySearch::showAdminActionsPanel('ps-del-member-form', $aButtons, 'ps-del-member-ids'); return PopupBox('ps-del-members', _t('_ps_bcpt_delete_members'), $this->parseHtmlByName('ps_group_members.html', array('wnd_action' => 'del', 'bx_if:search_form' => array('condition' => false, 'content' => array()), 'js_site_url' => BX_DOL_URL_ROOT, 'results' => '', 'control' => $sControl, 'loading' => LoadingBox('ps-add-members-loading')))); }
function _getList($mixedResult, $bActive = false) { $aForm = array('form_attrs' => array('id' => 'adm-email-templates', 'action' => $GLOBALS['site']['url_admin'] . 'email_templates.php', 'method' => 'post', 'enctype' => 'multipart/form-data'), 'params' => array('db' => array('table' => 'sys_email_templates', 'key' => 'ID', 'uri' => '', 'uri_title' => '', 'submit_name' => 'adm-emial-templates-save')), 'inputs' => array()); $aLanguages = $GLOBALS['MySQL']->getAll("SELECT `ID` AS `id`, `Title` AS `title` FROM `sys_localization_languages`"); $aLanguageChooser = array(array('key' => 0, 'value' => 'default')); foreach ($aLanguages as $aLanguage) { $aLanguageChooser[] = array('key' => $aLanguage['id'], 'value' => $aLanguage['title']); } $sLanguageCpt = _t('_adm_txt_email_language'); $sSubjectCpt = _t('_adm_txt_email_subject'); $sBodyCpt = _t('_adm_txt_email_body'); $aEmails = $GLOBALS['MySQL']->getAll("SELECT `ID` AS `id`, `Name` AS `name`, `Subject` AS `subject`, `Body` AS `body`, `Desc` AS `description` FROM `sys_email_templates` WHERE `LangID`='0' ORDER BY `ID`"); foreach ($aEmails as $aEmail) { $aForm['inputs'] = array_merge($aForm['inputs'], array($aEmail['name'] . '_Beg' => array('type' => 'block_header', 'caption' => $aEmail['description'], 'collapsable' => true, 'collapsed' => true), $aEmail['name'] . '_Language' => array('type' => 'select', 'name' => $aEmail['name'] . '_Language', 'caption' => $sLanguageCpt, 'value' => 0, 'values' => $aLanguageChooser, 'db' => array('pass' => 'Int'), 'attrs' => array('onchange' => "javascript:getTranslations(this)")), $aEmail['name'] . '_Subject' => array('type' => 'text', 'name' => $aEmail['name'] . '_Subject', 'caption' => $sSubjectCpt, 'value' => $aEmail['subject'], 'db' => array('pass' => 'Xss')), $aEmail['name'] . '_Body' => array('type' => 'textarea', 'name' => $aEmail['name'] . '_Body', 'caption' => $sBodyCpt, 'value' => $aEmail['body'], 'db' => array('pass' => 'XssHtml')), $aEmail['name'] . '_End' => array('type' => 'block_end'))); } $aForm['inputs']['adm-emial-templates-save'] = array('type' => 'submit', 'name' => 'adm-emial-templates-save', 'value' => _t('_adm_btn_email_save')); $oForm = new BxTemplFormView($aForm); $oForm->initChecker(); $sResult = ""; if ($oForm->isSubmittedAndValid()) { $iResult = 0; foreach ($aEmails as $aEmail) { $iEmailId = (int) $GLOBALS['MySQL']->getOne("SELECT `ID` FROM `sys_email_templates` WHERE `Name`='" . process_db_input($aEmail['name']) . "' AND `LangID`='" . (int) $_POST[$aEmail['name'] . '_Language'] . "' LIMIT 1"); if ($iEmailId != 0) { $iResult += (int) $GLOBALS['MySQL']->query("UPDATE `sys_email_templates` SET `Subject`='" . process_db_input($_POST[$aEmail['name'] . '_Subject']) . "', `Body`='" . process_db_input($_POST[$aEmail['name'] . '_Body']) . "' WHERE `ID`='" . $iEmailId . "'"); } else { $iResult += (int) $GLOBALS['MySQL']->query("INSERT INTO `sys_email_templates` SET `Name`='" . process_db_input($aEmail['name']) . "', `Subject`='" . process_db_input($_POST[$aEmail['name'] . '_Subject']) . "', `Body`='" . process_db_input($_POST[$aEmail['name'] . '_Body']) . "', `LangID`='" . (int) $_POST[$aEmail['name'] . '_Language'] . "'"); } } $bActive = true; $sResult .= MsgBox(_t($iResult > 0 ? "_adm_txt_email_success_save" : "_adm_txt_email_nothing_changed"), 3); } $sResult .= $oForm->getCode(); return $GLOBALS['oAdmTemplate']->parseHtmlByName('email_templates_list.html', array('display' => $bActive ? 'block' : 'none', 'content' => stripslashes($sResult), 'loading' => LoadingBox('adm-email-loading'))); }
function displayList($aParams) { $sSampleType = $aParams['sample_type']; $iViewerType = $aParams['viewer_type']; $iStart = isset($aParams['start']) ? (int) $aParams['start'] : -1; $iPerPage = isset($aParams['count']) ? (int) $aParams['count'] : -1; $bShowEmpty = isset($aParams['show_empty']) ? $aParams['show_empty'] : true; $sModuleUri = $this->_oConfig->getUri(); $aEntries = $this->_oDb->getEntries($aParams); if (empty($aEntries)) { return $bShowEmpty ? MsgBox(_t('_' . $sModuleUri . '_msg_no_results')) : ""; } $sBaseUri = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri(); $sJsMainObject = $this->_oConfig->getJsObject(); $sList = ''; foreach ($aEntries as $aEntry) { $sList .= $this->displayItem($aParams, $aEntry); } $sPaginate = ''; if (!in_array($sSampleType, array('id', 'uri', 'view', 'search_unit'))) { if (!empty($sSampleType)) { $this->_updatePaginate($aParams); } $sPaginate = $this->oPaginate->getPaginate($iStart, $iPerPage); } return $this->parseHtmlByName('list.html', array('sample' => $sSampleType, 'list' => $sList, 'paginate' => $sPaginate, 'loading' => LoadingBox($sModuleUri . '-' . $sSampleType . '-loading'))); }
function displayOrder($sType, $iId) { $sOrder = parent::displayOrder($sType == BX_PMT_ORDERS_TYPE_SUBSCRIPTION ? BX_PMT_ORDERS_TYPE_PROCESSED : $sType, $iId); if (!in_array($sType, array(BX_PMT_ORDERS_TYPE_SUBSCRIPTION, BX_PMT_ORDERS_TYPE_HISTORY))) { return $sOrder; } $sMethodName = 'get' . ucfirst($sType); $aOrder = $this->_oDb->{$sMethodName}(array('type' => 'id', 'id' => $iId)); if (empty($aOrder['order_profile']) || !isAdmin() && (int) $aOrder['client_id'] != getLoggedId()) { return $sOrder; } return $this->parseHtmlByName('rb_processed_order.html', array('js_object' => $this->_oConfig->getJsObject('orders'), 'type' => $sType, 'id' => $iId, 'order' => $sOrder, 'order_profile' => $aOrder['order_profile'], 'loading' => LoadingBox('pfw-order-loading-' . $iId))); }
function displayList($aParams) { $sSampleType = $aParams['sample_type']; $iViewerId = isset($aParams['viewer_id']) ? (int) $aParams['viewer_id'] : 0; $iViewerType = $aParams['viewer_type']; $iStart = isset($aParams['start']) ? (int) $aParams['start'] : -1; $iPerPage = isset($aParams['count']) ? (int) $aParams['count'] : -1; $bShowEmpty = isset($aParams['show_empty']) ? $aParams['show_empty'] : true; $bAdminPanel = $iViewerType == BX_TD_VIEWER_TYPE_ADMIN && (isset($aParams['admin_panel']) && $aParams['admin_panel'] || $sSampleType == 'admin'); $sModuleUri = $this->_oConfig->getUri(); $aEntries = $this->_oDb->getEntries($aParams); if (empty($aEntries)) { return $bShowEmpty ? MsgBox(_t('_' . $sModuleUri . '_msg_no_results')) : ""; } $oTags = new BxDolTags(); $oCategories = new BxDolCategories(); //--- Language translations ---// $sLKLinkApprove = _t('_' . $sModuleUri . '_lcaption_approve'); $sLKLinkReject = _t('_' . $sModuleUri . '_lcaption_reject'); $sLKLinkEdit = _t('_' . $sModuleUri . '_lcaption_edit'); $sLKLinkDelete = _t('_' . $sModuleUri . '_lcaption_delete'); $sBaseUri = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri(); $sJsMainObject = $this->_oConfig->getJsObject(); $aResult['sample'] = $sSampleType; $aResult['bx_repeat:entries'] = array(); foreach ($aEntries as $aEntry) { $sVotes = ""; if ($this->_oConfig->isVotesEnabled() && $aEntry['is_vote'] == 1) { $oVotes = $this->_oModule->_createObjectVoting($aEntry['id']); $sVotes = $oVotes->getJustVotingElement(0, $aEntry['id']); } $aResult['bx_repeat:entries'][] = array('id' => $this->_oConfig->getSystemPrefix() . $aEntry['id'], 'author_icon' => get_member_icon($aEntry['author_id'], 'left'), 'caption' => str_replace("\$", "$", $aEntry['caption']), 'class' => !in_array($sSampleType, array('view')) ? ' ' . $this->sCssPrefix . '-text-snippet' : '', 'date' => getLocaleDate($aEntry['date']), 'content' => str_replace("\$", "$", $aEntry['content']), 'link' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aEntry['uri'], 'voting' => $sVotes, 'bx_if:checkbox' => array('condition' => $bAdminPanel, 'content' => array('id' => $aEntry['id'])), 'bx_if:status' => array('condition' => $iViewerType == BX_TD_VIEWER_TYPE_MEMBER && $iViewerId == $aEntry['author_id'] || $iViewerType == BX_TD_VIEWER_TYPE_ADMIN, 'content' => array('status' => _t('_' . $sModuleUri . '_status_' . $aEntry['status']))), 'bx_if:edit_link' => array('condition' => $iViewerType == BX_TD_VIEWER_TYPE_MEMBER && $iViewerId == $aEntry['author_id'] || $iViewerType == BX_TD_VIEWER_TYPE_ADMIN, 'content' => array('edit_link_url' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'post/' . $aEntry['uri'], 'edit_link_caption' => $sLKLinkEdit))); } $aResult['paginate'] = ''; if (!in_array($sSampleType, array('id', 'uri', 'view', 'search_unit'))) { if (!empty($sSampleType)) { $this->_updatePaginate($aParams); } $aResult['paginate'] = $this->oPaginate->getPaginate($iStart, $iPerPage); } $aResult['loading'] = LoadingBox($sModuleUri . '-' . $sSampleType . '-loading'); return $this->parseHtmlByName('list.html', $aResult); }
function displayHistoryBlock($iUserId, $iVendorId) { $sJsObject = $this->_oConfig->getJsObject('orders'); //--- Get Filter Panel ---// $sFilterPanel = BxTemplSearchResult::showAdminFilterPanel('', 'pmt-filter-text-history', 'pmt-filter-enable-history', 'filter', $sJsObject . ".applyFilter('history', this)"); return $this->parseHtmlByName('history_orders_block.html', array('txt_date' => _t($this->_sLangsPrefix . 'txt_date'), 'txt_seller' => _t($this->_sLangsPrefix . 'txt_seller'), 'txt_order' => _t($this->_sLangsPrefix . 'txt_order'), 'txt_amount' => _t($this->_sLangsPrefix . 'txt_amount'), 'txt_license' => _t($this->_sLangsPrefix . 'txt_license'), 'txt_action' => _t($this->_sLangsPrefix . 'txt_action'), 'orders' => $this->displayOrders('history', array('user_id' => $iUserId, 'seller_id' => $iVendorId, 'start' => 0)), 'filter_panel' => $sFilterPanel, 'loading' => LoadingBox('pmt-orders-history-loading'))); }
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'; } $oForm = new BxTemplFormView($aForm); return PopupBox('mmc_edit_popup', _t('_adm_mbuilder_edit_item'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $oForm->getCode() . LoadingBox('formItemEditLoading')))); }
function serviceViewBlockIndex($iStart = -1, $iPerPage = -1, $sFilter = '', $aModules = array()) { $sContent = ''; $this->_iOwnerId = 0; if ($iStart == -1) { $iStart = 0; } if ($iPerPage == -1) { $iPerPage = $this->_oConfig->getPerPage('index'); } if (empty($sFilter)) { $sFilter = BX_WALL_FILTER_ALL; } //--- Prepare JavaScript paramaters ---// $oJson = new Services_JSON(); ob_start(); ?> var <?php echo $this->_sJsOutlineObject; ?> = new BxWallOutline({ sActionUrl: '<?php echo BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri(); ?> ', sObjName: '<?php echo $this->_sJsOutlineObject; ?> ', iOwnerId: '0', sAnimationEffect: '<?php echo $this->_oConfig->getAnimationEffect(); ?> ', iAnimationSpeed: '<?php echo $this->_oConfig->getAnimationSpeed(); ?> ', oRequestParams: <?php echo $oJson->encode(array('WallFilter' => $sFilter, 'WallModules' => $aModules)); ?> }); <?php $sJsContent = ob_get_clean(); list($sContent, $sPaginate) = $this->_getPostsOutline('desc', $iStart, $iPerPage, $sFilter, $aModules); if (empty($sContent)) { return; } $aTmplVars = array('outline_js_content' => $sJsContent, 'content' => $sContent, 'paginate' => $sPaginate); $this->_oTemplate->addCss(array('outline.css')); $this->_oTemplate->addJs(array('jquery.masonry.min.js', 'main.js', 'outline.js')); return array($this->_oTemplate->parseHtmlByName('outline.html', $aTmplVars), array(), LoadingBox('bx-wall-view-loading'), true, 'getBlockCaptionMenu'); }
function actionPageBlock($sAction, $iID) { if (!isAdmin()) { $this->_oTemplate->displayAccessDenied(); } if ($sAction == 'edit') { $aVisibility = $this->_oDb->getPageBlockVisibility($iID); header('Content-Type: text/html; charset=utf-8'); return PopupBox('pageac_popup_edit_form', _t('_bx_pageac_visible_for'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $this->_oTemplate->getPageBlockEditForm($iID, $aVisibility) . LoadingBox('formItemEditLoading')))); } elseif ($sAction == 'save') { $aVisibleTo = array(); if (is_array($_POST['mlv_visible_to'])) { $aData = array_flip($_POST['mlv_visible_to']); if (!isset($aData[-1])) { foreach ($aData as $iMemLevel => $dummy) { $aVisibleTo[$iMemLevel] = 1; } } } if (empty($aVisibleTo) && !isset($aData[-1])) { $aVisibleTo[] = 0; } $this->_oDb->setPageBlockVisibility($iID, $aVisibleTo); $aResult = array('message' => MsgBox(_t('_Saved')), 'timer' => 1); $oJson = new Services_JSON(); return $oJson->encode($aResult); } }
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); }
function showEditFormTop($aItem) { $aForm = array('form_attrs' => array('id' => 'formItemEdit', 'name' => 'formItemEdit', 'action' => $GLOBALS['site']['url_admin'] . 'menu_compose_admin.php', 'method' => 'post', 'enctype' => 'multipart/form-data'), 'inputs' => array('Title' => array('type' => 'text', 'name' => 'title', 'caption' => _t('_Title'), 'value' => $aItem['title'], 'attrs' => array()), 'BigIcon' => array('type' => 'text', 'name' => 'icon', 'caption' => _t('_adm_ambuilder_Small_Icon'), 'value' => htmlspecialchars_adv($aItem['icon']), 'attrs' => array()), 'SmallIcon' => array('type' => 'text', 'name' => 'icon_large', 'caption' => _t('_adm_ambuilder_Big_Icon'), 'value' => htmlspecialchars_adv($aItem['icon_large']), 'attrs' => array()), 'submit' => array('type' => 'input_set', array('type' => 'button', 'name' => 'save', 'value' => _t('_Save Changes'), 'attrs' => array('onclick' => 'javascript:saveItem(' . ($aItem['id'] + 1000) . ');')), array('type' => 'button', 'name' => 'delete', 'value' => _t('_Delete'), 'attrs' => array('onclick' => 'javascript:deleteItem(' . ($aItem['id'] + 1000) . ');'))))); $oForm = new BxTemplFormView($aForm); return PopupBox('amc_edit_popup_top', _t('_adm_mbuilder_edit_item'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $oForm->getCode() . LoadingBox('formItemEditLoading')))); }
function serviceViewBlockIndexOutline($iStart = -1, $iPerPage = -1, $sFilter = '', $aModules = array()) { $sContent = ''; $this->_iOwnerId = 0; if ($iStart == -1) { $iStart = 0; } if ($iPerPage == -1) { $iPerPage = $this->_oConfig->getPerPage('index_ol'); } if (empty($sFilter)) { $sFilter = BX_WALL_FILTER_ALL; } list($sContent, $sPaginate) = $this->_getPostsOutline('desc', $iStart, $iPerPage, $sFilter, $aModules); if (empty($sContent)) { return; } $aTmplVars = array('outline_js_content' => $this->_oTemplate->getJsCode('outline', array('iOwnerId' => 0), array('WallFilter' => $sFilter, 'WallModules' => $aModules)), 'content' => $sContent, 'paginate' => $sPaginate); $this->_oTemplate->addCss(array('outline.css', 'outline_tablet.css', 'outline_phone.css')); $this->_oTemplate->addJs(array('masonry.pkgd.min.js', 'main.js', 'outline.js')); return array($this->_oTemplate->parseHtmlByName('outline.html', $aTmplVars), array(), LoadingBox('bx-wall-view-loading'), true, 'getBlockCaptionMenu'); }
function showNewPageForm() { $oForm = new BxTemplFormView(array('form_attrs' => array('name' => 'formItemEdit', 'action' => bx_html_attribute($_SERVER['PHP_SELF']), 'method' => 'post'), 'inputs' => array(array('type' => 'hidden', 'name' => 'action_sys', 'value' => 'createNewPage'), array('type' => 'text', 'name' => 'uri', 'value' => 'newpage', 'caption' => _t('_Page URI'), 'info' => _t('_adm_pbuilder_uri_info', BX_DOL_URL_ROOT . 'page/newpage')), array('type' => 'text', 'name' => 'title', 'caption' => _t('_Page title'), 'value' => 'New Page', 'info' => _t('_adm_pbuilder_title_info')), array('type' => 'submit', 'name' => 'do_submit', 'value' => _t('_adm_btn_Create_page'))))); $aVariables = array('caption' => _t('_adm_pbuilder_Create_new_page'), 'main_content' => $oForm->getCode(), 'loading' => LoadingBox('adm-pbuilder-loading')); return $GLOBALS['oAdmTemplate']->parseHtmlByName('popup_form_wrapper.html', $aVariables); }
function PageCodeMembers($sDefaultCtl = BX_DOL_ADM_MP_CTL, $sDefaultView = BX_DOL_ADM_MP_VIEW) { //--- Get Controls ---// $aButtons = array('adm-mp-activate' => _t('_adm_btn_mp_activate'), 'adm-mp-deactivate' => _t('_adm_btn_mp_deactivate'), 'adm-mp-ban' => _t('_adm_btn_mp_ban'), 'adm-mp-unban' => _t('_adm_btn_mp_unban'), 'adm-mp-confirm' => _t('_adm_btn_mp_confirm'), 'adm-mp-delete' => _t('_adm_btn_mp_delete')); $sControls = BxTemplSearchResult::showAdminActionsPanel('adm-mp-members-form', $aButtons, 'members'); $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);')); $aResult = array('action_url' => $GLOBALS['site']['url_admin'] . 'profiles.php', 'ctl_type' => $sDefaultCtl, 'view_type' => $sDefaultView, 'change_order' => BX_DOL_ADM_MP_JS_NAME . '.changeOrder(this);', 'per_page' => $oPaginate->getPages(), 'control' => $sControls, 'loading' => LoadingBox('adm-mp-members-loading')); foreach (array('simple', 'extended', 'geeky') as $sType) { if ($sType == $sDefaultView) { $aResult = array_merge($aResult, array('style_' . $sType => '', 'content_' . $sType => getMembers(array('view_type' => $sType)))); } 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); }