本文整理汇总了PHP中BxTemplSearchResult::showAdminActionsPanel方法的典型用法代码示例。如果您正苦于以下问题:PHP BxTemplSearchResult::showAdminActionsPanel方法的具体用法?PHP BxTemplSearchResult::showAdminActionsPanel怎么用?PHP BxTemplSearchResult::showAdminActionsPanel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BxTemplSearchResult
的用法示例。
在下文中一共展示了BxTemplSearchResult::showAdminActionsPanel方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PageCodeSubscribers
function PageCodeSubscribers($oSubscription)
{
$iStart = bx_get('start') !== false ? (int) bx_get('start') : 0;
$iPerPage = 20;
$oPaginate = new BxDolPaginate(array('start' => $iStart, 'per_page' => $iPerPage, 'count' => $oSubscription->getSubscribersCount(), 'page_url' => $GLOBALS['site']['url_admin'] . 'manage_subscribers.php?start={start}'));
$sControls = BxTemplSearchResult::showAdminActionsPanel('adm-ms-form', array('adm-ms-delete' => _t('_adm_btn_ms_delete')), 'members');
$aSubscribers = $oSubscription->getSubscribers(BX_DOL_SBS_TYPE_VISITOR, $iStart, $iPerPage);
return $GLOBALS['oAdmTemplate']->parseHtmlByName('manage_subscribers.html', array('bx_repeat:items' => is_array($aSubscribers) && !empty($aSubscribers) ? $aSubscribers : MsgBox(_t('_Empty')), 'paginate' => $oPaginate->getPaginate(), 'controls' => $sControls));
}
示例2: PageCodeManageSubscribers
function PageCodeManageSubscribers($oSubscription)
{
$iStart = bx_get('start') !== false ? (int) bx_get('start') : 0;
$iPerPage = 20;
$oPaginate = new BxDolPaginate(array('start' => $iStart, 'per_page' => $iPerPage, 'count' => $oSubscription->getSubscribersCount(), 'page_url' => BX_DOL_URL_ADMIN . 'notifies.php?mode=manage_subscribers&start={start}'));
$sControls = BxTemplSearchResult::showAdminActionsPanel('adm-ms-form', array('adm-ms-delete' => _t('_adm_btn_ms_delete')), 'members');
$aSubscribers = $oSubscription->getSubscribers(BX_DOL_SBS_TYPE_VISITOR, $iStart, $iPerPage);
$s = $GLOBALS['oAdmTemplate']->parseHtmlByName('manage_subscribers.html', array('bx_repeat:items' => is_array($aSubscribers) && !empty($aSubscribers) ? $aSubscribers : MsgBox(_t('_Empty')), 'paginate' => $oPaginate->getPaginate(), 'controls' => $sControls));
return array('page_main_code' => DesignBoxAdmin(_t('_adm_page_cpt_manage_subscribers'), $s, $GLOBALS['aTopItems'], '', 1));
}
示例3: getUpdates
function getUpdates($sResult)
{
$aUpdates = array();
$sPath = BX_DIRECTORY_PATH_ROOT . 'modules/';
if ($rHandleVendor = opendir($sPath)) {
while (($sVendor = readdir($rHandleVendor)) !== false) {
if (substr($sVendor, 0, 1) == '.' || !is_dir($sPath . $sVendor)) {
continue;
}
if ($rHandleModule = opendir($sPath . $sVendor . '/')) {
while (($sModule = readdir($rHandleModule)) !== false) {
if (!is_dir($sPath . $sVendor . '/' . $sModule) || substr($sModule, 0, 1) == '.') {
continue;
}
if ($rHandleUpdate = @opendir($sPath . $sVendor . '/' . $sModule . '/updates/')) {
while (($sUpdate = readdir($rHandleUpdate)) !== false) {
if (!is_dir($sPath . $sVendor . '/' . $sModule . '/updates/' . $sUpdate) || substr($sUpdate, 0, 1) == '.') {
continue;
}
$sConfigPath = $sPath . $sVendor . '/' . $sModule . '/updates/' . $sUpdate . '/install/config.php';
if (!file_exists($sConfigPath)) {
continue;
}
include $sConfigPath;
$sName = $aConfig['title'] . $aConfig['module_uri'] . $aConfig['version_from'] . $aConfig['version_to'];
$aUpdates[$sName] = array('name' => md5($sName), 'value' => $aConfig['home_dir'], 'title' => _t('_adm_txt_modules_title_update', $aConfig['title'], $aConfig['version_from'], $aConfig['version_to']), 'can_update' => '0', 'update' => '');
}
closedir($rHandleUpdate);
}
}
closedir($rHandleModule);
}
}
closedir($rHandleVendor);
}
ksort($aUpdates);
//--- Get Controls ---//
$aButtons = array('updates-install' => _t('_adm_btn_modules_install'), 'updates-delete' => _t('_adm_btn_modules_delete'));
$sControls = BxTemplSearchResult::showAdminActionsPanel('modules-updates-form', $aButtons, 'pathes');
if (!empty($sResult)) {
$sResult = MsgBox(_t($sResult), 10);
}
return $sResult . $GLOBALS['oAdmTemplate']->parseHtmlByName('modules_list.html', array('type' => 'updates', 'bx_repeat:items' => !empty($aUpdates) ? array_values($aUpdates) : MsgBox(_t('_Empty')), 'controls' => $sControls));
}
示例4: getAdminPageThemes
function getAdminPageThemes($sType)
{
$sPageThemes = $this->_customPageThemes();
if ($sPageThemes) {
$sFormName = 'custom_themes_form';
$aButtons = array('action_theme_export' => '_bx_profile_customize_btn_export', 'action_theme_delete' => '_bx_profile_customize_btn_delete');
$sContent = $this->parseHtmlByName('admin_form_units.html', array('form_name' => $sFormName, 'action' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'administration/' . $sType, 'units' => $sPageThemes, 'actions_panel' => BxTemplSearchResult::showAdminActionsPanel($sFormName, $aButtons, 'entry', false)));
} else {
$sContent = MsgBox(_t('_Empty'));
}
return $sContent;
}
示例5: getMembers
function getMembers($aParams)
{
if (!isset($aParams['view_start']) || empty($aParams['view_start'])) {
$aParams['view_start'] = 0;
}
if (!isset($aParams['view_per_page']) || empty($aParams['view_per_page'])) {
$aParams['view_per_page'] = BX_DOL_ADM_MP_PER_PAGE;
}
$aParams['view_order_way'] = 'ASC';
if (!isset($aParams['view_order']) || empty($aParams['view_order'])) {
$aParams['view_order'] = 'ID';
} else {
$aOrder = explode(' ', $aParams['view_order']);
if (count($aOrder) > 1) {
$aParams['view_order'] = $aOrder[0];
$aParams['view_order_way'] = $aOrder[1];
}
}
$sDateFormat = getLocaleFormat(BX_DOL_LOCALE_DATE, BX_DOL_LOCALE_DB);
$sSelectClause = $sJoinClause = $sWhereClause = $sGroupClause = '';
if (isset($aParams['ctl_type'])) {
switch ($aParams['ctl_type']) {
case 'qlinks':
switch ($aParams['ctl_params']['by']) {
case 'status':
$sWhereClause .= " AND `tp`.`Status`='" . ucfirst($aParams['ctl_params']['value']) . "'";
break;
case 'featured':
$sWhereClause .= " AND `tp`.`Featured`='1'";
break;
case 'banned':
$sWhereClause .= " AND (`tbl`.`Time`='0' OR (`tbl`.`Time`<>'0' AND DATE_ADD(`tbl`.`DateTime`, INTERVAL `tbl`.`Time` HOUR)>NOW()))";
break;
case 'type':
$sWhereClause .= $aParams['ctl_params']['value'] == 'single' ? " AND `tp`.`Couple`='0'" : " AND `tp`.`Couple`<>'0' AND `tp`.`Couple`>`tp`.`ID`";
break;
case 'role':
$iRole = BX_DOL_ROLE_MEMBER;
if ($aParams['ctl_params']['value'] == 'admins') {
$iRole = BX_DOL_ROLE_ADMIN;
}
$sWhereClause .= " AND `tp`.`Role` & " . $iRole . "";
break;
case 'sex':
$sWhereClause .= " AND LOWER(`tp`.`Sex`)='" . strtolower($aParams['ctl_params']['value']) . "' AND `tp`.`Couple` = 0 ";
break;
case 'membership':
$sWhereClause .= " AND LOWER(`tl`.`Name`)='" . strtolower($aParams['ctl_params']['value']) . "'";
break;
}
break;
case 'tags':
$sWhereClause .= " AND `tp`.`Tags` LIKE '%" . $aParams['ctl_params']['value'] . "%'";
break;
case 'search':
$sWhereClause .= " AND (\n `tp`.`ID` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR\n `tp`.`NickName` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR\n `tp`.`Email` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR\n `tp`.`DescriptionMe` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR\n `tp`.`Tags` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR\n `tp`.`DateReg` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR\n `tp`.`DateLastLogin` LIKE '%" . $aParams['ctl_params']['value'] . "%'\n )";
break;
}
}
//--- Get Paginate ---//
$oPaginate = new BxDolPaginate(array('start' => $aParams['view_start'], 'count' => (int) db_value("SELECT COUNT(`tp`.`ID`) FROM `Profiles` AS `tp` LEFT JOIN `sys_admin_ban_list` AS `tbl` ON `tp`.`ID`=`tbl`.`ProfID` LEFT JOIN `sys_acl_levels_members` AS `tlm` ON `tp`.`ID`=`tlm`.`IDMember` AND `tlm`.`DateStarts` < NOW() AND (`tlm`.`DateExpires`>NOW() || ISNULL(`tlm`.`DateExpires`)) LEFT JOIN `sys_acl_levels` AS `tl` ON `tlm`.`IDLevel`=`tl`.`ID` " . $sJoinClause . " WHERE 1 AND (`tp`.`Couple`=0 OR `tp`.`Couple`>`tp`.`ID`)" . $sWhereClause), 'per_page' => $aParams['view_per_page'], 'page_url' => $GLOBALS['site']['url_admin'] . 'profiles.php?start={start}', 'on_change_page' => BX_DOL_ADM_MP_JS_NAME . '.changePage({start})'));
$sPaginate = $oPaginate->getPaginate();
//--- Get Controls ---//
$GLOBALS['oAdmTemplate']->addJsTranslation(array('_adm_btn_mp_ban_duration'));
$aButtons = array('adm-mp-activate' => _t('_adm_btn_mp_activate'), 'adm-mp-deactivate' => _t('_adm_btn_mp_deactivate'), 'adm-mp-ban' => array('type' => 'submit', 'name' => 'adm-mp-ban', 'value' => _t('_adm_btn_mp_ban'), 'onclick' => 'onclick="javascript: return ' . BX_DOL_ADM_MP_JS_NAME . '.actionBan(this);"'), 'adm-mp-unban' => _t('_adm_btn_mp_unban'), 'adm-mp-confirm' => _t('_adm_btn_mp_confirm'), 'adm-mp-delete' => _t('_adm_btn_mp_delete'), 'adm-mp-delete-spammer' => _t('_adm_btn_mp_delete_spammer'));
$sControls = BxTemplSearchResult::showAdminActionsPanel('adm-mp-members-' . $aParams['view_type'], $aButtons, 'members');
//--- Get Items ---//
$sQuery = "\n SELECT\n `tp`.`ID` as `id`,\n `tp`.`NickName` AS `username`,\n `tp`.`Sex` AS `sex`,\n `tp`.`DateOfBirth` AS `date_of_birth`,\n `tp`.`Country` AS `country`,\n `tp`.`City` AS `city`,\n `tp`.`DescriptionMe` AS `description`,\n `tp`.`Email` AS `email`,\n DATE_FORMAT(`tp`.`DateReg`, '" . $sDateFormat . "' ) AS `registration`,\n DATE_FORMAT(`tp`.`DateLastLogin`, '" . $sDateFormat . "' ) AS `last_login`,\n DATE_FORMAT(`tp`.`DateLastNav`, '" . $sDateFormat . "' ) AS `last_activity`,\n `tp`.`Status` AS `status`,\n IF(`tbl`.`Time`='0' OR DATE_ADD(`tbl`.`DateTime`, INTERVAL `tbl`.`Time` HOUR)>NOW(), 1, 0) AS `banned`,\n `tl`.`ID` AS `ml_id`,\n IF(ISNULL(`tl`.`Name`),'', `tl`.`Name`) AS `ml_name`\n " . $sSelectClause . "\n FROM `Profiles` AS `tp`\n LEFT JOIN `sys_admin_ban_list` AS `tbl` ON `tp`.`ID`=`tbl`.`ProfID`\n LEFT JOIN `sys_acl_levels_members` AS `tlm` ON `tp`.`ID`=`tlm`.`IDMember` AND `tlm`.`DateStarts` < NOW() AND (`tlm`.`DateExpires`>NOW() || ISNULL(`tlm`.`DateExpires`))\n LEFT JOIN `sys_acl_levels` AS `tl` ON `tlm`.`IDLevel`=`tl`.`ID`\n " . $sJoinClause . "\n WHERE\n 1 AND (`tp`.`Couple`=0 OR `tp`.`Couple`>`tp`.`ID`)" . $sWhereClause . "\n " . $sGroupClause . "\n ORDER BY `tp`.`" . $aParams['view_order'] . "` " . $aParams['view_order_way'] . "\n LIMIT " . $aParams['view_start'] . ", " . $aParams['view_per_page'];
$aProfiles = $GLOBALS['MySQL']->getAll($sQuery);
//--- Display ---//
$sFunction = 'getMembers' . ucfirst($aParams['view_type']);
return $sFunction($aProfiles, $sPaginate, $sControls);
}
示例6: _actionManageFansPopup
function _actionManageFansPopup($iEntryId, $sTitle, $sFuncGetFans = 'getFans', $sFuncIsAllowedManageFans = 'isAllowedManageFans', $sFuncIsAllowedManageAdmins = 'isAllowedManageAdmins', $iMaxFans = 1000)
{
header('Content-type:text/html;charset=utf-8');
$iEntryId = (int) $iEntryId;
if (!($aDataEntry = $this->_oDb->getEntryByIdAndOwner($iEntryId, 0, true))) {
echo $GLOBALS['oFunctions']->transBox(MsgBox(_t('_Empty')));
exit;
}
if (!$this->{$sFuncIsAllowedManageFans}($aDataEntry)) {
echo $GLOBALS['oFunctions']->transBox(MsgBox(_t('_Access denied')));
exit;
}
$aProfiles = array();
$iNum = $this->_oDb->{$sFuncGetFans}($aProfiles, $iEntryId, true, 0, $iMaxFans);
if (!$iNum) {
echo $GLOBALS['oFunctions']->transBox(MsgBox(_t('_Empty')));
exit;
}
$sActionsUrl = bx_append_url_params(BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . "view/" . $aDataEntry[$this->_oDb->_sFieldUri], 'ajax_action=');
$aButtons = array(array('type' => 'submit', 'name' => 'fans_remove', 'value' => _t('_sys_btn_fans_remove'), 'onclick' => "onclick=\"getHtmlData('sys_manage_items_manage_fans_content', '{$sActionsUrl}remove&ids=' + sys_manage_items_get_manage_fans_ids(), false, 'post'); return false;\""));
if ($this->{$sFuncIsAllowedManageAdmins}($aDataEntry)) {
$aButtons = array_merge($aButtons, array(array('type' => 'submit', 'name' => 'fans_add_to_admins', 'value' => _t('_sys_btn_fans_add_to_admins'), 'onclick' => "onclick=\"getHtmlData('sys_manage_items_manage_fans_content', '{$sActionsUrl}add_to_admins&ids=' + sys_manage_items_get_manage_fans_ids(), false, 'post'); return false;\""), array('type' => 'submit', 'name' => 'fans_move_admins_to_fans', 'value' => _t('_sys_btn_fans_move_admins_to_fans'), 'onclick' => "onclick=\"getHtmlData('sys_manage_items_manage_fans_content', '{$sActionsUrl}admins_to_fans&ids=' + sys_manage_items_get_manage_fans_ids(), false, 'post'); return false;\"")));
}
bx_import('BxTemplSearchResult');
$sControl = BxTemplSearchResult::showAdminActionsPanel('sys_manage_items_manage_fans', $aButtons, 'sys_fan_unit');
$aVarsContent = array('suffix' => 'manage_fans', 'content' => $this->_profilesEdit($aProfiles, false, $aDataEntry), 'control' => $sControl);
$aVarsPopup = array('title' => $sTitle, 'content' => $this->_oTemplate->parseHtmlByName('manage_items_form', $aVarsContent));
echo $GLOBALS['oFunctions']->transBox($this->_oTemplate->parseHtmlByName('popup', $aVarsPopup), true);
exit;
}
示例7: isset
break;
case isset($_POST['action_approve']):
$oBxOSiModule->_oDb->updateApplicationStatus($iOldID, 'active');
break;
case isset($_POST['action_disapprove']):
$oBxOSiModule->_oDb->updateApplicationStatus($iOldID);
break;
case isset($_POST['action_copy']):
$oBxOSiModule->_oDb->copyApplication($iOldID, 0);
break;
}
}
}
$sHomeUrl = $oBxOSiModule->_oConfig->getHomeUrl();
$sAdmPanel = $sApplications = '';
$sApplications = $oBxOSiModule->getApplicationUnits();
if ($sApplications != '') {
bx_import('BxTemplSearchResult');
$oSearchResult = new BxTemplSearchResult();
$sAdmPanel = $oSearchResult->showAdminActionsPanel('application_container', array('action_approve' => '_Approve', 'action_disapprove' => '_Disapprove', 'action_delete' => '_Delete', 'action_copy' => '_osi_Copy_to_admin_applications'), 'os_appls');
} else {
$sApplications = MsgBox(_t('_Empty'));
}
$sHeaderValue = _t('_osi_Opensocial_moderation');
$sForm = $oBxOSiModule->GenCustomOSiBlock($iAdminID);
$aFormVariables = array('admin_url' => $sHomeUrl, 'applications' => $sApplications, 'admin_panel' => $sAdmPanel);
$sAdminCode = $oBxOSiModule->_oTemplate->parseHtmlByTemplateName('admin', $aFormVariables);
$iNameIndex = 9;
$_page = array('name_index' => $iNameIndex, 'css_name' => array('common.css', 'forms_adv.css', 'browse.css'), 'header' => $sHeaderValue, 'header_text' => $sHeaderValue);
$_page_cont[$iNameIndex]['page_main_code'] = DesignBoxAdmin($sHeaderValue, $sAdminCode) . $sForm;
PageCodeAdmin();
示例8: PageCodeKeys
function PageCodeKeys($mixedResult)
{
$sFilter = '';
$aItems = array();
if (isset($_GET['filter'])) {
$sFilter = process_db_input($_GET['filter'], BX_TAGS_STRIP);
$aKeys = $GLOBALS['MySQL']->getAll("SELECT `tk`.`ID` AS `id`, `tk`.`Key` AS `key`, `tc`.`Name` AS `category` FROM `sys_localization_keys` AS `tk` LEFT JOIN `sys_localization_strings` AS `ts` ON `tk`.`ID`=`ts`.`IDKey` LEFT JOIN `sys_localization_categories` AS `tc` ON `tk`.`IDCategory`=`tc`.`ID` WHERE `tk`.`Key` LIKE '%" . $sFilter . "%' OR `ts`.`String` LIKE '%" . $sFilter . "%' GROUP BY `tk`.`ID`");
foreach ($aKeys as $aKey) {
$aItems[] = array('id' => $aKey['id'], 'key' => $aKey['key'], 'category' => $aKey['category'], 'admin_url' => $GLOBALS['site']['url_admin']);
}
}
//--- Get Controls ---//
$aButtons = array('adm-lang-key-delete' => _t('_adm_txt_langs_delete'));
$sControls = BxTemplSearchResult::showAdminActionsPanel('adm-keys-form', $aButtons, 'keys');
$sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('langs_keys.html', array('filter_value' => $sFilter, 'filter_checked' => !empty($sFilter) ? 'checked="checked"' : '', 'bx_repeat:items' => !empty($aItems) ? $aItems : MsgBox(_t('_Empty')), 'control' => $sControls, 'url_admin' => $GLOBALS['site']['url_admin']));
if ($mixedResult !== true && !empty($mixedResult)) {
$sResult = MsgBox(_t($mixedResult), 3) . $sResult;
}
return DesignBoxAdmin(_t('_adm_box_cpt_lang_keys'), $sResult);
}
示例9: PageCodeDNSBL
function PageCodeDNSBL($aChains, $sMode)
{
global $aPages;
$sControls = BxTemplSearchResult::showAdminActionsPanel('adm-dnsbl-form', array('adm-dnsbl-delete' => _t('_sys_adm_btn_dnsbl_delete'), 'adm-dnsbl-activate' => _t('_sys_adm_btn_dnsbl_activate'), 'adm-dnsbl-deactivate' => _t('_sys_adm_btn_dnsbl_deactivate')), 'rules');
$sPlaceholders = implode(',', array_fill(0, count($aChains), '?'));
$aRules = $GLOBALS['MySQL']->getAll("SELECT * FROM `sys_dnsbl_rules` WHERE `chain` IN({$sPlaceholders}) ORDER BY `chain`, `added` ", $aChains);
foreach ($aRules as $k => $r) {
$aRules[$k]['comment'] = bx_html_attribute($r['comment']);
}
$bMode = getParam($aPages[$sMode]['option']) == 'on';
$sTopControls = $GLOBALS['oAdmTemplate']->parseHtmlByName('antispam_manage_dnsbl_top_controls.html', array('status' => $bMode ? _t('_sys_adm_enabled') : _t('_sys_adm_disabled'), 'status_class' => 'sys-adm-' . ($bMode ? 'enabled' : 'disabled'), 'mode' => $sMode));
if (is_array($aRules) && !empty($aRules)) {
$s = $GLOBALS['oAdmTemplate']->parseHtmlByName('antispam_manage_dnsbl.html', array('top_controls' => $sTopControls, 'bx_repeat:items' => $aRules, 'controls' => $sControls, 'global_message' => $GLOBALS['sGlMsg'], 'mode' => $sMode));
} else {
$s = $GLOBALS['oAdmTemplate']->parseHtmlByName('antispam_manage_dnsbl.html', array('top_controls' => $sTopControls, 'bx_repeat:items' => array(), 'controls' => '', 'global_message' => MsgBox(_t('_Empty')), 'mode' => $sMode));
}
return DesignBoxAdmin($GLOBALS['sPageTitle'], $s, $GLOBALS['aTopItems']);
}
示例10: PageCodePrices
function PageCodePrices($iId, $mixedResult)
{
//--- Get Items ---//
$oModuleDb = new BxDolModuleDb();
if (!$oModuleDb->isModule('payment')) {
return '';
}
$aInfo = BxDolService::call('payment', 'get_currency_info');
$sCurrencySign = $aInfo['sign'];
$aItems = array();
$aPrices = $GLOBALS['MySQL']->getAll("SELECT `id` AS `id`, `Days` AS `days`, `Price` AS `price` FROM `sys_acl_level_prices` WHERE `IDLevel`='" . $iId . "' ORDER BY `id`");
foreach ($aPrices as $aPrice) {
$aItems[] = array('id' => $aPrice['id'], 'title' => (int) $aPrice['days'] == 0 ? _t('_adm_txt_mlevels_price_info_lifetime', $sCurrencySign, $aPrice['price']) : _t('_adm_txt_mlevels_price_info', $aPrice['days'], $sCurrencySign, $aPrice['price']));
}
//--- Get Controls ---//
$sTopControls = $GLOBALS['oAdmTemplate']->parseHtmlByName('mlevels_prices_top_controls.html', array());
$aButtons = array('adm-mlevels-prices-delete' => _t('_adm_btn_mlevels_delete'));
$sControls = BxTemplSearchResult::showAdminActionsPanel('adm-mlevels-prices-form', $aButtons, 'prices');
$sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('mlevels_prices.html', array('id' => $iId, 'top_controls' => $sTopControls, 'bx_repeat:items' => $aItems, 'controls' => $sControls));
if ($mixedResult !== true && !empty($mixedResult)) {
$sResult = MsgBox(_t($mixedResult), 3) . $sResult;
}
$sTitle = $GLOBALS['MySQL']->getOne("SELECT `Name` FROM `sys_acl_levels` WHERE `ID`='" . $iId . "' LIMIT 1");
return DesignBoxAdmin(_t('_adm_box_cpt_mlevel_prices', $sTitle), $sResult);
}
示例11: _getLanguagesList
function _getLanguagesList($mixedResult, $bActive = false)
{
$sResult = '';
if ($mixedResult !== true && !empty($mixedResult)) {
$bActive = true;
$sResult = MsgBox(_t($mixedResult), 3);
}
//--- Get Items ---//
$aItems = array();
$sNameDefault = getParam('lang_default');
$aLangs = $GLOBALS['MySQL']->getAll("SELECT `ID` AS `id`, `Name` AS `name`, `Title` AS `title`, `Flag` AS `flag` FROM `sys_localization_languages` ORDER BY `Name`");
foreach ($aLangs as $aLang) {
$aItems[] = array('name' => $aLang['name'], 'value' => $aLang['id'], 'title' => $aLang['title'], 'icon' => $GLOBALS['site']['flags'] . $aLang['flag'] . '.gif', 'default' => $aLang['name'] == $sNameDefault ? '(' . _t('_adm_txt_langs_default') . ')' : '', 'edit_link' => $GLOBALS['site']['url_admin'] . 'lang_file.php?action=edit&id=' . $aLang['id'], 'export_link' => $GLOBALS['site']['url_admin'] . 'lang_file.php?action=export&id=' . $aLang['id']);
}
//--- Get Controls ---//
$aButtons = array('adm-lang-compile' => _t('_adm_txt_langs_compile'), 'adm-lang-delete' => _t('_adm_txt_langs_delete'));
$sControls = BxTemplSearchResult::showAdminActionsPanel('adm-langs-form', $aButtons, 'langs');
return $GLOBALS['oAdmTemplate']->parseHtmlByName('langs_files.html', array('display' => $bActive ? 'block' : 'none', 'results' => $sResult, 'bx_repeat:items' => $aItems, 'controls' => $sControls));
}
示例12: _blockFansUnconfirmed
function _blockFansUnconfirmed($iFansLimit = 1000)
{
if (!$this->_oMain->isEntryAdmin($this->aDataEntry)) {
return '';
}
$aProfiles = array();
$iNum = $this->_oDb->getFans($aProfiles, $this->aDataEntry[$this->_oDb->_sFieldId], false, 0, $iFansLimit);
if (!$iNum) {
return MsgBox(_t('_Empty'));
}
$sActionsUrl = BX_DOL_URL_ROOT . $this->_oMain->_oConfig->getBaseUri() . "view/" . $this->aDataEntry[$this->_oDb->_sFieldUri] . '?ajax_action=';
$aButtons = array(array('type' => 'submit', 'name' => 'fans_reject', 'value' => _t('_sys_btn_fans_reject'), 'onclick' => "onclick=\"getHtmlData('sys_manage_items_unconfirmed_fans_content', '{$sActionsUrl}reject&ids=' + sys_manage_items_get_unconfirmed_fans_ids(), false, 'post'); return false;\""), array('type' => 'submit', 'name' => 'fans_confirm', 'value' => _t('_sys_btn_fans_confirm'), 'onclick' => "onclick=\"getHtmlData('sys_manage_items_unconfirmed_fans_content', '{$sActionsUrl}confirm&ids=' + sys_manage_items_get_unconfirmed_fans_ids(), false, 'post'); return false;\""));
bx_import('BxTemplSearchResult');
$sControl = BxTemplSearchResult::showAdminActionsPanel('sys_manage_items_unconfirmed_fans', $aButtons, 'sys_fan_unit');
$aVars = array('suffix' => 'unconfirmed_fans', 'content' => $this->_oMain->_profilesEdit($aProfiles), 'control' => $sControl);
return $this->_oMain->_oTemplate->parseHtmlByName('manage_items_form', $aVars);
}
示例13: getAdminForm
function getAdminForm()
{
bx_import('BxTemplSearchResult');
$oNewSearchresult = new BxTemplSearchResult();
$aPolls = array();
$aPollsList = array();
$iPage = isset($_GET['page']) ? (int) $_GET['page'] : 1;
$iPerPage = isset($_GET['per_page']) ? (int) $_GET['per_page'] : 6;
if ($iPerPage > 100) {
$iPerPage = 100;
}
if ($iPerPage <= 0) {
$iPerPage = 6;
}
if (!$iPage) {
$iPage = 1;
}
// proccessed all post datas ;
if (isset($_POST['poll_id']) and is_array($_POST['poll_id'])) {
foreach ($_POST['poll_id'] as $iKey => $iValue) {
$iValue = (int) $iValue;
// set as approved;
if (isset($_POST['approve'])) {
$this->_oDb->setStatus($iValue, 1);
} else {
if (isset($_POST['disapprove'])) {
$this->_oDb->setStatus($iValue, 0);
} else {
if (isset($_POST['delete'])) {
$this->deletePoll($iValue);
} else {
if (isset($_POST['featured'])) {
$this->_oDb->setFeatured($iValue, 1);
} else {
if (isset($_POST['unfeatured'])) {
$this->_oDb->setFeatured($iValue, 0);
}
}
}
}
}
$oTag = new BxDolTags();
$oTag->reparseObjTags('bx_poll', $iValue);
$oCateg = new BxDolCategories();
$oCateg->reparseObjTags('bx_poll', $iValue);
}
}
$aLanguageKeys = array('premoderation' => _t('_bx_poll_moderation'), 'select_all' => _t('_bx_poll_select_all'), 'approve' => _t('_bx_poll_approve'), 'disapprove' => _t('_bx_poll_disapprove'), 'delete' => _t('_bx_poll_delete'), 'sure' => _t('_Are_you_sure'), 'featured' => _t('_bx_poll_featured'), 'unfeatured' => _t('_bx_poll_unfeatured'));
// get only the member's polls ;
$iTotalNum = $this->_oDb->getPollsCount(0, true);
if (!$iTotalNum) {
$sOutputHtml = MsgBox(_t('_Empty'));
}
$sLimitFrom = ($iPage - 1) * $iPerPage;
$sqlLimit = "LIMIT {$sLimitFrom}, {$iPerPage}";
$aPolls = $this->_oDb->getAllPolls($sqlLimit, 0, true);
foreach ($aPolls as $iKey => $aItems) {
$aPollsList[] = array('poll' => $this->getPollBlock($aItems, false, false, true));
}
// generate init page ;
$sInitPart = $this->getInitPollPage();
// generate page pagination ;
$sRequest = $this->sPathToModule . 'administration&page={page}&per_page={per_page}';
$oPaginate = new BxDolPaginate(array('page_url' => $sRequest, 'count' => $iTotalNum, 'per_page' => $iPerPage, 'sorting' => null, 'page' => $iPage));
$sPagination = $oPaginate->getPaginate();
// generate needed buttons;
$aButtons = array('approve' => $aLanguageKeys['approve'], 'disapprove' => $aLanguageKeys['disapprove'], 'featured' => $aLanguageKeys['featured'], 'unfeatured' => $aLanguageKeys['unfeatured'], 'delete' => array('type' => 'submit', 'name' => 'delete', 'value' => $aLanguageKeys['delete'], 'onclick' => 'onclick="return confirm(\'' . $aLanguageKeys['sure'] . '\')"'));
$sButtons = $oNewSearchresult->showAdminActionsPanel('poll_form', $aButtons, 'poll_id');
if (isset($GLOBALS['oAdmTemplate'])) {
$GLOBALS['oAdmTemplate']->addDynamicLocation($this->_oConfig->getHomePath(), $this->_oConfig->getHomeUrl());
$GLOBALS['oAdmTemplate']->addCss('main.css');
}
// generate template ;
$aTemplateKeys = array('action' => $this->sPathToModule . 'administration&page=' . $iPage . '&per_page=' . $iPerPage, 'init_js' => $sInitPart, 'js_file' => $this->_oTemplate->addJs('profile_poll.js', true), 'bx_repeat:polls' => $aPollsList, 'pagination' => $sPagination, 'admin_panel' => $sButtons);
$sOutputHtml .= $this->_oTemplate->parseHtmlByName($this->aUsedTemplates['poll_premoderation'], $aTemplateKeys);
$sOutputHtml = '<div id="pol_container">' . $sOutputHtml . '</div>';
return $sOutputHtml;
}
示例14: PageCodeMembers
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);
}
示例15: BxDolPaginate
</div>
<div>
<span style="color:{$sStatusColor};">{$sRssStatus}</span> <span class="sys-bullet"></span> {$sRssDesc}
</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;