[ Index ] |
|
Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1 |
1 <?php 2 /** 3 * Common Template 4 * 5 * outputs the html header. i,e, everything that comes before the \</head\> tag <br /> 6 * 7 * @package templateSystem 8 * @copyright Copyright 2003-2006 Zen Cart Development Team 9 * @copyright Portions Copyright 2003 osCommerce 10 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 11 * @version $Id: html_header.php 4368 2006-09-03 19:31:00Z drbyte $ 12 */ 13 /** 14 * load the module for generating page meta-tags 15 */ 16 require(DIR_WS_MODULES . zen_get_module_directory('meta_tags.php')); 17 /** 18 * output main page HEAD tag and related headers/meta-tags, etc 19 */ 20 ?> 21 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 22 <html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>> 23 <head> 24 <title><?php echo META_TAG_TITLE; ?></title> 25 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" /> 26 <meta name="keywords" content="<?php echo META_TAG_KEYWORDS; ?>" /> 27 <meta name="description" content="<?php echo META_TAG_DESCRIPTION; ?>" /> 28 <meta http-equiv="imagetoolbar" content="no" /> 29 <meta name="author" content="The Zen Cart™ Team and others" /> 30 <meta name="generator" content="shopping cart program by Zen Cart™, http://www.zen-cart.com eCommerce" /> 31 <?php if (defined('ROBOTS_PAGES_TO_SKIP') && in_array($current_page_base,explode(",",constant('ROBOTS_PAGES_TO_SKIP'))) || $current_page_base=='down_for_maintenance') { ?> 32 <meta name="robots" content="noindex, nofollow" /> 33 <?php } ?> 34 <?php if (defined('FAVICON')) { ?> 35 <link rel="icon" href="<?php echo FAVICON; ?>" type="image/x-icon" /> 36 <link rel="shortcut icon" href="<?php echo FAVICON; ?>" type="image/x-icon" /> 37 <?php } //endif FAVICON ?> 38 39 <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ); ?>" /> 40 41 <?php 42 43 /** 44 * load all template-specific stylesheets, named like "style*.css", alphabetically 45 */ 46 $directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^style/', '.css'); 47 while(list ($key, $value) = each($directory_array)) { 48 echo '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . $value . '" />'."\n"; 49 } 50 /** 51 * load stylesheets on a per-page/per-language/per-product/per-manufacturer/per-category basis. Concept by Juxi Zoza. 52 */ 53 $manufacturers_id = (isset($_GET['manufacturers_id'])) ? $_GET['manufacturers_id'] : ''; 54 $tmp_products_id = (isset($_GET['products_id'])) ? (int)$_GET['products_id'] : ''; 55 $tmp_pagename = ($this_is_home_page) ? 'index_home' : $current_page_base; 56 $sheets_array = array('/' . $_SESSION['language'] . '_stylesheet', 57 '/' . $tmp_pagename, 58 '/' . $_SESSION['language'] . '_' . $tmp_pagename, 59 '/c_' . $cPath, 60 '/' . $_SESSION['language'] . '_c_' . $cPath, 61 '/m_' . $manufacturers_id, 62 '/' . $_SESSION['language'] . '_m_' . (int)$manufacturers_id, 63 '/p_' . $tmp_products_id, 64 '/' . $_SESSION['language'] . '_p_' . $tmp_products_id 65 ); 66 while(list ($key, $value) = each($sheets_array)) { 67 //echo "<!--looking for: $value-->\n"; 68 $perpagefile = $template->get_template_dir('.css', DIR_WS_TEMPLATE, $current_page_base, 'css') . $value . '.css'; 69 if (file_exists($perpagefile)) echo '<link rel="stylesheet" type="text/css" href="' . $perpagefile .'" />'."\n"; 70 } 71 72 /** 73 * load printer-friendly stylesheets -- named like "print*.css", alphabetically 74 */ 75 $directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^print/', '.css'); 76 sort($directory_array); 77 while(list ($key, $value) = each($directory_array)) { 78 echo '<link rel="stylesheet" type="text/css" media="print" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . $value . '" />'."\n"; 79 } 80 81 /** 82 * load all site-wide jscript_*.js files from includes/templates/YOURTEMPLATE/jscript, alphabetically 83 */ 84 $directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript'), '/^jscript_/', '.js'); 85 while(list ($key, $value) = each($directory_array)) { 86 echo '<script type="text/javascript" src="' . $template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/' . $value . '"></script>'."\n"; 87 } 88 89 /** 90 * load all page-specific jscript_*.js files from includes/modules/pages/PAGENAME, alphabetically 91 */ 92 $directory_array = $template->get_template_part($page_directory, '/^jscript_/', '.js'); 93 while(list ($key, $value) = each($directory_array)) { 94 echo '<script type="text/javascript" src="' . $page_directory . '/' . $value . '"></script>' . "\n"; 95 } 96 97 /** 98 * load all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically 99 */ 100 $directory_array = $template->get_template_part($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'jscript'), '/^jscript_/', '.php'); 101 while(list ($key, $value) = each($directory_array)) { 102 /** 103 * include content from all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically. 104 * These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page 105 */ 106 require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/' . $value); echo "\n"; 107 } 108 /** 109 * include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically. 110 */ 111 $directory_array = $template->get_template_part($page_directory, '/^jscript_/'); 112 while(list ($key, $value) = each($directory_array)) { 113 /** 114 * include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically. 115 * These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page 116 */ 117 require($page_directory . '/' . $value); echo "\n"; 118 } 119 120 //DEBUG: echo '<!-- I SEE cat: ' . $current_category_id . ' || vs cpath: ' . $cPath . ' || page: ' . $current_page . ' || template: ' . $current_template . ' || main = ' . ($this_is_home_page ? 'YES' : 'NO') . ' -->'; 121 ?> 122 </head> 123 <?php // NOTE: Blank line following is intended: ?> 124
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 |
![]() |