Пример #1
0
 protected function _action($sCache, $sMode = 'clear')
 {
     $sFuncCacheObject = $sMode == 'clear' ? '_clearObject' : '_getSizeObject';
     $sFuncCacheFile = $sMode == 'clear' ? '_clearFile' : '_getSizeFile';
     $mixedResult = false;
     switch ($sCache) {
         case 'db':
             if (getParam('sys_db_cache_enable') != 'on') {
                 break;
             }
             $oCacheDb = BxDolDb::getInstance()->getDbCacheObject();
             $mixedResult = $this->{$sFuncCacheObject}($oCacheDb, 'db_');
             break;
         case 'template':
             if (getParam('sys_template_cache_enable') != 'on') {
                 break;
             }
             $oCacheTemplates = BxDolTemplate::getInstance()->getTemplatesCacheObject();
             $mixedResult = $this->{$sFuncCacheObject}($oCacheTemplates, BxDolStudioTemplate::getInstance()->getCacheFilePrefix($sCache));
             break;
         case 'css':
             if (getParam('sys_template_cache_css_enable') != 'on') {
                 break;
             }
             $mixedResult = $this->{$sFuncCacheFile}(BxDolStudioTemplate::getInstance()->getCacheFilePrefix($sCache), BX_DIRECTORY_PATH_CACHE_PUBLIC);
             break;
         case 'js':
             if (getParam('sys_template_cache_js_enable') != 'on') {
                 break;
             }
             $mixedResult = $this->{$sFuncCacheFile}(BxDolStudioTemplate::getInstance()->getCacheFilePrefix($sCache), BX_DIRECTORY_PATH_CACHE_PUBLIC);
             break;
     }
     return $mixedResult;
 }
