本文整理汇总了PHP中BxDolTemplate::BxDolTemplate方法的典型用法代码示例。如果您正苦于以下问题:PHP BxDolTemplate::BxDolTemplate方法的具体用法?PHP BxDolTemplate::BxDolTemplate怎么用?PHP BxDolTemplate::BxDolTemplate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BxDolTemplate
的用法示例。
在下文中一共展示了BxDolTemplate::BxDolTemplate方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: BxDolTemplateAdmin
/**
* Constructor
*/
function BxDolTemplateAdmin($sHomeFolder)
{
parent::BxDolTemplate(BX_DIRECTORY_PATH_ROOT . $sHomeFolder . DIRECTORY_SEPARATOR, BX_DOL_URL_ROOT . $sHomeFolder . '/');
$this->_sPrefix = 'BxDolTemplateAdmin';
$this->_sInjectionsTable = 'sys_injections_admin';
$this->_sInjectionsCache = 'sys_injections_admin.inc';
$this->_sCodeKey = 'askin';
$this->_sCode = isset($_COOKIE[$this->_sCodeKey]) && preg_match('/^[A-Za-z0-9_-]+$/', $_COOKIE[$this->_sCodeKey]) ? $_COOKIE[$this->_sCodeKey] : BX_DOL_TEMPLATE_DEFAULT_CODE;
$this->_sCode = isset($_GET[$this->_sCodeKey]) && preg_match('/^[A-Za-z0-9_-]+$/', $_GET[$this->_sCodeKey]) ? $_GET[$this->_sCodeKey] : $this->_sCode;
$this->addLocationJs('system_admin_js', $this->_sRootPath . 'js/', $this->_sRootUrl . 'js/');
}
示例2: BxDolModuleTemplate
function BxDolModuleTemplate(&$oConfig, &$oDb, $sRootPath = BX_DIRECTORY_PATH_ROOT, $sRootUrl = BX_DOL_URL_ROOT)
{
parent::BxDolTemplate($sRootPath, $sRootUrl);
$this->_oDb =& $oDb;
$this->_oConfig =& $oConfig;
$sClassPrefix = $oConfig->getClassPrefix();
$sHomePath = $oConfig->getHomePath();
$sHomeUrl = $oConfig->getHomeUrl();
$this->addLocation($sClassPrefix, $sHomePath, $sHomeUrl);
$this->addLocationJs($sClassPrefix, $sHomePath . 'js/', $sHomeUrl . 'js/');
}
示例3: BxDolFilesUploader
function BxDolFilesUploader($sUploadTypeNC = 'Common')
{
parent::BxDolTemplate();
$this->sTempFilename = '';
$this->sUploadTypeNC = $sUploadTypeNC;
$this->sUploadTypeLC = strtolower($this->sUploadTypeNC);
$this->_iOwnerId = $this->_getAuthorId();
$this->_sJsPostObject = 'o' . $this->sUploadTypeNC . 'Upload';
$this->sSendFileInfoFormCaption = '';
$GLOBALS['oSysTemplate']->addJsTranslation(array('_bx_' . $this->sUploadTypeLC . 's_val_title_err', '_bx_' . $this->sUploadTypeLC . 's_val_descr_err'));
//--- Get Extras ---//
$this->_aExtras = array();
if (!empty($_POST)) {
$this->_aExtras = $this->_getExtraParams($_POST);
}
$this->iMaxFilesize = min(return_bytes(ini_get('upload_max_filesize')), return_bytes(ini_get('post_max_size')));
//max allowed from php.ini
}
示例4: BxDolFilesUploader
function BxDolFilesUploader($sUploadTypeNC = 'Common')
{
parent::BxDolTemplate();
$this->sTempFilename = '';
$this->sUploadTypeNC = $sUploadTypeNC;
$this->sUploadTypeLC = strtolower($this->sUploadTypeNC);
$this->_iOwnerId = $this->_getAuthorId();
$this->_sJsPostObject = 'o' . $this->sUploadTypeNC . 'Upload';
$this->sSendFileInfoFormCaption = '';
$GLOBALS['oSysTemplate']->addJsTranslation(array('_bx_' . $this->sUploadTypeLC . 's_val_title_err', '_bx_' . $this->sUploadTypeLC . 's_val_descr_err'));
//--- Get Extras ---//
$this->_aExtras = array();
if (!empty($_POST)) {
$this->_aExtras = $this->_getExtraParams($_POST);
}
$this->iMaxFilesize = min(return_bytes(ini_get('upload_max_filesize')), return_bytes(ini_get('post_max_size')));
//max allowed from php.ini
$this->sMultiUploaderParams = array('accept_file' => '', 'multi' => 'true', 'auto' => 'true', 'accept_format' => '*.*', 'accept_format_desc' => 'All Files', 'file_size_limit' => $this->iMaxFilesize, 'file_upload_limit' => '10', 'file_queue_limit' => '5', 'button_image_url' => $GLOBALS['oSysTemplate']->getImageUrl('button_sprite.png'));
}
示例5: BxDolOrcaForumsTemplate
function BxDolOrcaForumsTemplate($sRootPath = BX_DIRECTORY_PATH_ROOT, $sRootUrl = BX_DOL_URL_ROOT)
{
parent::BxDolTemplate($sRootPath, $sRootUrl);
$this->addLocation('BxDolOrcaForums', $GLOBALS['gConf']['dir']['base'], $GLOBALS['gConf']['url']['base']);
}
示例6: BxDolPaginate
/**
* Constructor
*/
function BxDolPaginate($aParams)
{
parent::BxDolTemplate();
//--- Main settings ---//
$this->_iStart = isset($aParams['start']) ? (int) $aParams['start'] : 0;
$this->_iCount = isset($aParams['count']) ? (int) $aParams['count'] : 0;
$this->_iPerPage = isset($aParams['per_page']) ? (int) $aParams['per_page'] : BX_DOL_PAGINATE_PER_PAGE_DEFAULT;
$this->_sSorting = isset($aParams['sorting']) ? $aParams['sorting'] : '';
$this->_sPageUrl = isset($aParams['page_url']) ? $aParams['page_url'] : BX_DOL_URL_ROOT;
$this->_iRange = isset($aParams['range']) ? (int) $aParams['range'] : BX_DOL_PAGINATE_RANGE;
$this->_iPage = isset($aParams['page']) ? (int) $aParams['page'] : 0;
$this->_iPages = 0;
$this->_sViewAllUrl = isset($aParams['view_all_url']) ? $aParams['view_all_url'] : BX_DOL_URL_ROOT;
//--- Check Start values ---//
if (empty($this->_iStart) && !empty($this->_iPage)) {
$this->_iStart = ($this->_iPage - 1) * $this->_iPerPage;
$this->_iPage = 0;
}
//--- JS mode settings ---//
$this->_sOnChangePage = isset($aParams['on_change_page']) ? $aParams['on_change_page'] : '';
$this->_sOnChangePerPage = isset($aParams['on_change_per_page']) ? $aParams['on_change_per_page'] : '';
$this->_sOnChangeSorting = isset($aParams['on_change_sorting']) ? $aParams['on_change_sorting'] : '';
//--- Per page settings ---//
$this->_sPerPageType = isset($aParams['per_page_type']) ? $aParams['per_page_type'] : BX_DOL_PAGINATE_PER_PAGE_TYPE_STATIC;
$this->_iPerPageStep = isset($aParams['per_page_step']) ? (int) $aParams['per_page_step'] : BX_DOL_PAGINATE_PER_PAGE_STEP;
$this->_iPerPageInterval = isset($aParams['per_page_interval']) ? (int) $aParams['per_page_interval'] : BX_DOL_PAGINATE_PER_PAGE_INTERVAL;
$this->_sPerPageValues = isset($aParams['per_page_values']) ? (int) $aParams['per_page_values'] : '…,' . BX_DOL_PAGINATE_PER_PAGE_VALUES;
//--- Paginate's layout ---//
$this->_bInfo = isset($aParams['info']) && $aParams['info'] === true;
$this->_bViewAll = isset($aParams['view_all']) && $aParams['view_all'] === true;
$this->_bPageReloader = isset($aParams['page_reloader']) && $aParams['page_reloader'] === true;
$this->_bPerPageChanger = isset($aParams['per_page_changer']) && $aParams['per_page_changer'] === true;
$this->_bPageLinks = !isset($aParams['page_links']) || isset($aParams['page_links']) && $aParams['page_links'] === true;
$this->_bPageLinksFirstLast = $this->_bPageLinks && isset($aParams['page_links_first_last']) && $aParams['page_links_first_last'] === true;
//--- Templates ---//
$this->_sButtonActiveTmpl = $GLOBALS['oTemplConfig']->sPaginateButtonActiveTmpl;
$this->_sButtonActiveTmplMobile = $GLOBALS['oTemplConfig']->sPaginateButtonActiveTmplMobile;
$this->_sButtonInactiveTmpl = $GLOBALS['oTemplConfig']->sPaginateButtonInactiveTmpl;
$this->_sLinkActiveTmpl = $GLOBALS['oTemplConfig']->sPaginateLinkActiveTmpl;
$this->_sLinkInactiveTmpl = $GLOBALS['oTemplConfig']->sPaginateLinkInactiveTmpl;
$this->_sSortingTmpl = $GLOBALS['oTemplConfig']->sPaginateSortingTmpl;
}
示例7: BxDolPaginate
/**
* Constructor
*/
function BxDolPaginate($aParams)
{
parent::BxDolTemplate();
//--- Main settings ---//
$this->_iStart = isset($aParams['start']) ? (int) $aParams['start'] : 0;
$this->_iCount = isset($aParams['count']) ? (int) $aParams['count'] : 0;
$this->_iPerPage = isset($aParams['per_page']) ? (int) $aParams['per_page'] : BX_DOL_PAGINATE_PER_PAGE_DEFAULT;
$this->_sSorting = isset($aParams['sorting']) ? $aParams['sorting'] : '';
$this->_sPageUrl = isset($aParams['page_url']) ? $aParams['page_url'] : BX_DOL_URL_ROOT;
$this->_iRange = isset($aParams['range']) ? (int) $aParams['range'] : BX_DOL_PAGINATE_RANGE;
$this->_iPage = isset($aParams['page']) ? (int) $aParams['page'] : 0;
$this->_iPages = 0;
$this->_sViewAllUrl = isset($aParams['view_all_url']) ? $aParams['view_all_url'] : BX_DOL_URL_ROOT;
//--- Check Start values ---//
if (empty($this->_iStart) && !empty($this->_iPage)) {
$this->_iStart = ($this->_iPage - 1) * $this->_iPerPage;
$this->_iPage = 0;
}
//--- JS mode settings ---//
$this->_sOnChangePage = isset($aParams['on_change_page']) ? $aParams['on_change_page'] : '';
$this->_sOnChangePerPage = isset($aParams['on_change_per_page']) ? $aParams['on_change_per_page'] : '';
$this->_sOnChangeSorting = isset($aParams['on_change_sorting']) ? $aParams['on_change_sorting'] : '';
//--- Per page settings ---//
$this->_iPerPageStep = isset($aParams['per_page_step']) ? (int) $aParams['per_page_step'] : BX_DOL_PAGINATE_PER_PAGE_STEP;
$this->_iPerPageInterval = isset($aParams['per_page_interval']) ? (int) $aParams['per_page_interval'] : BX_DOL_PAGINATE_PER_PAGE_INTERVAL;
//--- Paginate's layout ---//
$this->_bInfo = !isset($aParams['info']) || isset($aParams['info']) && $aParams['info'] === true;
$this->_bViewAll = isset($aParams['view_all']) && $aParams['view_all'] === true;
$this->_bPageReloader = isset($aParams['page_reloader']) && $aParams['page_reloader'] === true;
$this->_bPerPageChanger = isset($aParams['per_page_changer']) && $aParams['per_page_changer'] === true;
$this->_bPageLinks = !isset($aParams['page_links']) || isset($aParams['page_links']) && $aParams['page_links'] === true;
//--- Templates ---//
$sSpacerUrl = $this->getIconUrl('spacer.gif');
$this->_sButtonActiveTmpl = '<div class="paginate_btn" style="background-image:url(__btn_img_src__)"><a href="__lnk_url__" title="__lnk_title__" __lnk_on_click__><img src="' . $sSpacerUrl . '" alt="__img_title__" alt="__img_title__"/></a></div>';
$this->_sButtonInactiveTmpl = '<div class="paginate_btn notactive" style="background-image:url(__btn_img_src__)"><img src="' . $sSpacerUrl . '" alt="__img_title__" title="__img_title__" /></div>';
$this->_sLinkActiveTmpl = '<div class="not_active_page"><a href="__lnk_url__" title="__lnk_title__" __lnk_on_click__>__lnk_content__</a></div>';
$this->_sLinkInactiveTmpl = '<div class="active_page">__lnk_content__</div>';
$this->_sSortingTmpl = '__title__ <select __on_click__>__content__</select>';
}
示例8: BxDolPrivacyView
/**
* constructor
*/
function BxDolPrivacyView($iOwnerId)
{
parent::BxDolTemplate();
$this->_iOwnerId = (int) $iOwnerId;
$this->_oDb = new BxDolPrivacyQuery();
}