function pageCode($aPage = array(), $aPageCont = array(), $aCss = array(), $aJs = array(), $bAdminMode = false, $isSubActions = true)
 {
     if (!empty($aPage)) {
         foreach ($aPage as $sKey => $sValue) {
             $GLOBALS['_page'][$sKey] = $sValue;
         }
     }
     if (!empty($aPageCont)) {
         foreach ($aPageCont as $sKey => $sValue) {
             $GLOBALS['_page_cont'][$aPage['name_index']][$sKey] = $sValue;
         }
     }
     if (!empty($aCss)) {
         $this->addCss($aCss);
     }
     if (!empty($aJs)) {
         $this->addJs($aJs);
     }
     if ($isSubActions) {
         $aVars = array('BaseUri' => $this->_oConfig->getBaseUri());
         $GLOBALS['oTopMenu']->setCustomSubActions($aVars, $this->_oConfig->getMainPrefix() . '_title', false);
     }
     if (!$bAdminMode) {
         PageCode($this);
     } else {
         PageCodeAdmin();
     }
 }
 function pageCodeAdmin($sTitle)
 {
     global $_page;
     global $_page_cont;
     $_page['name_index'] = 9;
     $_page['header'] = $sTitle ? $sTitle : $GLOBALS['site']['title'];
     $_page['header_text'] = $sTitle;
     $_page_cont[$_page['name_index']]['page_main_code'] = ob_get_clean();
     PageCodeAdmin();
 }
Example #3
0
function LoginFormAdmin()
{
    global $_page, $_page_cont, $oAdmTemplate;
    $sUrlRelocate = bx_get('relocate');
    if (empty($sUrlRelocate) || basename($sUrlRelocate) == 'index.php') {
        $sUrlRelocate = '';
    }
    $iNameIndex = 2;
    $_page = array('name_index' => $iNameIndex, 'css_name' => '', 'header' => _t('_adm_page_cpt_login'));
    $_page_cont[$iNameIndex]['page_main_code'] = $oAdmTemplate->parseHtmlByName('login.html', array('action_url' => $GLOBALS['site']['url_admin'] . 'index.php', 'relocate_url' => $sUrlRelocate));
    $oAdmTemplate->addCss('login.css');
    $oAdmTemplate->addJs('login.js');
    PageCodeAdmin();
}
Example #4
0
function LoginFormAdmin()
{
    global $_page, $_page_cont, $oAdmTemplate;
    $sUrlRelocate = bx_get('relocate');
    if (empty($sUrlRelocate) || basename($sUrlRelocate) == 'index.php') {
        $sUrlRelocate = '';
    }
    $iNameIndex = 2;
    $_page = array('name_index' => $iNameIndex, 'css_name' => '', 'header' => _t('_adm_page_cpt_login'));
    $bLicense = getParam('license_code') != '';
    $bFooter = getParam('enable_dolphin_footer') == 'on';
    $_page_cont[$iNameIndex]['page_main_code'] = $oAdmTemplate->parseHtmlByName('login.html', array('action_url' => $GLOBALS['site']['url_admin'] . 'index.php', 'relocate_url' => bx_html_attribute($sUrlRelocate), 'bx_if:show_unregistered' => array('condition' => $bFooter, 'content' => array())));
    $oAdmTemplate->addCss('login.css');
    $oAdmTemplate->addJs('login.js');
    PageCodeAdmin();
}
Example #5
0
 function pageCode($aPage = array(), $aPageCont = array(), $aCss = array(), $aJs = array(), $bAdminMode = false, $isSubActions = true)
 {
     if (!empty($aPage)) {
         foreach ($aPage as $sKey => $sValue) {
             $GLOBALS['_page'][$sKey] = $sValue;
         }
     }
     if (!empty($aPageCont)) {
         foreach ($aPageCont as $sKey => $sValue) {
             $GLOBALS['_page_cont'][$aPage['name_index']][$sKey] = $sValue;
         }
     }
     if (!empty($aCss)) {
         $this->addCss($aCss);
     }
     if (!empty($aJs)) {
         $this->addJs($aJs);
     }
     if (!$bAdminMode) {
         PageCode($this);
     } else {
         PageCodeAdmin();
     }
 }
