[ Index ] |
|
Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1 |
1 <?php 2 /** 3 * Common Template - tpl_main_page.php 4 * 5 * Governs the overall layout of an entire page<br /> 6 * Normally consisting of a header, left side column. center column. right side column and footer<br /> 7 * For customizing, this file can be copied to /templates/your_template_dir/pagename<br /> 8 * example: to override the privacy page<br /> 9 * - make a directory /templates/my_template/privacy<br /> 10 * - copy /templates/templates_defaults/common/tpl_main_page.php to /templates/my_template/privacy/tpl_main_page.php<br /> 11 * <br /> 12 * to override the global settings and turn off columns un-comment the lines below for the correct column to turn off<br /> 13 * to turn off the header and/or footer uncomment the lines below<br /> 14 * Note: header can be disabled in the tpl_header.php<br /> 15 * Note: footer can be disabled in the tpl_footer.php<br /> 16 * <br /> 17 * $flag_disable_header = true;<br /> 18 * $flag_disable_left = true;<br /> 19 * $flag_disable_right = true;<br /> 20 * $flag_disable_footer = true;<br /> 21 * <br /> 22 * // example to not display right column on main page when Always Show Categories is OFF<br /> 23 * <br /> 24 * if ($current_page_base == 'index' and $cPath == '') {<br /> 25 * $flag_disable_right = true;<br /> 26 * }<br /> 27 * <br /> 28 * example to not display right column on main page when Always Show Categories is ON and set to categories_id 3<br /> 29 * <br /> 30 * if ($current_page_base == 'index' and $cPath == '' or $cPath == '3') {<br /> 31 * $flag_disable_right = true;<br /> 32 * }<br /> 33 * 34 * @package templateSystem 35 * @copyright Copyright 2003-2006 Zen Cart Development Team 36 * @copyright Portions Copyright 2003 osCommerce 37 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 38 * @version $Id: tpl_main_page.php 6564 2007-07-05 20:35:51Z drbyte $ 39 */ 40 41 // the following IF statement can be duplicated/modified as needed to set additional flags 42 if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes_on_here,separated_by_commas,and_no_spaces')) ) { 43 $flag_disable_right = true; 44 } 45 46 47 $header_template = 'tpl_header.php'; 48 $footer_template = 'tpl_footer.php'; 49 $left_column_file = 'column_left.php'; 50 $right_column_file = 'column_right.php'; 51 $body_id = ($this_is_home_page) ? 'indexHome' : str_replace('_', '', $_GET['main_page']); 52 ?> 53 <body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>> 54 <?php 55 if (SHOW_BANNERS_GROUP_SET1 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET1)) { 56 if ($banner->RecordCount() > 0) { 57 ?> 58 <div id="bannerOne" class="banners"><?php echo zen_display_banner('static', $banner); ?></div> 59 <?php 60 } 61 } 62 ?> 63 64 <div id="mainWrapper"> 65 <?php 66 /** 67 * prepares and displays header output 68 * 69 */ 70 require($template->get_template_dir('tpl_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_header.php');?> 71 72 <table width="100%" border="0" cellspacing="0" cellpadding="0" id="contentMainWrapper"> 73 <tr> 74 <?php 75 if (COLUMN_LEFT_STATUS == 0 or (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '')) { 76 // global disable of column_left 77 $flag_disable_left = true; 78 } 79 if (!isset($flag_disable_left) || !$flag_disable_left) { 80 ?> 81 82 <td id="navColumnOne" class="columnLeft" style="width: <?php echo COLUMN_WIDTH_LEFT; ?>"> 83 <?php 84 /** 85 * prepares and displays left column sideboxes 86 * 87 */ 88 ?> 89 <div id="navColumnOneWrapper" style="width: <?php echo BOX_WIDTH_LEFT; ?>"><?php require(DIR_WS_MODULES . zen_get_module_directory('column_left.php')); ?></div></td> 90 <?php 91 } 92 ?> 93 <td valign="top"> 94 <!-- bof breadcrumb --> 95 <?php if (DEFINE_BREADCRUMB_STATUS == '1' || (DEFINE_BREADCRUMB_STATUS == '2' && !$this_is_home_page) ) { ?> 96 <div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div> 97 <?php } ?> 98 <!-- eof breadcrumb --> 99 100 <?php 101 if (SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) { 102 if ($banner->RecordCount() > 0) { 103 ?> 104 <div id="bannerThree" class="banners"><?php echo zen_display_banner('static', $banner); ?></div> 105 <?php 106 } 107 } 108 ?> 109 110 <!-- bof upload alerts --> 111 <?php if ($messageStack->size('upload') > 0) echo $messageStack->output('upload'); ?> 112 <!-- eof upload alerts --> 113 114 <?php 115 /** 116 * prepares and displays center column 117 * 118 */ 119 require($body_code); ?> 120 121 <?php 122 if (SHOW_BANNERS_GROUP_SET4 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET4)) { 123 if ($banner->RecordCount() > 0) { 124 ?> 125 <div id="bannerFour" class="banners"><?php echo zen_display_banner('static', $banner); ?></div> 126 <?php 127 } 128 } 129 ?></td> 130 131 <?php 132 if (COLUMN_RIGHT_STATUS == 0 or (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '')) { 133 // global disable of column_right 134 $flag_disable_right = true; 135 } 136 if (!isset($flag_disable_right) || !$flag_disable_right) { 137 ?> 138 <td id="navColumnTwo" class="columnRight" style="width: <?php echo COLUMN_WIDTH_RIGHT; ?>"> 139 <?php 140 /** 141 * prepares and displays right column sideboxes 142 * 143 */ 144 ?> 145 <div id="navColumnTwoWrapper" style="width: <?php echo BOX_WIDTH_RIGHT; ?>"><?php require(DIR_WS_MODULES . zen_get_module_directory('column_right.php')); ?></div></td> 146 <?php 147 } 148 ?> 149 </tr> 150 </table> 151 152 <?php 153 /** 154 * prepares and displays footer output 155 * 156 */ 157 require($template->get_template_dir('tpl_footer.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_footer.php');?> 158 </div> 159 <!--bof- parse time display --> 160 <?php 161 if (DISPLAY_PAGE_PARSE_TIME == 'true') { 162 ?> 163 <div class="smallText center">Parse Time: <?php echo $parse_time; ?> - Number of Queries: <?php echo $db->queryCount(); ?> - Query Time: <?php echo $db->queryTime(); ?></div> 164 <?php 165 } 166 ?> 167 <!--eof- parse time display --> 168 <!--bof- banner #6 display --> 169 <?php 170 if (SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) { 171 if ($banner->RecordCount() > 0) { 172 ?> 173 <div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div> 174 <?php 175 } 176 } 177 ?> 178 <!--eof- banner #6 display --> 179 </body>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 16:45:43 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |