<?php 
if (!defined('IN_CONTEXT')) die('access violation error!');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- 页面头部【start】 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php _e('charset'); ?>" />
<meta name="keywords" content="<?php echo $_SITE->keywords; ?>" />
<meta name="description" content="<?php echo $_SITE->description; ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo P_TPL_WEB; ?>/css/style.css" />
<?php
if (SessionHolder::get('page/status', 'view') == 'edit') {
?>
<link rel="stylesheet" type="text/css" href="view/css/admin.css" />
<?php
}
include_once(P_INC.'/global_js.php');
// 放大镜
if ($_flat_module_class_name == 'mod_product') {
	Html::includeJs('/jqzoom.js');
?>
<link rel="stylesheet" type="text/css" href="<?php echo $script_path; ?>/jqzoom.css" />
<script language="javascript">
$(function(){
	$(".jqzoom").jqueryzoom({xzoom:300, yzoom:300});	
})
</script>
<?php } ?>
<title><?php echo $page_title; ?> -- <?php echo $_SITE->site_name; ?></title>
<?php 
//------------------首页页面加载特殊处理【start】--------------------
if($_flat_module_class_name == 'frontpage')
{
?>
<!-- 获取banner宽高【start】 -->
<script type="text/javascript">
$(document).ready(function(){
	$.ajax({
		   type: "POST",
		   url: "admin/SitestarMaker/server.php",
		   data: "id=getSize&banner_width="+$('#banner').css('width')+"&banner_height="+$('#banner').css('height')+"&logo_width="+$('#logo').css('width')+"&logo_height="+$('#logo').css('height')
		});
});
</script>
<!-- 获取banner宽高【end】 -->
<?php 
	//-----------------背景音乐【start】-------------------
	$o_bgmusic = new BackgroundMusic();
	$bgmusic_items = $o_bgmusic->findAll();
	$music_path = $bgmusic_items[0]->music_path;
	if($bgmusic_items[0]->play == 2) {
		echo "<bgsound src='$music_path' loop='-1'>";
	} elseif($bgmusic_items[0]->play == 1) {
		echo "<bgsound src='$music_path' loop='1'>";
	}
}
	//-----------------背景音乐【start】-------------------

//------------------首页页面加载特殊处理【end】----------------------
?>
</head>
<!-- 页面头部【end】 -->
<body>

<?php 
Html::adminBar(); 
if($_flat_module_class_name == 'frontpage'){
echo $wrap;//加载广告
}
?>