zoukankan      html  css  js  c++  java
  • zencart 掉炸天的tpl_main_page.php

    <?php

    /**

     * Common Template - tpl_main_page.php

     *

     * @version $Id: tpl_main_page.php 7085 2007-09-22 04:56:31Z ajeh $

     */

    // the following IF statement can be duplicated/modified as needed to set additional flags

      if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes_on_here,separated_by_commas,and_no_spaces')) ) {

        $flag_disable_right = true;

      }

      $header_template = 'tpl_header.php';

      $footer_template = 'tpl_footer.php';

      $left_column_file = 'column_left.php';

      $right_column_file = 'column_right.php';

      $body_id = ($this_is_home_page) ? 'indexHome' : str_replace('_', '', $_GET['main_page']);

    ?>

    <body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>><div class="rebaseWrap">

      <?php

     /**

      * prepares and displays header output

      *

      */

      if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_HEADER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) {

        $flag_disable_header = true;

      }

      require($template->get_template_dir('tpl_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_header.php');?> 

      <div id="content"><div id="mainWrapper">

      <?php

      if (SHOW_BANNERS_GROUP_SET1 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET1)) {

        if ($banner->RecordCount() > 0) {

    ?>

    <div id="bannerOne" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>

    <?php

        }

      }

    ?>

        <!-- bof  breadcrumb -->

        <?php if (DEFINE_BREADCRUMB_STATUS == '1' || (DEFINE_BREADCRUMB_STATUS == '2' && !$this_is_home_page) ) { ?>

        <div id="navBreadCrumb">

          <ul><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?><br class="clearBoth" /></ul>

        </div>

        <?php } ?>

        <!-- eof breadcrumb -->

        <div class="content_main">

          <div id="contentMainWrapper">

            <div>

              <?php

    if (COLUMN_LEFT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_LEFT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == ''))) {

      // global disable of column_left

      $flag_disable_left = true;

    }

    $display_pages=array("shopping_cart","login","create_account","no_account","checkout","checkout_confirmation","checkout_success","account","account_history","account_history_info","account_edit","address_book","address_book_process","account_password","account_newsletters","wishlist","wishlist_email","wishlist_find","wishlists","wishlist_edit","wishlist_move","checkout_shipping_address","checkout_payment_address");

    if(in_array($current_page_base,$display_pages)){

    $flag_disable_left = true;

    }

    if (!isset($flag_disable_left) || !$flag_disable_left) {

    ?>

              <div id="navColumnOne" class="columnLeft fl" style=" <?php echo COLUMN_WIDTH_LEFT; ?>"><?php

     /**

      * prepares and displays left column sideboxes

      *

      */

    ?>

                <div id="navColumnOneWrapper" style=" <?php echo BOX_WIDTH_LEFT; ?>">

                  <?php

    $display_pages=array("about_us","privacy","faq","size_chart","site_map","shippinginfo","conditions","contact_us","discount_coupon","unsubscribe");

    $column_box_default='tpl_box_default_left.php';

    $column_width= '195px';

    if(in_array($current_page_base,$display_pages)){

         //这里加载边框逻辑,为了具有可控性,可能需要更多的逻辑

      require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/categories_css.php');

      require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/information.php');

    }

    else if($this_is_home_page||$current_page_base=="product_info")

    {

     switch($current_page_base){

      case $this_is_home_page://对首页进行帅选判断

      require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/live_help.php');

      require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/categories_css.php');//好屌

      require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/recently_sold.php');

      require(DIR_WS_MODULES . 'sideboxes/banner_box_all.php');

      require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/news_scroller.php');

      break;

      case "product_info"://对产品页的性侵害

         require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/categories_css.php');

         //require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/best_sellers.php');

      //require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/featured.php');

         require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/recently_sold.php');

      break;

      default:

               require(DIR_WS_MODULES . zen_get_module_directory('column_left.php'));

      }

     }

     else

     {

      require(DIR_WS_MODULES . zen_get_module_directory('column_left.php'));

      }

    //require(DIR_WS_MODULES . zen_get_module_directory('column_left.php'));

    ?>

                </div></div>

              <?php

    }

    ?>

              <div class="secCenter clearfix"><?php if ($messageStack->size('upload') > 0) echo $messageStack->output('upload'); ?>

                <?php

     /**

      * prepares and displays center column

      *

      */

     require($body_code); ?></div>

              <?php

    //if (COLUMN_RIGHT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_RIGHT_OFF == 'true' && $_SESSION['customers_authorization'] != 0)) {

    if (COLUMN_RIGHT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_RIGHT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == ''))) {

      // global disable of column_right

      $flag_disable_right = true;

    }

    if (!isset($flag_disable_right) || !$flag_disable_right) {

    ?>

              <div id="navColumnTwo" class="columnRight" style=" <?php echo COLUMN_WIDTH_RIGHT; ?>"><?php

     /**

      * prepares and displays right column sideboxes

      *

      */

    ?>

                <div id="navColumnTwoWrapper" style=" <?php echo BOX_WIDTH_RIGHT; ?>">

                  <?php require(DIR_WS_MODULES . zen_get_module_directory('column_right.php')); ?>

                </div></div>

              <?php

    }

    ?>

            </div>

          </div>

        </div>

      </div>

    <br class="clearBoth" /></div>

      <?php

     /**

      * prepares and displays footer output

      *

      */

      if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_FOOTER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) {

        $flag_disable_footer = true;

      }

      require($template->get_template_dir('tpl_footer.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_footer.php');

    ?>

    </div>

    <?php

      if (DISPLAY_PAGE_PARSE_TIME == 'true') {

    ?>

    <div class="smallText center">Parse Time: <?php echo $parse_time; ?> - Number of Queries: <?php echo $db->queryCount(); ?> - Query Time: <?php echo $db->queryTime(); ?></div>

    <?php

      }

    ?>

    </div>

    </body>

  • 相关阅读:
    Flash 教程
    版面在简洁模式下去今日贴.主题贴.发贴总数的方法 Dvbbs
    Get Certificate of website by Firefox
    OpenSSL 命令说明
    Python 字符串操作(string替换、删除、截取、复制、连接、比较、查找、包含、大小写转换、分割等)
    Python 字符串操作(截取/替换/查找/分割)
    男子英文名释义
    AD 端口相关
    How do I obtain a Digital Certificate from my Certificate Authority (CA)?
    C,C++,java,python对比
  • 原文地址:https://www.cnblogs.com/alex-13/p/3399511.html
Copyright © 2011-2022 走看看