Example #6
0
 function actionAdministration($sSubaction = '', $sID = 0)
 {
     global $_page, $_page_cont;
     require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
     $logged['admin'] = member_auth(1, true, true);
     $iUnitID = $sSubaction == 'edit' && (int) $sID > 0 ? (int) $sID : 0;
     $iUnitID = bx_get('action') == 'edit' && (int) bx_get('ID') > 0 ? (int) bx_get('ID') : $iUnitID;
     if (isset($_POST['quotes_list']) && is_array($_POST['quotes_list'])) {
         // manage subactions
         foreach ($_POST['quotes_list'] as $sQuoteId) {
             $iQuoteId = (int) $sQuoteId;
             switch (true) {
                 case isset($_POST['action_delete']):
                     $this->_oDb->deleteUnit($iQuoteId);
                     break;
             }
         }
     }
     $iNameIndex = 9;
     $_page = array('name_index' => $iNameIndex, 'css_name' => array(), 'js_name' => array(), 'header' => _t('_adm_page_cpt_quotes'), 'header_text' => _t('_adm_box_cpt_quotes'));
     $_page_cont[$iNameIndex]['page_main_code'] = $this->getPostForm($iUnitID);
     $_page_cont[$iNameIndex]['page_main_code'] .= $this->getQuotesList();
     PageCodeAdmin();
 }
Example #7
0
<?php