Пример #2
0
 public function serviceLoginForm($sParams = '', $sForceRelocate = '')
 {
     if (isLogged()) {
         return false;
     }
     // get all auth types
     $aAuthTypes = BxDolDb::getInstance()->fromCache('sys_objects_auths', 'getAll', 'SELECT * FROM `sys_objects_auths`');
     // define additional auth types
     if ($aAuthTypes) {
         $aAddInputEl[''] = _t('_Basic');
         // procces all additional menu's items
         foreach ($aAuthTypes as $iKey => $aItems) {
             $aAddInputEl[$aItems['Link']] = _t($aItems['Title']);
         }
         $aAuthTypes = array('type' => 'select', 'caption' => _t('_Auth type'), 'values' => $aAddInputEl, 'value' => '', 'attrs' => array('onchange' => 'if (this.value) { location.href = "' . BX_DOL_URL_ROOT . '" + this.value }'));
     } else {
         $aAuthTypes = array('type' => 'hidden');
     }
     $oForm = BxDolForm::getObjectInstance('sys_login', 'sys_login');
     $sCustomHtmlBefore = '';
     $sCustomHtmlAfter = '';
     bx_alert('profile', 'show_login_form', 0, 0, array('oForm' => $oForm, 'sParams' => &$sParams, 'sCustomHtmlBefore' => &$sCustomHtmlBefore, 'sCustomHtmlAfter' => &$sCustomHtmlAfter, 'aAuthTypes' => &$aAuthTypes));
     if ($sForceRelocate && 0 === mb_stripos($sForceRelocate, BX_DOL_URL_ROOT)) {
         $oForm->aInputs['relocate']['value'] = $sForceRelocate;
     } elseif ('homepage' == $sForceRelocate) {
         $oForm->aInputs['relocate']['value'] = BX_DOL_URL_ROOT;
     }
     $sFormCode = $oForm->getCode();
     $sJoinText = '';
     if (strpos($sParams, 'no_join_text') === false) {
         $sJoinText = '<hr class="bx-def-hr bx-def-margin-sec-topbottom" /><div>' . _t('_sys_txt_login_description', BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=create-account')) . '</div>';
     }
     BxDolTemplate::getInstance()->addJs(array('jquery.form.min.js'));
     return $sCustomHtmlBefore . $sFormCode . $sCustomHtmlAfter . $sJoinText;
 }
Пример #3
0
 public function serviceLoginForm($sParams = '', $sForceRelocate = '')
 {
     if (isLogged()) {
         return false;
     }
     // get all auth types
     $aAuthTypes = BxDolDb::getInstance()->fromCache('sys_objects_auths', 'getAll', 'SELECT * FROM `sys_objects_auths`');
     $oForm = BxDolForm::getObjectInstance('sys_login', 'sys_login');
     $sCustomHtmlBefore = '';
     $sCustomHtmlAfter = '';
     bx_alert('profile', 'show_login_form', 0, 0, array('oForm' => $oForm, 'sParams' => &$sParams, 'sCustomHtmlBefore' => &$sCustomHtmlBefore, 'sCustomHtmlAfter' => &$sCustomHtmlAfter, 'aAuthTypes' => &$aAuthTypes));
     if ($sForceRelocate && 0 === mb_stripos($sForceRelocate, BX_DOL_URL_ROOT)) {
         $oForm->aInputs['relocate']['value'] = $sForceRelocate;
     } elseif ('homepage' == $sForceRelocate) {
         $oForm->aInputs['relocate']['value'] = BX_DOL_URL_ROOT;
     }
     $sFormCode = $oForm->getCode();
     $sJoinText = '';
     if (strpos($sParams, 'no_join_text') === false) {
         $sJoinText = '<hr class="bx-def-hr bx-def-margin-sec-topbottom" /><div class="bx-def-font-align-center">' . _t('_sys_txt_login_description', BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=create-account')) . '</div>';
     }
     BxDolTemplate::getInstance()->addJs(array('jquery.form.min.js'));
     $sAuth = $this->serviceMemberAuthCode($aAuthTypes);
     return $sCustomHtmlBefore . $sAuth . $sFormCode . $sCustomHtmlAfter . $sJoinText;
 }
Пример #4
0
function bx_storage_download_error_occured($sMethod = 'displayPageNotFound')
{
    require_once BX_DIRECTORY_PATH_INC . "design.inc.php";
    bx_import('BxDolLanguages');
    bx_import('BxDolTemplate');
    $oTemplate = BxDolTemplate::getInstance();
    $oTemplate->{$sMethod}();
}
Пример #5
0
 public function __construct($aInfo, $oTemplate = false)
 {
     $this->MODULE = 'bx_convos';
     parent::__construct($aInfo, $oTemplate);
     $oTemplate = BxDolTemplate::getInstance();
     $oTemplate->addJs(array('jquery-ui/jquery-ui.custom.min.js', 'jquery.form.min.js'));
     $oTemplate->addJsTranslation(array('_bx_cnv_draft_saving_error', '_bx_cnv_draft_saved_success'));
 }
Пример #6
0
 public function init($aParams = array())
 {
     $aParams = array_merge(array('sActionsUrl' => BX_DOL_URL_ROOT . 'live_updates.php', 'sObjName' => $this->_sJsObject, 'iInterval' => $this->_iInterval, 'aSystemsActive' => $this->_aSystemsActive, 'bServerRequesting' => !empty($this->_aSystems)), $aParams);
     $sContent = "var " . $this->_sJsObject . " = new " . $this->_sJsClass . "(" . json_encode($aParams) . ");";
     $oTemplate = BxDolTemplate::getInstance();
     $oTemplate->addJs(array('BxDolLiveUpdates.js'));
     return $oTemplate->_wrapInTagJsCode($sContent);
 }
Пример #7
0
 protected function __construct($oTemplate)
 {
     if (isset($GLOBALS['bxDolClasses'][get_class($this)])) {
         trigger_error('Multiple instances are not allowed for the class: ' . get_class($this), E_USER_ERROR);
     }
     parent::__construct();
     $this->_oTemplate = $oTemplate ? $oTemplate : BxDolTemplate::getInstance();
 }
Пример #8
0
 public function __construct($aOptions, $oTemplate)
 {
     parent::__construct($aOptions);
     if ($oTemplate) {
         $this->_oTemplate = $oTemplate;
     } else {
         $this->_oTemplate = BxDolTemplate::getInstance();
     }
 }
Пример #9
0
 function getPage($sPageCaption, $sPageContent)
 {
     $oTemplate = BxDolTemplate::getInstance();
     $oTemplate->setPageNameIndex(BX_PAGE_DEFAULT);
     if ($sPageCaption) {
         $oTemplate->setPageTitle($sPageCaption);
     }
     $oTemplate->setPageContent('page_main_code', $sPageContent);
     $oTemplate->getPageCode();
 }
Пример #10
0
function getPageMainCode()
{
    $oTemplate = BxDolTemplate::getInstance();
    $bEnabled = getParam('sys_site_cover_enabled');
    if (!$bEnabled) {
        $oTemplate->displayPageNotFound();
    }
    $oTemplate->addJs(array('skrollr/skrollr.min.js'));
    return $oTemplate->parseHtmlByContent(getParam('sys_site_cover_code'), array('join_link' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=create-account'), 'login_form' => BxDolService::call('system', 'login_form', array(), 'TemplServiceLogin')));
}
Пример #11
0
 public function __construct($aObject, $oTemplate)
 {
     parent::__construct($aObject);
     if ($oTemplate) {
         $this->_oTemplate = $oTemplate;
     } else {
         $this->_oTemplate = BxDolTemplate::getInstance();
     }
     $this->_sKeyPublic = getParam('sys_recaptcha_key_public');
     $this->_sKeyPrivate = getParam('sys_recaptcha_key_private');
 }
Пример #12
0
 function __construct()
 {
     parent::__construct();
     bx_import('BxDolTemplate');
     $sCode = BxDolTemplate::getInstance()->getCode();
     $sStaticImages = BX_DOL_URL_ROOT . 'templates/tmpl_' . $sCode . '/images/';
     bx_import('BxDolConfig');
     $oSysConfig = BxDolConfig::getInstance();
     $oSysConfig->set('url_static', 'images', $sStaticImages);
     $oSysConfig->set('url_static', 'icons', $sStaticImages . 'icons/');
     $oSysConfig->set('path_static', 'css', BX_DIRECTORY_PATH_ROOT . 'templates/tmpl_' . $sCode . '/css/');
 }
Пример #13
0
 function __construct()
 {
     parent::__construct();
     $this->_aConfig['aLessConfig'] = array_merge($this->_aConfig['aLessConfig'], array('bx-font-family' => '"Source Sans Pro", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif', 'bx-color-page' => '#b9e2f6', 'bx-color-block' => '#fff', 'bx-color-box' => '#daf8ff', 'bx-color-sec' => '#fff', 'bx-color-hl' => 'rgba(202, 242, 252, 0.2)', 'bx-color-active' => 'rgba(202, 242, 252, 0.4)', 'bx-border-color' => '#00a0ce'));
     bx_import('BxDolTemplate');
     $sCode = BxDolTemplate::getInstance()->getCode();
     $sStaticImages = BX_DOL_URL_ROOT . 'templates/tmpl_' . $sCode . '/images/';
     bx_import('BxDolConfig');
     $oSysConfig = BxDolConfig::getInstance();
     $oSysConfig->set('url_static', 'images', $sStaticImages);
     $oSysConfig->set('url_static', 'icons', $sStaticImages . 'icons/');
     $oSysConfig->set('path_static', 'css', BX_DIRECTORY_PATH_ROOT . 'templates/tmpl_' . $sCode . '/css/');
 }
Пример #14
0
 /**
  * create units for all classes and calling their processing methods
  */
 public function response()
 {
     bx_import('BxDolTemplate');
     $sCode = '';
     foreach ($this->aChoice as $sKey => $aValue) {
         if (!class_exists($aValue['class'])) {
             $sClassPath = str_replace('{tmpl}', BxDolTemplate::getInstance()->getCode(), $aValue['file']);
             require_once BX_DIRECTORY_PATH_ROOT . $sClassPath;
         }
         $oEx = new $aValue['class']();
         $oEx->setId($aValue['id']);
         $oEx->setLiveSearch($this->_bLiveSearch);
         $sCode .= $oEx->processing();
     }
     return $sCode;
 }
Пример #15
0
 function displayMsg($s, $bTranslate = false)
 {
     $sTitle = $bTranslate ? _t($s) : $s;
     $oTemplate = BxDolTemplate::getInstance();
     $oTemplate->setPageNameIndex(BX_PAGE_DEFAULT);
     $oTemplate->setPageHeader($sTitle);
     $oTemplate->setPageContent('page_main_code', DesignBoxContent($sTitle, MsgBox($sTitle), BX_DB_PADDING_DEF));
     $oTemplate->getPageCode();
     exit;
 }
Пример #16
0
 /**
  * Perform email confirmation
  */
 public function confirmEmail($sKey)
 {
     // check if key exists
     $oKey = BxDolKey::getInstance();
     if (!$oKey || !$oKey->isKeyExists($sKey)) {
         return MsgBox(_t("_sys_txt_confirm_email_error_occured"));
     }
     // check if key data exists
     $aData = $oKey->getKeyData($sKey);
     if (!isset($aData['account_id'])) {
         return MsgBox(_t("_sys_txt_confirm_email_error_occured"));
     }
     // check if account exists
     $oAccount = BxDolAccount::getInstance($aData['account_id']);
     if (!$oAccount) {
         return MsgBox(_t("_sys_txt_confirm_email_error_occured"));
     }
     // remove key
     $oKey->removeKey($sKey);
     // confirm email
     if (!$oAccount->updateEmailConfirmed(true)) {
         return MsgBox(_t("_sys_txt_confirm_email_error_occured"));
     }
     // login to user's account automatically
     bx_login($aData['account_id']);
     // redirect with success message
     $oTemplate = BxDolTemplate::getInstance();
     $oTemplate->setPageNameIndex(BX_PAGE_TRANSITION);
     $oTemplate->setPageHeader(_t('_sys_txt_confirm_email_success'));
     $oTemplate->setPageContent('page_main_code', MsgBox(_t('_sys_txt_confirm_email_success')));
     $oTemplate->setPageContent('url_relocate', BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=account-settings-info'));
     BxDolTemplate::getInstance()->getPageCode();
     exit;
 }
Пример #17
0
 /**
  * Add keywords meta info to the head section
  * @param $iId content id
  */
 protected function locationsAddMeta($iId)
 {
     $aLocation = $this->locationGet($iId);
     if (!empty($aLocation['lat']) && !empty($aLocation['lng']) && !empty($aLocation['country'])) {
         BxDolTemplate::getInstance()->addPageMetaLocation($aLocation['lat'], $aLocation['lng'], $aLocation['country']);
     }
 }
Пример #18
0
 public function __construct($aChoice, $oTemplate)
 {
     parent::__construct($aChoice);
     $this->_oTemplate = $oTemplate ? $oTemplate : BxDolTemplate::getInstance();
 }
Пример #19
0
 /**
  * Constructor
  * $sSystem - comments system name
  * $iId - obect id to be commented
  */
 function __construct($sSystem, $iId, $iInit = true, $oTemplate = false)
 {
     parent::__construct();
     $this->_aSystems = $this->getSystems();
     if (!isset($this->_aSystems[$sSystem])) {
         return;
     }
     $this->_sSystem = $sSystem;
     $this->_aSystem = $this->_aSystems[$sSystem];
     $this->_aSystem['table_images'] = 'sys_cmts_images';
     $this->_aSystem['table_images2entries'] = 'sys_cmts_images2entries';
     $this->_aSystem['table_ids'] = 'sys_cmts_ids';
     $this->_aSystem['is_browse_filter'] = (int) $this->_bBrowseFilter;
     $this->_iDpMaxLevel = (int) $this->_aSystem['number_of_levels'];
     $this->_sDisplayType = $this->_iDpMaxLevel == 0 ? BX_CMT_DISPLAY_FLAT : BX_CMT_DISPLAY_THREADED;
     $this->_sDpSessionKey = 'bx_' . $this->_sSystem . '_dp_';
     $this->_sBrowseType = $this->_aSystem['browse_type'];
     $this->_sBrowseFilter = BX_CMT_FILTER_ALL;
     $this->_sBpSessionKeyType = 'bx_' . $this->_sSystem . '_bpt_';
     $this->_sBpSessionKeyFilter = 'bx_' . $this->_sSystem . '_bpf_';
     $this->_aOrder = array('by' => BX_CMT_ORDER_BY_DATE, 'way' => BX_CMT_ORDER_WAY_ASC);
     list($mixedUserDp, $mixedUserBpType, $mixedUserBpFilter) = $this->_getUserChoice();
     if (!empty($mixedUserDp)) {
         $this->_sDisplayType = $mixedUserDp;
     }
     if (!empty($mixedUserBpType)) {
         $this->_sBrowseType = $mixedUserBpType;
     }
     if (!empty($mixedUserBpFilter)) {
         $this->_sBrowseFilter = $mixedUserBpFilter;
     }
     $this->_sViewUrl = BX_DOL_URL_ROOT . 'cmts.php';
     $this->_sBaseUrl = BxDolPermalinks::getInstance()->permalink($this->_aSystem['base_url']);
     if (get_mb_substr($this->_sBaseUrl, 0, 4) != 'http') {
         $this->_sBaseUrl = BX_DOL_URL_ROOT . $this->_sBaseUrl;
     }
     $this->_sListAnchor = "cmts-anchor-%s-%d";
     $this->_oQuery = new BxDolCmtsQuery($this);
     $this->_sFormObject = 'sys_comment';
     $this->_sFormDisplayPost = 'sys_comment_post';
     $this->_sFormDisplayEdit = 'sys_comment_edit';
     $this->_sConnObjFriends = 'sys_profiles_friends';
     $this->_sConnObjSubscriptions = 'sys_profiles_subscriptions';
     $this->_sMenuObjManage = 'sys_cmts_item_manage';
     $this->_sMenuObjActions = 'sys_cmts_item_actions';
     $this->_sMetatagsObj = 'sys_cmts';
     if ($iInit) {
         $this->init($iId);
     }
     if ($oTemplate) {
         $this->_oTemplate = $oTemplate;
     } else {
         $this->_oTemplate = BxDolTemplate::getInstance();
     }
 }
Пример #20
0
<?php

/**
 * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
 * CC-BY License - http://creativecommons.org/licenses/by/3.0/
 *
 * @defgroup    DolphinCore Dolphin Core
 * @{
 */
require_once './inc/header.inc.php';
$sObject = bx_process_input(bx_get('object'));
$mixedId = bx_process_input(bx_get('id'));
$iUserId = bx_process_input(bx_get('member'), BX_DATA_INT);
bx_import('BxDolRss');
$oRss = BxDolRss::getObjectInstance($sObject);
if ($oRss && ($s = $oRss->getFeed($mixedId, $iUserId))) {
    header('Content-type: text/xml; charset=utf-8');
    echo $s;
} else {
    bx_import('BxDolLanguages');
    bx_import('BxDolTemplate');
    BxDolTemplate::getInstance()->displayPageNotFound();
}
/** @} */
Пример #21
0
 protected function _getVotedBy()
 {
     $aTmplUsers = array();
     $aUserIds = $this->_oQuery->getVotedBy($this->getId());
     foreach ($aUserIds as $iUserId) {
         list($sUserName, $sUserUrl, $sUserIcon, $sUserUnit) = $this->_getAuthorInfo($iUserId);
         $aTmplUsers[] = array('style_prefix' => $this->_sStylePrefix, 'user_unit' => $sUserUnit);
     }
     if (empty($aTmplUsers)) {
         $aTmplUsers = MsgBox(_t('_Empty'));
     }
     return BxDolTemplate::getInstance()->parseHtmlByName('vote_by_list.html', array('style_prefix' => $this->_sStylePrefix, 'bx_repeat:list' => $aTmplUsers));
 }
Пример #22
0
 /**
  * If video isn't processed yet then empty string is returned for video, or predefined image is returned for video poster
  */
 public function getFileUrlNotReady($mixedHandler)
 {
     return false === $this->getFilterParams('Poster') ? '' : BxDolTemplate::getInstance()->getImageUrl('video-na.png');
 }
Пример #23
0
 *
 * @defgroup    TridentCore Samples
 * @{
 */
/**
 * @page samples
 * @section comments Comments
 */
/**
 * Please refer to the following file for custom class and SQL dump data for this example:
 * @see BxCmtsMy.php
 */
$aPathInfo = pathinfo(__FILE__);
require_once $aPathInfo['dirname'] . '/../inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . "design.inc.php";
$oTemplate = BxDolTemplate::getInstance();
$oTemplate->setPageNameIndex(BX_PAGE_DEFAULT);
$oTemplate->setPageHeader('Comments');
$oTemplate->setPageContent('page_main_code', PageCompMainCode());
$oTemplate->getPageCode();
/**
 * page code function
 */
function PageCompMainCode()
{
    $iObjectId = 1;
    bx_import('BxDolCmts');
    $oCmts = BxDolCmts::getObjectInstance('sample', $iObjectId);
    if (!$oCmts->isEnabled()) {
        return '';
    }
Пример #24
0
 public function addCssJs()
 {
     $oTemplate = BxDolTemplate::getInstance();
     $oTemplate->addCss('metatags.css');
 }
Пример #25
0
 /**
  * Display convos in folder
  */
 public function actionFolder($iFolderId)
 {
     $oTemplate = BxDolTemplate::getInstance();
     $aFolder = $this->_oDb->getFolder((int) $iFolderId);
     $oPage = BxDolPage::getObjectInstance('bx_convos_home');
     if (!$aFolder || !$oPage) {
         $this->_oTemplate->displayPageNotFound();
         exit;
     }
     // add replaceable markers
     $oPage->addMarkers(array('folder_id' => (int) $iFolderId, 'folder' => _t($aFolder['name'])));
     $s = $oPage->getCode();
     $this->_oTemplate = BxDolTemplate::getInstance();
     $this->_oTemplate->setPageNameIndex(BX_PAGE_DEFAULT);
     $this->_oTemplate->setPageContent('page_main_code', $s);
     $this->_oTemplate->getPageCode();
 }
Пример #26
0
 function parseContent($sContent, $aKeys, $iAccountId = 0, $iProfileId = 0)
 {
     $aResultKeys = $this->aDefaultKeys;
     if ($iAccountId) {
         bx_import('BxDolAccount');
         $oAccount = BxDolAccount::getInstance($iAccountId);
         if ($oAccount && ($aAccountInfo = $oAccount->getInfo())) {
             $aResultKeys = array_merge($aResultKeys, array('account_id' => $aAccountInfo['id'], 'account_name' => $aAccountInfo['name'], 'account_email' => $aAccountInfo['email']));
         }
     }
     if ($iProfileId) {
         bx_import('BxDolProfile');
         $oProfile = BxDolProfile::getInstance($iProfileId);
         if ($oProfile && ($aProfileInfo = $oProfile->getInfo())) {
             $aResultKeys = array_merge($aResultKeys, array('profile_name' => $oProfile->getDisplayName(), 'profile_url' => $oProfile->getUrl(), 'profile_thumb' => $oProfile->getThumb(), 'profile_icon' => $oProfile->getIcon(), 'profile_id' => $aProfileInfo['id'], 'profile_status' => $aProfileInfo['status'], 'profile_type' => $aProfileInfo['type'], 'profile_content_id' => $aProfileInfo['content_id']));
         }
     }
     if (is_array($aKeys)) {
         $aResultKeys = array_merge($aResultKeys, $aKeys);
     }
     bx_import('BxDolTemplate');
     return BxDolTemplate::getInstance()->parseHtmlByContent($sContent, $aResultKeys, array('{', '}'));
 }
Пример #27
0
 /**
  * Constructor
  */
 public function __construct($aParams, $oTemplate = null)
 {
     parent::__construct();
     if ($oTemplate) {
         $this->_oTemplate = $oTemplate;
     } else {
         $this->_oTemplate = BxDolTemplate::getInstance();
     }
     if (isset($aParams['count'])) {
         trigger_error('Paginate "count" is deprecated - use "num" instead: ' . get_class($this), E_USER_ERROR);
     }
     //--- Main settings ---//
     $this->_iStart = isset($aParams['start']) && (int) $aParams['start'] > 0 ? (int) $aParams['start'] : 0;
     $this->_iNum = isset($aParams['num']) ? (int) $aParams['num'] : 0;
     $this->_iPerPage = isset($aParams['per_page']) && (int) $aParams['per_page'] > 0 ? (int) $aParams['per_page'] : BX_DOL_PAGINATE_PER_PAGE_DEFAULT;
     $this->_bInfo = isset($aParams['info']) ? (bool) $aParams['info'] : true;
     $this->_sButtonsClass = isset($aParams['buttons_class']) ? $aParams['buttons_class'] : '';
     $this->_sViewAllUrl = isset($aParams['view_all_url']) ? $aParams['view_all_url'] : false;
     $this->_sViewAllCaption = isset($aParams['view_all_caption']) ? $aParams['view_all_caption'] : _t('_sys_paginate_view_all');
     $this->_sPaginateClass = isset($aParams['paginate_class']) ? $aParams['paginate_class'] : '';
     // page url
     $this->_sPageUrl = isset($aParams['page_url']) ? $aParams['page_url'] : BX_DOL_URL_ROOT;
     // on click (js mode)
     $this->_sOnChangePage = isset($aParams['on_change_page']) ? $aParams['on_change_page'] : '';
 }
Пример #28
0
/**
 * Display login form and exit
 * @param $bStudio display login form for studio
 * @param $bAjaxMode login form displayed via AJAX
 */
function bx_login_form($bStudio = false, $bAjaxMode = false)
{
    if ($bStudio == 1) {
        bx_import("BxTemplStudioFunctions");
        BxTemplStudioFunctions::getInstance()->getLoginForm();
        exit;
    }
    $sFormCode = BxDolService::call('system', 'login_form', array(), 'TemplServiceLogin');
    if ($bAjaxMode) {
        echo $GLOBALS['oFunctions']->transBox('', $sFormCode, false, true);
        exit;
    }
    BxDolTemplate::getInstance()->setPageNameIndex(BX_PAGE_DEFAULT);
    BxDolTemplate::getInstance()->setPageHeader(getParam('site_title') . ' ' . _t("_Member Login"));
    BxDolTemplate::getInstance()->setPageContent('page_main_code', DesignBoxContent(_t("_Member Login"), $sFormCode, BX_DB_PADDING_DEF));
    BxDolTemplate::getInstance()->getPageCode();
    exit;
}
Пример #29
0
 function addJsTranslation($mixedKey)
 {
     BxDolTemplate::getInstance()->addJsTranslation($mixedKey);
 }
Пример #30
0
 protected static function _error($sType, $sParam1 = '', $sParam2 = '')
 {
     header('Status: 404 Not Found');
     header('HTTP/1.0 404 Not Found');
     require_once BX_DIRECTORY_PATH_INC . "design.inc.php";
     bx_import('BxDolTemplate');
     bx_import('BxDolLanguages');
     $oTemplate = BxDolTemplate::getInstance();
     $oTemplate->setPageNameIndex(BX_PAGE_DEFAULT);
     $oTemplate->setPageHeader(_t("_sys_request_" . $sType . "_not_found_cpt"));
     $oTemplate->setPageContent('page_main_code', DesignBoxContent('', MsgBox(_t("_sys_request_" . $sType . "_not_found_cnt", bx_process_output($sParam1), bx_process_output($sParam2))), BX_DB_PADDING_NO_CAPTION));
     $oTemplate->getPageCode();
     exit;
 }