本文整理汇总了PHP中DesignBoxContent函数的典型用法代码示例。如果您正苦于以下问题:PHP DesignBoxContent函数的具体用法?PHP DesignBoxContent怎么用?PHP DesignBoxContent使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DesignBoxContent函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PageCompMainCode
/**
* page code function
*/
function PageCompMainCode()
{
ob_start();
$oAccount = BxDolAccount::getInstance();
$aAccountInfo = $oAccount ? $oAccount->getInfo() : false;
if (!$aAccountInfo) {
return DesignBoxContent("Send Email example", 'Please login first', BX_DB_PADDING_DEF);
}
echo "<h2>Account info</h2>";
echo "Email: " . $aAccountInfo['email'] . '<br />';
echo "Email Confirmed: " . ($aAccountInfo['email_confirmed'] ? 'yes' : 'no') . '<br />';
echo "Receive site updates: " . ($aAccountInfo['receive_updates'] ? 'yes' : 'no') . '<br />';
echo "Receive site newsletters: " . ($aAccountInfo['receive_news'] ? 'yes' : 'no') . '<br />';
echo "Site emails are sent from: " . getParam('site_email_notify') . '<br />';
$a = array('sys' => array('title' => "Send me system email", 'type' => BX_EMAIL_SYSTEM, 'subj' => 'System Email', 'body' => 'This is system email <br /> {unsubscribe}'), 'notif' => array('title' => "Send me notification", 'type' => BX_EMAIL_NOTIFY, 'subj' => 'Notification Email', 'body' => 'This is notification email<br /> {unsubscribe}'), 'mass' => array('title' => "Send me bulk email", 'type' => BX_EMAIL_MASS, 'subj' => 'Bulk Email', 'body' => 'This is bulk email<br /> {unsubscribe}'));
$sSendMail = bx_get('send');
if ($sSendMail && isset($a[$sSendMail])) {
echo "<h2>Send Email Result</h2>";
$r = $a[$sSendMail];
if (sendMail($aAccountInfo['email'], $r['subj'], $r['body'], 0, array(), $r['type'])) {
echo MsgBox($r['subj'] . ' - successfully sent');
} else {
echo MsgBox($r['subj'] . ' - sent failed');
}
}
echo "<h2>Send email</h2>";
foreach ($a as $k => $r) {
echo '<a href="samples/email.php?send=' . $k . '">' . $r['title'] . '</a><br />';
}
return DesignBoxContent("Send Email Example", ob_get_clean(), BX_DB_PADDING_DEF);
}
示例2: PageCompMainCode
/**
* page code function
*/
function PageCompMainCode()
{
ob_start();
?>
<button class="bx-btn bx-def-margin-right">Button text</button>
<button class="bx-btn bx-btn-img bx-def-margin-right"><img src="template/images/icons/clock.png" /></button>
<button class="bx-btn bx-btn-img bx-def-margin-right"><img src="template/images/icons/clock.png"><u>Button text</u></button>
<div class="bx-clear"></div><hr class="bx-def-hr bx-def-margin-topbottom" />
<button class="bx-btn bx-btn-small bx-def-margin-right">Button text</button>
<button class="bx-btn bx-btn-small bx-btn-img bx-def-margin-right"><img src="template/images/icons/clock.png" /></button>
<button class="bx-btn bx-btn-small bx-btn-img bx-def-margin-right"><img src="template/images/icons/clock.png" /><u>Button text</u></button>
<div class="bx-clear"></div><hr class="bx-def-hr bx-def-margin-topbottom" />
<button class="bx-btn bx-def-margin-right"><i class="sys-icon fire-extinguisher"></i></button>
<button class="bx-btn bx-def-margin-right"><i class="sys-icon fire-extinguisher sys-icon-bigger"></i></button>
<button class="bx-btn bx-def-margin-right"><i class="sys-icon fire-extinguisher sys-icon-bigger col-red1"></i></button>
<button class="bx-btn bx-def-margin-right"><i class="sys-icon fire-extinguisher"></i><u>Button text</u></button>
<div class="bx-clear"></div><hr class="bx-def-hr bx-def-margin-topbottom" />
<button class="bx-btn bx-btn-small bx-def-margin-right"><i class="sys-icon fire-extinguisher"></i></button>
<button class="bx-btn bx-btn-small bx-def-margin-right"><i class="sys-icon fire-extinguisher"></i><u>Button text</u></button>
<?php
return DesignBoxContent("Buttons", ob_get_clean(), BX_DB_PADDING_DEF);
}
示例3: PageCompMainCode
/**
* page code function
*/
function PageCompMainCode()
{
ob_start();
// transBox
echo BxTemplFunctions::getInstance()->transBox('bx-sample-popup-transbox', '<div class="bx-def-padding">transBox</div>', true);
echo '<button class="bx-btn" onclick="$(\'#bx-sample-popup-transbox\').dolPopup()">transBox</button>';
// transBox AJAX
echo '<button class="bx-btn bx-def-margin-left" onclick="$(window).dolPopupAjax({url: \'samples/popup.php?_t=a' . time() . '\'})">transBox AJAX</button>';
// popupBox
echo BxTemplFunctions::getInstance()->popupBox('bx-sample-popup-box', 'popupBox', 'popupBox content', true);
echo '<button class="bx-btn bx-def-margin-left" onclick="$(\'#bx-sample-popup-box\').dolPopup()">popupBox</button>';
// popupBox without fog
echo BxTemplFunctions::getInstance()->popupBox('bx-sample-popup-box-without-fog', 'popupBox', 'popupBox without fog content', true);
echo '<button class="bx-btn bx-def-margin-left" onclick="$(\'#bx-sample-popup-box-without-fog\').dolPopup({fog:0})">popupBox without fog</button>';
echo '<div class="bx-clear"></div>';
echo '<hr class="bx-def-hr" />';
// transBox with pointer
echo BxTemplFunctions::getInstance()->transBox('bx-sample-popup-transbox-with-pointer', '<div class="bx-def-padding">transBox with pointer</div>', true);
echo '<button class="bx-btn" onclick="$(\'#bx-sample-popup-transbox-with-pointer\').dolPopup({pointer:{el:$(this)}})">transBox with pointer</button>';
// popupBox with pointer
echo BxTemplFunctions::getInstance()->popupBox('bx-sample-popup-box-with-pointer', 'popupBox', 'popupBox with pointer content', true);
echo '<button class="bx-btn bx-def-margin-left" onclick="$(\'#bx-sample-popup-box-with-pointer\').dolPopup({pointer:{el:$(this)}})">popupBox with pointer</button>';
// popupBox with pointer AJAX
echo BxTemplFunctions::getInstance()->popupBox('bx-sample-popup-box-with-pointer', 'popupBox', 'popupBox with pointer AJAX', true);
echo '<button class="bx-btn bx-def-margin-left" onclick="$(this).dolPopupAjax({url: \'samples/popup.php?_t=b' . time() . '\'})">popupBox with pointer AJAX</button>';
echo '<div class="bx-clear"></div>';
return DesignBoxContent("Sample popup", ob_get_clean(), BX_DB_PADDING_DEF);
}
示例4: PageCompPageMainCodeWithForm
function PageCompPageMainCodeWithForm()
{
global $oTemplConfig, $site;
$aForm = array('form_attrs' => array('id' => 'post_us_form', 'action' => BX_DOL_URL_ROOT . 'contact.php', 'method' => 'post'), 'params' => array('db' => array('submit_name' => 'do_submit')), 'inputs' => array('name' => array('type' => 'text', 'name' => 'name', 'caption' => _t('_Your name'), 'required' => true, 'checker' => array('func' => 'length', 'params' => array(1, 150), 'error' => _t('_Name is required'))), 'email' => array('type' => 'text', 'name' => 'email', 'caption' => _t('_Your email'), 'required' => true, 'checker' => array('func' => 'email', 'error' => _t('_Incorrect Email'))), 'message_subject' => array('type' => 'text', 'name' => 'subject', 'caption' => _t('_message_subject'), 'required' => true, 'checker' => array('func' => 'length', 'params' => array(5, 300), 'error' => _t('_ps_ferr_incorrect_length'))), 'message_text' => array('type' => 'textarea', 'name' => 'body', 'caption' => _t('_Message text'), 'required' => true, 'checker' => array('func' => 'length', 'params' => array(10, 5000), 'error' => _t('_ps_ferr_incorrect_length'))), 'captcha' => array('type' => 'captcha', 'caption' => _t('_Enter what you see'), 'name' => 'securityImageValue', 'required' => true, 'checker' => array('func' => 'captcha', 'error' => _t('_Incorrect Captcha'))), 'submit' => array('type' => 'submit', 'name' => 'do_submit', 'value' => _t('_Submit'))));
$oForm = new BxTemplFormView($aForm);
$sForm = $oForm->getCode();
$oForm->initChecker();
if ($oForm->isSubmittedAndValid()) {
$sSenderName = process_pass_data($_POST['name'], BX_TAGS_STRIP);
$sSenderEmail = process_pass_data($_POST['email'], BX_TAGS_STRIP);
$sLetterSubject = process_pass_data($_POST['subject'], BX_TAGS_STRIP);
$sLetterBody = process_pass_data($_POST['body'], BX_TAGS_STRIP);
$sLetterBody = $sLetterBody . "\r\n" . '============' . "\r\n" . _t('_from') . ' ' . $sSenderName . "\r\n" . 'with email ' . $sSenderEmail;
if (sendMail($site['email'], $sLetterSubject, $sLetterBody)) {
$sActionKey = '_ADM_PROFILE_SEND_MSG';
} else {
$sActionKey = '_Email sent failed';
}
$sActionText = MsgBox(_t($sActionKey));
$sForm = $sActionText . $sForm;
} else {
$sForm = $oForm->getCode();
}
return DesignBoxContent(_t('_CONTACT_H1'), $sForm, $oTemplConfig->PageCompThird_db_num);
}
示例5: getCalendar
function getCalendar()
{
$oProfile = new BxBaseProfileGenerator(getLoggedId());
$mSearchRes = $oProfile->GenProfilesCalendarBlock();
list($sResults, $aDBTopMenu, $sPagination, $sTopFilter) = $mSearchRes;
return DesignBoxContent(_t('_People_Calendar'), $sResults, 1);
}
示例6: showTags
function showTags($aParam = array(), $iBoxId = 1, $sAction = '', $iBox = 0, $sTitle = '')
{
$oTags = new BxTemplTags();
$oTags->getTagObjectConfig($aParam);
if (empty($oTags->aTagObjects)) {
if ($iBox & BX_TAGS_BOX_DISIGN) {
return DesignBoxContent($sTitle, MsgBox(_t('_Empty')), 1);
} else {
return MsgBox(_t('_Empty'));
}
}
$aParam['type'] = isset($_GET['tags_mode']) && isset($oTags->aTagObjects[$_GET['tags_mode']]) ? $_GET['tags_mode'] : $oTags->getFirstObject();
$sCode = '';
if ($iBox & BX_TAGS_BOX_INT_MENU) {
$sCode .= $oTags->getTagsInternalMenuHtml($aParam, $iBoxId, $sAction);
}
$sCode .= $oTags->display($aParam, $iBoxId, $sAction);
if ($iBox & BX_TAGS_BOX_DISIGN) {
$aCaptionMenu = $iBox & BX_TAGS_BOX_INT_MENU ? '' : $oTags->getTagsTopMenuHtml($aParam, $iBoxId, $sAction);
$sCode = DesignBoxContent($sTitle, $sCode, 1, $aCaptionMenu);
$sCode = '<div id="page_block_' . $iBoxId . '">' . $sCode . '<div class="clear_both"></div></div>';
return $sCode;
} else {
return array($sCode, $iBox & BX_TAGS_BOX_INT_MENU ? '' : $oTags->getTagsTopMenu($aParam, $sAction), array(), $sDate ? _t('_tags_by_day') . $sDate : '');
}
}
示例7: profileCustomizeBlock
function profileCustomizeBlock($aTopMenu, $sPage, $aTargets, $sTarget, $aVars)
{
$sContent = '';
$aMenuItems = array();
$sBaseUrl = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri();
$aItems = array();
foreach ($aTopMenu as $sName => $aItem) {
$aItems[] = array('title' => $sName, 'active' => $aItem['active'], 'href' => $aItem['href'], 'onclick' => 'oBxSctrMain.reloadCustomizeBlock(this.href, false); return false;');
}
$sTopMenu = BxDolPageView::getBlockCaptionMenu('site_customize', $aItems);
// content for box
if ($sPage != 'themes') {
$sTopControls = $this->parsePageByName('designbox_top_controls.html', array('top_controls' => $this->parseHtmlByName('content_box_top_controls.html', array('name_box' => _t('_bx_sctr_select_target'), 'name_targets_box' => 'background_box', 'bx_repeat:targets' => $aTargets))));
$sBoxContent = $this->parseHtmlByName('content_box.html', array('bx_if:select_target' => array('condition' => !empty($aTargets), 'content' => array('top_controls' => $sTopControls)), 'content' => call_user_func_array(array($this, '_customPage' . ucfirst($sPage)), array($sPage, $sTarget, $aVars)), 'bx_repeat:buttons' => array(array('btn_type' => 'button', 'btn_name' => 'preview', 'btn_value' => _t('_bx_sctr_btn_preview'), 'btn_action' => "oBxSctrMain.reloadCustom('" . $sPage . "', '" . $sTarget . "', 'preview');"), array('btn_type' => 'button', 'btn_name' => 'reset', 'btn_value' => _t('_bx_sctr_btn_reset'), 'btn_action' => "oBxSctrMain.resetCustom('" . $sPage . "', '" . $sTarget . "', 'reset');"), array('btn_type' => 'button', 'btn_name' => 'save', 'btn_value' => _t('_bx_sctr_btn_save'), 'btn_action' => "oBxSctrMain.reloadCustom('" . $sPage . "', '" . $sTarget . "', 'save');"), array('btn_type' => 'button', 'btn_name' => 'publish', 'btn_value' => _t('_bx_sctr_btn_publish'), 'btn_action' => "oBxSctrMain.showPublish('{$sBaseUrl}publish');"))));
} else {
$iUserId = $sTarget == 'my' ? $this->_oModule->iUserId : 0;
$sPageThemes = $this->_customPageThemes($iUserId, true);
if ($sPageThemes) {
$aButtons = array(array('btn_type' => 'button', 'btn_name' => 'preview', 'btn_value' => _t('_bx_sctr_btn_preview'), 'btn_action' => "oBxSctrMain.previewTheme();"), array('btn_type' => 'button', 'btn_name' => 'reset', 'btn_value' => _t('_bx_sctr_btn_reset'), 'btn_action' => "oBxSctrMain.resetCustom('', '', 'reset');"), array('btn_type' => 'button', 'btn_name' => 'save', 'btn_value' => _t('_bx_sctr_btn_save'), 'btn_action' => "oBxSctrMain.saveTheme();"));
} else {
$aButtons = array();
}
if ($sPageThemes && $sTarget != 'shared') {
$aButtons[] = array('btn_type' => 'button', 'btn_name' => 'delete', 'btn_value' => _t('_bx_sctr_btn_delete'), 'btn_action' => "oBxSctrMain.deleteTheme('" . $sBaseUrl . "deletetheme/');");
}
$aButtons[] = array('btn_type' => 'button', 'btn_name' => 'reset', 'btn_value' => _t('_bx_sctr_btn_reset_all'), 'btn_action' => "oBxSctrMain.resetAll('{$sBaseUrl}resetall');");
$sTopControls = $this->parsePageByName('designbox_top_controls.html', array('top_controls' => $this->parseHtmlByName('content_box_top_controls.html', array('name_box' => _t('_bx_sctr_select_target'), 'name_targets_box' => 'background_box', 'bx_repeat:targets' => $aTargets))));
$sBoxContent = $this->parseHtmlByName('content_box.html', array('bx_if:select_target' => array('condition' => !empty($aTargets), 'content' => array('top_controls' => $sTopControls)), 'content' => $sPageThemes ? $sPageThemes : MsgBox(_t('_Empty')), 'bx_repeat:buttons' => $aButtons));
}
// customize box
$sContent = $this->parseHtmlByName('customize_block.html', array('js_code' => $this->getJsCode(true), 'content' => $GLOBALS['oFunctions']->transBox(DesignBoxContent(_t('_bx_sctr'), $sBoxContent, 1, $sTopMenu), false)));
$this->addCss(array('main.css'));
$this->addJs(array('colorinput.js', 'main.js'));
return $sContent;
}
示例8: getForm
public function getForm($iDesignBoxTemplate = BX_DB_PADDING_DEF, $sTitle = false)
{
if ($this->_sMetaType) {
return '';
}
if (false === $sTitle) {
$sTitle = _t("_Search");
}
$aValues = $this->getKeyTitlesPairs();
$aValue = isset($_GET['type']) ? bx_process_input($_GET['type']) : array_keys($aValues);
$sIdForm = $this->_sIdForm . ($this->_bLiveSearch ? $this->_sSuffixLiveSearch : '');
$sIdResults = $this->_sIdResults . ($this->_bLiveSearch ? $this->_sSuffixLiveSearch : '');
$sIdLoadingContainer = $this->_bLiveSearch ? $sIdResults : $sIdForm;
$sJsParams = "5, '#{$sIdForm}', '#{$sIdResults}', '#{$sIdLoadingContainer}', '{$this->_bLiveSearch}'";
$aForm = array('form_attrs' => array('id' => $sIdForm, 'action' => BX_DOL_URL_ROOT . 'searchKeyword.php', 'method' => 'post'), 'csrf' => array('disable' => true), 'inputs' => array('live_search' => array('type' => 'hidden', 'name' => 'live_search', 'value' => $this->_bLiveSearch ? 1 : 0), 'section' => array('type' => 'checkbox_set', 'name' => 'section', 'caption' => _t('_Section'), 'values' => $aValues, 'value' => $aValue), 'keyword' => array('type' => 'text', 'name' => 'keyword', 'caption' => _t('_Keyword'), 'value' => bx_get('keyword') ? bx_process_input(bx_get('keyword')) : ''), 'search' => array('type' => 'submit', 'name' => 'search', 'value' => _t('_Search'))));
if ($this->_bLiveSearch) {
unset($aForm['inputs']['section']);
unset($aForm['inputs']['search']);
unset($aForm['inputs']['keyword']['caption']);
$aForm['inputs']['keyword']['attrs']['placeholder'] = _t('_sys_search_placeholder');
$aForm['inputs']['keyword']['attrs']['onkeypress'] = "return bx_search_on_type(event, {$sJsParams});";
$aForm['inputs']['keyword']['attrs']['onpaste'] = $aForm['inputs']['keyword']['attrs']['onkeypress'];
}
bx_import('BxTemplFormView');
$oForm = new BxTemplFormView($aForm);
$sForm = $oForm->getCode();
if (!$this->_bLiveSearch) {
bx_import('BxTemplPaginate');
$o = new BxTemplPaginate(array());
$o->addCssJs();
}
return DesignBoxContent($sTitle, $sForm, $iDesignBoxTemplate);
}
示例9: login_form
function login_form($text = "", $member = 0, $bAjaxMode = false)
{
global $site;
global $_page_cont;
global $_page;
if ($member == 1) {
LoginFormAdmin();
exit;
}
$sLoginFormParams = $bAjaxMode ? 'no_join_text' : '';
$sLoginFormContent = getMemberLoginFormCode('login_box_form', $sLoginFormParams);
if ($bAjaxMode) {
$iDesignBox = 1;
$sContent = $sLoginFormContent;
$sJoinFormContent = getMemberJoinFormCode();
if (!empty($sJoinFormContent)) {
$iDesignBox = 3;
$sContent = $GLOBALS['oSysTemplate']->parseHtmlByName('login_join_popup.html', array('login_form' => $sLoginFormContent, 'join_form' => $sJoinFormContent));
}
$sCaption = _t('_Login');
$sCaptionItems = '<div class="dbTopMenu"><i class="bx-popup-element-close sys-icon times"></i></div>';
$sMemberLoginFormAjx = $GLOBALS['oFunctions']->transBox(DesignBoxContent($sCaption, $sContent, $iDesignBox, $sCaptionItems), true);
header('Content-Type: text/html; charset=utf-8');
echo $sMemberLoginFormAjx;
exit;
}
$_page['name_index'] = 0;
$_page['header'] = $site['title'] . ' ' . _t('_Login');
$_page['header_text'] = _t('_Login');
$_page_cont[0]['page_main_code'] = '<div class="controlsDiv">' . $sLoginFormContent . '</div>';
PageCode();
exit;
}
示例10: getSearchForm
function getSearchForm()
{
$aList = $GLOBALS['MySQL']->fromCache('sys_objects_search', 'getAllWithKey', 'SELECT `ID` as `id`,
`Title` as `title`,
`ClassName` as `class`,
`ClassPath` as `file`,
`ObjectName`
FROM `sys_objects_search`', 'ObjectName');
$aValues = array();
foreach ($aList as $sKey => $aValue) {
$aValues[$sKey] = _t($aValue['title']);
if (!class_exists($aValue['class'])) {
$sPath = BX_DIRECTORY_PATH_ROOT . str_replace('{tmpl}', $GLOBALS['tmpl'], $aValue['file']);
require_once $sPath;
}
$oClass = new $aValue['class']();
$oClass->addCustomParts();
}
if (isset($_GET['type'])) {
$aValue = strip_tags($_GET['type']);
} else {
$aValue = array_keys($aValues);
}
$aForm = array('form_attrs' => array('id' => 'searchForm', 'action' => '', 'method' => 'post', 'onsubmit' => ''), 'inputs' => array('section' => array('type' => 'checkbox_set', 'name' => 'section', 'caption' => _t('_Section'), 'values' => $aValues, 'value' => $aValue), 'keyword' => array('type' => 'text', 'name' => 'keyword', 'caption' => _t('_Keyword')), 'search' => array('type' => 'submit', 'name' => 'search', 'value' => _t('_Search'))));
$oForm = new BxTemplFormView($aForm);
$sFormVal = $oForm->getCode();
return DesignBoxContent(_t("_Search"), $sFormVal, 11);
}
示例11: PageCompMainCode
/**
* page code function
*/
function PageCompMainCode()
{
global $oTemplConfig;
global $logged;
$iId = (int) $_COOKIE['memberID'];
if ($iId > 0) {
$sPassword = getPassword($iId);
$bEnableRay = getParam('enable_ray') == 'on';
$check_res = checkAction($iId, ACTION_ID_USE_RAY_CHAT);
if ($bEnableRay && $check_res[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED) {
$ret .= getApplicationContent('chat', 'user', array('id' => $iId, 'password' => $sPassword));
} else {
// $ret .= '
// <center>
// <table width=100% height=100% cellpadding=0 cellspacing=0>
// <td align=center valign=center>
// <table width="90%" height="70" cellpadding="5" cellspacing="1" class="table">
// <tr>
// <td class="panel" width="100%" align="center" valign="middle">
// <div align="center" class="small">' . $check_res[CHECK_ACTION_MESSAGE] . '</div>
// </td>
// </tr>
// </table>
// </td>
// </table>
// </center>';
$ret .= MsgBox($check_res[CHECK_ACTION_MESSAGE]);
}
return DesignBoxContent(_t("_RAY_CHAT"), $ret, $oTemplConfig->PageCompThird_db_num);
} else {
return DesignBoxContent(_t('_LOGIN_ERROR'), MsgBox(_t('_Please login before using Ray chat')), 1);
}
}
示例12: getCommentsBlock
/**
* get full comments block with initializations
*/
function getCommentsBlock($iParentId = 0, $iVParentId = 0, $bInDesignbox = true)
{
$aBp = array('parent_id' => $iParentId, 'vparent_id' => $iVParentId);
$aDp = array('show_empty' => true);
$sCaption = _t('_cmt_block_comments_title', $this->getCommentsCount());
$sContent = BxDolTemplate::getInstance()->parseHtmlByName('comments_block.html', array('system' => $this->_sSystem, 'list_anchor' => $this->getListAnchor(), 'id' => $this->getId(), 'comments' => $this->getComments($aBp, $aDp), 'post_form_top' => $this->getFormBoxPost($aBp, array('type' => $this->_sDisplayType, 'position' => BX_CMT_PFP_TOP)), 'post_form_bottom' => $this->getFormBoxPost($aBp, array('type' => $this->_sDisplayType, 'position' => BX_CMT_PFP_BOTTOM)), 'view_image_popup' => $this->_getViewImagePopup(), 'script' => $this->getJsScript()));
return $bInDesignbox ? DesignBoxContent($sCaption, $sContent, BX_DB_PADDING_DEF, $this->_getControlsBox()) : array('title' => $sCaption, 'content' => $sContent, 'designbox_id' => BX_DB_PADDING_DEF, 'menu' => $this->_getControlsBox());
}
示例13: PageCompPageMainCode
/**
* page code function
*/
function PageCompPageMainCode()
{
global $oTemplConfig;
global $site;
$ret = _t("_TERMS_OF_USE");
$ret = str_replace('<site>', $site['title'], $ret);
return DesignBoxContent(_t("_TERMS_OF_USE_H1"), $ret, $oTemplConfig->PageCompThird_db_num);
}
示例14: PageCompPageMainCode
function PageCompPageMainCode()
{
if (!$GLOBALS['MySQL']->getOne("SELECT COUNT(*) FROM `bx_spy_handlers` WHERE `alert_unit` = 'bx_wall' AND `alert_action` = 'post' AND `module_uri` = 'wall' AND `module_class` = 'Module' AND `module_method` = 'get_spy_post'")) {
BxDolService::call('spy', 'update_handlers', array('wall', true));
$s = 'Wall handlers for Spy were updated';
} else {
$s = 'Wall handlers are already updated';
}
return DesignBoxContent($GLOBALS['_page']['header'], $s, $GLOBALS['oTemplConfig']->PageCompThird_db_num);
}
示例15: PageCompMainCode
/**
* page code function
*/
function PageCompMainCode()
{
ob_start();
$oGrid = BxDolGrid::getObjectInstance('sample');
// it automatically creates instance of default or custom class by object name
if ($oGrid) {
echo $oGrid->getCode();
}
// print grid object
return DesignBoxContent("Sample grid", ob_get_clean(), BX_DB_PADDING_DEF);
}