/**
 * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
 * CC-BY License - http://creativecommons.org/licenses/by/3.0/
 */
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
bx_import('Module', $aModule);
global $_page;
global $_page_cont;
$iIndex = 9;
$_page['name_index'] = $iIndex;
$_page['header'] = _t('_bx_pageac');
if (!@isAdmin()) {
    send_headers_page_changed();
    login_form("", 1);
    exit;
}
$oModule = new BxPageACModule($aModule);
$_page_cont[$iIndex]['page_main_code'] = $oModule->_oTemplate->getTabs();
PageCodeAdmin();
Example #8
0
 function getPageCodeAdmin(&$aParams)
 {
     global $_page;
     global $_page_cont;
     $iIndex = isset($aParams['index']) ? (int) $aParams['index'] : 9;
     $_page['name_index'] = $iIndex;
     $_page['js_name'] = isset($aParams['js']) ? $aParams['js'] : '';
     $_page['css_name'] = isset($aParams['css']) ? $aParams['css'] : '';
     $_page['header'] = isset($aParams['title']['page']) ? $aParams['title']['page'] : '';
     if (isset($aParams['content'])) {
         foreach ($aParams['content'] as $sKey => $sValue) {
             $_page_cont[$iIndex][$sKey] = $sValue;
         }
     }
     PageCodeAdmin();
 }
 function pageCodeAdmin($sTitle, $sType = '', $iUnitId = '', $sResult = '')
 {
     global $_page;
     global $_page_cont;
     $_page['name_index'] = 9;
     $_page['header'] = $sTitle ? $sTitle : $GLOBALS['site']['title'];
     $_page['header_text'] = $sTitle;
     $_page_cont[$_page['name_index']]['page_main_code'] = ($sResult ? MsgBox($sResult) : '') . $this->getAdminPage($sType, $iUnitId);
     PageCodeAdmin();
 }
 function BxDolPageViewAdmin($sDBTable, $sCacheFile)
 {
     $GLOBALS['oAdmTemplate']->addJsTranslation(array('_adm_pbuilder_Reset_page_warning', '_adm_pbuilder_Column_non_enough_width_warn', '_adm_pbuilder_Column_delete_confirmation', '_adm_pbuilder_Add_column', '_adm_pbuilder_Want_to_delete', '_delete'));
     $this->sDBTable = $sDBTable;
     $this->sCacheFile = $sCacheFile;
     // special actions (without creating page)
     if (isset($_REQUEST['action_sys'])) {
         switch ($_REQUEST['action_sys']) {
             case 'loadNewPageForm':
                 header('Content-Type: text/html; charset=utf-8');
                 echo $this->showNewPageForm();
                 break;
             case 'createNewPage':
                 header('Content-Type:text/javascript');
                 echo json_encode($this->createUserPage());
                 break;
         }
         exit;
     }
     $sPage = process_pass_data(isset($_REQUEST['Page']) ? trim(urldecode($_REQUEST['Page'])) : '');
     $this->getPages();
     if (strlen($sPage) && in_array($sPage, $this->aPages)) {
         $this->oPage = new BxDolPVAPage($sPage, $this);
     }
     $this->checkAjaxMode();
     if (!empty($_REQUEST['action']) && $this->oPage) {
         $this->sPage_db = addslashes($this->oPage->sName);
         switch ($_REQUEST['action']) {
             case 'load':
                 header('Content-type:text/javascript');
                 send_headers_page_changed();
                 echo $this->oPage->getJSON();
                 break;
             case 'saveColsWidths':
                 if (is_array($_POST['widths'])) {
                     $this->saveColsWidths($_POST['widths']);
                     $this->createCache();
                 }
                 break;
             case 'saveBlocks':
                 if (is_array($_POST['columns'])) {
                     $this->saveBlocks($_POST['columns']);
                     $this->createCache();
                 }
                 break;
             case 'loadEditForm':
                 $iBlockID = (int) $_POST['id'];
                 if ($iBlockID) {
                     header('Content-type:text/html;charset=utf-8');
                     echo $this->showPropForm($iBlockID);
                 }
                 break;
             case 'saveItem':
                 if ((int) $_POST['id']) {
                     $this->saveItem($_POST);
                     $this->createCache((int) $_POST['id']);
                 }
                 break;
             case 'deleteCustomPage':
                 header('Content-type:text/html;charset=utf-8');
                 $sPage = isset($_POST['Page']) ? $_POST['Page'] : '';
                 if (!$sPage) {
                     echo _t('_Error Occured');
                 } else {
                     //remove page from page builder
                     $this->deleteCustomPage($sPage);
                 }
                 break;
             case 'deleteBlock':
                 if ($iBlockID = (int) $_REQUEST['id']) {
                     $this->deleteBlock($iBlockID);
                     $this->createCache();
                 }
                 break;
             case 'checkNewBlock':
                 if ($iBlockID = (int) $_REQUEST['id']) {
                     $this->checkNewBlock($iBlockID);
                 }
                 break;
             case 'savePageWidth':
                 if ($sPageWidth = process_pass_data($_POST['width'])) {
                     $this->savePageWidth($sPageWidth);
                     $this->createCache();
                 }
                 break;
             case 'saveOtherPagesWidth':
                 if ($sWidth = $_REQUEST['width']) {
                     setParam('main_div_width', $sWidth);
                     echo 'OK';
                 }
                 break;
             case 'resetPage':
                 $this->resetPage();
                 $this->createCache();
                 break;
         }
     }
     if ($this->bAjaxMode) {
         exit;
     }
     $sMainPageContent = $this->showBuildZone();
     global $_page, $_page_cont;
     $iNameIndex = 0;
     $_page = array('name_index' => $iNameIndex, 'css_name' => array('pageBuilder.css', 'forms_adv.css'), 'js_name' => array('jquery.ui.core.min.js', 'jquery.ui.widget.min.js', 'jquery.ui.mouse.min.js', 'jquery.ui.sortable.min.js', 'jquery.ui.slider.min.js', 'jquery.cookie.min.js', 'BxDolPageBuilder.js'), 'header' => _t('_adm_pbuilder_title'), 'header_text' => _t('_adm_pbuilder_box_title'));
     $_page_cont[$iNameIndex]['page_main_code'] = $sMainPageContent;
     PageCodeAdmin();
 }