示例#1
0
/*
    $Id$
    
    osCommerce, Open Source E-Commerce Solutions
    http://www.oscommerce.com
    
    Copyright (c) 2010 osCommerce
    
    Released under the GNU General Public License
*/
if ($messageStack->size('header') > 0) {
    echo '<div class="col-md-12">' . $messageStack->output('header') . '</div>';
}
/* We load the compiled template per ID */
global $oscTemplate, $cPath;
$OSCOM_BtsMenu = new bts_menu_view();
$OSCOM_BtsMenu->setMenuRootCategoryID($template_id);
$data = '<header class="yamm" id="header-area">' . $OSCOM_BtsMenu->getHeaderTree() . '</header>';
echo $data;
?>
<div class="clearfix"></div>

<?php 
if ($oscTemplate->hasBlocks('boxes_header')) {
    echo $oscTemplate->getBlocks('boxes_header');
}
?>

<div class="clearfix"></div>

<?php 
示例#2
0
<?php

require 'includes/application_top.php';
// No direct access to this file
if (!IS_AJAX) {
    die('Restricted access');
}
if (isset($_POST['action'])) {
    $action = tep_db_prepare_input($_POST['action']);
}
switch ($action) {
    case 'reset_header':
        global $oscTemplate, $cPath, $template_id, $css_id;
        $OSCOM_CSS = new bts_css_tree();
        $OSCOM_BtsMenu = new bts_menu_view();
        $OSCOM_BtsMenu->setMenuRootCategoryID($template_id);
        $OSCOM_CSS->setRootCategoryID($css_id);
        $css = $OSCOM_CSS->cssOutPutTree();
        $header_data = $OSCOM_BtsMenu->getHeaderTree();
        header('Content-Type: application/json');
        echo json_encode($css . '|' . $header_data);
        break;
}