zencart模板系统文件笔记1:html_header.php

更新时间:2023-05-25 15:58:39 阅读: 评论:0

zencart模板系统文件笔记1:html_header.php
(zencart建站vip内部交流俱乐部--体验)
文件名:html_header.php
文件隶属于:英文版zen-cart-v139h
文件路径:includes\templates\template_default\common/html_header.php
unemployed系统上隶属于:公共模板文件
主要功能:输出html页面的头部head标签的内容
云冈石窟简介主要包括:标题、meta信息[关键词、描述、...]、载入js、css等
<?php
/**
*Common Template
*
*outputs the html header.i,e,everything that comes before the\</head\>tag<br/>
*
*@package templateSystem
*@copyright Copyright2003-2010Zen Cart Development Team
*@copyright Portions Copyright2003osCommerce
*@licen /licen/ GNU Public Licen V2.0
*@version$Id:html_header.php157612010-03-3119:31:27Z drbyte$
*/
/**
*load the module for generating page meta-tags
*/
require(DIR__get_module_directory('meta_tags.php'));//调用meta_tags.php
/**
*output main page HEAD tag and related headers/meta-tags,etc
*/
?>
<!DOCTYPE html PUBLIC"-//W3C//DTD XHTML1.0Transitional//EN"
"/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="/1999/xhtml"<?php echo HTML_PARAMS;?>>
计算机专业英语<head>
<title><?php echo META_TAG_TITLE;?></title>//输出定义的标题
<meta http-equiv="Content-Type"content="text/html;chart=<?php echo CHARSET;?>"/>//编码定义<meta name="keywords"content="<?php echo META_TAG_KEYWORDS;?>"/>//关键词内容
<meta name="description"content="<?php echo META_TAG_DESCRIPTION;?>"/>//描述内容
<meta http-equiv="imagetoolbar"content="no"/>
<meta name="author"content="The Zen Cart™Team and others"/>
<meta name="generator"content="shopping cart program by Zen Cart™, eCommerce"/>
<?php if(defined('ROBOTS_PAGES_TO_SKIP')&&
in_array($current_page_ba,explode(",",constant('ROBOTS_PAGES_TO_SKIP')))||
$current_page_ba=='down_for_maintenance'||$robotsNoIndex===true){?>
<meta name="robots"content="noindex,nofollow"/>
<?php}?>//如定义ROBOTS_PAGES_TO_SKIP,页面维护检查,则noindex,nofollow
<?php if(defined('FA VICON')){?>
<link rel="icon"href="<?php echo FAVICON;?>"type="image/x-icon"/>
<link rel="shortcut icon"href="<?php echo FA VICON;?>"type="image/x-icon"/>
<?php}//endif FAVICON?>//快捷方式图标
<ba href="<?php echo(($request_type=='SSL')?HTTPS_SERVER.DIR_WS_HTTPS_CATALOG: HTTP_SERVER.DIR_WS_CATALOG);?>"/>
<?php if(ist($canonicalLink)&&$canonicalLink!=''){?>
<link rel="canonical"href="<?php echo$canonicalLink;?>"/>
<?php}?>
<?php
/**************************************************************************************** *载入css样式文件
delete
****************************************************************************************/ $directory_array=$template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_ba,'css'),'/^style/','.css');
while(list($key,$value)=each($directory_array)){
echo'<link rel="stylesheet"type="text/css"href="'.
$template->get_template_dir('.css',DIR_WS_TEMPLATE,$current_page_ba,'css').'/'.$value.'"/>'."\n"; }
/**
给特定页面载入特定样式文件内容
*/
$manufacturers_id=(ist($_GET['manufacturers_id']))?$_GET['manufacturers_id']:'';
$tmp_products_id=(ist($_GET['products_id']))?(int)$_GET['products_id']:'';
$tmp_pagename=($this_is_home_page)?'index_home':$current_page_ba;
if($current_page_ba=='page'&&ist($ezpage_id))$tmp_pagename=$current_page_ba.
(int)$ezpage_id;
$sheets_array=array('/'.$_SESSION['language'].'_stylesheet',dance in the dark
'/'.$tmp_pagename,
'/'.$_SESSION['language'].'_'.$tmp_pagename,
'/c_'.$cPath,
'/'.$_SESSION['language'].'_c_'.$cPath,
'/m_'.$manufacturers_id,
'/'.$_SESSION['language'].'_m_'.(int)$manufacturers_id,
'/p_'.$tmp_products_id,
'/'.$_SESSION['language'].'_p_'.$tmp_products_id
);
while(list($key,$value)=each($sheets_array)){
respective
//echo"<!--looking for:$value-->\n";
$perpagefile=$template->get_template_dir('.css',DIR_WS_TEMPLATE,$current_page_ba,'css'). $value.'.css';
if(file_exists($perpagefile))echo'<link rel="stylesheet"type="text/css"href="'.$perpagefile.'"/>'."\n"; }
/**
*载入打印css文件
awarding
*/
$directory_array=$template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_ba,'css'),'/^print/','.css');
sort($directory_array);
while(list($key,$value)=each($directory_array)){
echo'<link rel="stylesheet"type="text/css"media="print"href="'.
$template->get_template_dir('.css',DIR_WS_TEMPLATE,$current_page_ba,'css').'/'.$value.'"/>'."\n"; }
/**
*从你的模板上载入js文件
新东方外语
*/
$directory_array=$template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_ba,'jscript'),'/^jscript_/','.js');
while(list($key,$value)=each($directory_array)){
echo'<script type="text/javascript"src="'.$template->get_template_dir('.js',DIR_WS_TEMPLATE, $cur
rent_page_ba,'jscript').'/'.$value.'"></script>'."\n";
}
/**
**从你的模板上载入特定页面的js文件
*/
$directory_array=$template->get_template_part($page_directory,'/^jscript_/','.js');
while(list($key,$value)=each($directory_array)){
echo'<script type="text/javascript"src="'.$page_directory.'/'.$value.'"></script>'."\n";
}
/**
*load all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript,alphabetically
*/
$directory_array=$template->get_template_part($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_ba,'jscript'),'/^jscript_/','.php');
while(list($key,$value)=each($directory_array)){
/**
*include content from all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically.
*The.PHP files can be manipulated by PHP when they're called,and are copied in-full to the browr page
*/
require($template->get_template_dir('.php',DIR_WS_TEMPLATE,$current_page_ba,'jscript').'/'.$value); echo"\n";
}
/**
*include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically.
上海十大最乱学校*/
$directory_array=$template->get_template_part($page_directory,'/^jscript_/');
while(list($key,$value)=each($directory_array)){
/**
*include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically.
*The.PHP files can be manipulated by PHP when they're called,and are copied in-full to the browr page
*/
傲骨贤妻 第五季
require($page_directory.'/'.$value);echo"\n";
}
//DEBUG:echo'<!--I SEE cat:'.$current_category_id.'||vs cpath:'.$cPath.'||page:'.$current_page.'|| template:'.$current_template.'||main='.($this_is_home_page?'YES':'NO').'-->';
?>
</head>
<?php//NOTE:Blank line following is intended:?>
这是“外贸建站推广分享社区"zencart自主开发建站的系列免费体验教程,如你想自主建站,更深入地了解zencart建站仿站和定制,欢迎你加入我们的vip内部交流俱乐部.
《zencart模板系统文件笔记》是内部会员特权,只分享到第十篇
更多内容请:
©2012陈金凌-外贸建站推广分享社区.版权所有.
欢迎传阅,请勿修改版权信息,谢谢合作!

本文发布于:2023-05-25 15:58:39,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/90/122288.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:文件   页面   建站   载入
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图