<?php  /* Template Name:公共头部 */  ?>
<!DOCTYPE html>
<html lang="<?php  echo $lang['lang_bcp47'];  ?>">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
	<meta http-equiv="Content-Language" content="<?php  echo $language;  ?>">
	<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
<?php if ($type=='article') { ?>
	<title><?php  echo $title;  ?>_<?php  echo $article->Category->Name;  ?>_<?php  echo $name;  ?></title>
	<meta name="keywords" content="<?php  foreach ( $article->Tags as $tag) { ?><?php  echo $tag->Name;  ?>,<?php }   ?>">
<?php $description = preg_replace('/[\r\n\s]+/', ' ', trim(SubStrUTF8(TransferHTML($article->Content,'[nohtml]'),100)).'...'); ?>
	<meta name="description" content="<?php  echo $description;  ?>">
<?php }elseif($type=='page') {  ?>
	<title><?php  echo $title;  ?>_<?php  echo $name;  ?></title>
	<meta name="keywords" content="<?php  echo $title;  ?>,<?php  echo $name;  ?>">
<?php $description = preg_replace('/[\r\n\s]+/', ' ', trim(SubStrUTF8(TransferHTML($article->Content,'[nohtml]'),100)).'...'); ?>
	<meta name="description" content="<?php  echo $description;  ?>"/>
	<meta name="author" content="<?php  echo $article->Author->StaticName;  ?>">
<?php }elseif($type=='index') {  ?>
	<title><?php  echo $name;  ?><?php if ($page>'1') { ?>_第<?php  echo $pagebar->PageNow;  ?>页<?php } ?>_<?php  echo $subname;  ?></title>
	<meta name="Keywords" content="<?php  echo $zbp->Config('SiteNav')->SiteNav_keywords;  ?>">
	<meta name="description" content="<?php  echo $zbp->Config('SiteNav')->SiteNav_description;  ?>">
<?php }elseif($type=='category') {  ?>
	<title><?php  echo $title;  ?>_<?php  echo $name;  ?></title>
	<meta name="Keywords" content="<?php  echo $title;  ?>,<?php  echo $name;  ?>">
	<meta name="description" content="<?php  echo $category->Intro;  ?>">
<?php }else{  ?>
	<title><?php  echo $title;  ?>_<?php  echo $name;  ?></title>
	<meta name="Keywords" content="<?php  echo $zbp->Config('SiteNav')->SiteNav_keywords;  ?>">
	<meta content="always" name="referrer">
	<meta name="description" content="<?php  echo $zbp->Config('SiteNav')->SiteNav_description;  ?>">
<?php } ?>
	<link rel="stylesheet" rev="stylesheet" href="<?php  echo $host;  ?>zb_users/theme/<?php  echo $theme;  ?>/style/<?php  echo $style;  ?>.css?v=3.0" type="text/css">
	<link rel="stylesheet" href="<?php  echo $host;  ?>zb_users/theme/<?php  echo $theme;  ?>/font-css/font-awesome.min.css?v=4.7" type="text/css">
	<script src="<?php  echo $host;  ?>zb_system/script/jquery-1.8.3.min.js" type="text/javascript"></script>
	<script src="<?php  echo $host;  ?>zb_system/script/zblogphp.js" type="text/javascript"></script>
	<script src="<?php  echo $host;  ?>zb_system/script/c_html_js_add.php" type="text/javascript"></script>
<?php  echo $header;  ?>
<?php if ($type=='index'&&$page=='1') { ?>
	<link rel="alternate" type="application/rss+xml" href="<?php  echo $feedurl;  ?>" title="<?php  echo $name;  ?>">
<?php } ?>
	<style type="text/css">
	<body>{background:<?php  echo $zbp->Config('SiteNav')->SiteNav_bodybgcolor;  ?>}
	.ascbg,#top-box .serch-box .btns button.ascbg,.fixside>ul>li>a:hover,.pager a:hover,.pager>span{background:<?php  echo $zbp->Config('SiteNav')->SiteNav_mcolor;  ?>;}
	.pager a:hover,.pager>span{border-color:<?php  echo $zbp->Config('SiteNav')->SiteNav_mcolor;  ?>;}
	#top-box,#footer,.list-box .item li.cu a,.fixside li a{background:<?php  echo $zbp->Config('SiteNav')->SiteNav_menubgcolor;  ?>}
	.list-box .item li.cu div{border-color:<?php  echo $zbp->Config('SiteNav')->SiteNav_menubgcolor;  ?>;}
	.list-box .item li,.relist-box li{width:<?php if ($zbp->Config('SiteNav')->SiteNav_cmswnum=='2') { ?>50%<?php }elseif($zbp->Config('SiteNav')->SiteNav_cmswnum=='3') {  ?>33.333333%<?php }elseif($zbp->Config('SiteNav')->SiteNav_cmswnum=='4') {  ?>25%<?php }elseif($zbp->Config('SiteNav')->SiteNav_cmswnum=='5') {  ?>20%<?php }else{  ?>16.66666667%<?php } ?>;}
	<?php  echo $zbp->Config('SiteNav')->SiteNav_style;  ?>
	</style>
</head>
<body style="background-image : url('http://p1.qhimg.com/bdr/__85/t01db3ced6d33ca83b0.jpg');background-repeat: repeat-y;background-position: top center;background-attachment: fixed;background-size:100%;background-attachment:fixed;margin:auto;">
    <div id="top-box">
    	
    	
    	
    	
    	
        <div class="header wrap clearfix">
            <div class="logo"><a href="<?php  echo $host;  ?>" title="<?php  echo $name;  ?>"><img src="<?php if ($zbp->Config('SiteNav')->SiteNav_mlogo && $zbp->Config('SiteNav')->SiteNav_mlogo!="") { ?><?php  echo $zbp->Config('SiteNav')->SiteNav_mlogo;  ?><?php }else{  ?><?php  echo $host;  ?>zb_users/theme/<?php  echo $theme;  ?>/images/logo.png<?php } ?>" /></a></div>
<?php if ($zbp->Config('SiteNav')->SiteNav_topmidset!='3') { ?>
	<?php if ($zbp->Config('SiteNav')->SiteNav_topmidset=='1') { ?>
            <div class="serch-box">
                <div class="btns">
                    <button type="button" data-url="<?php  echo $host;  ?>search.php?q=" class="ascbg">本站</button>
                    <button type="button" data-url="https://www.baidu.com/s?tn=<?php SiteNav_skey(0); ?>&wd=">百度</button>
                    <button type="button" data-url="https://www.so.com/s?ls=<?php SiteNav_skey(1); ?>&q=">360</button>
                    <button type="button" data-url="https://cn.bing.com/search?from=<?php SiteNav_skey(2); ?>&q=">必应</button>
                    <button type="button" data-url="https://www.sogou.com/sogou?pid=<?php SiteNav_skey(3); ?>&query=">搜狗</button>
                    <button type="button" data-url="http://ai.taobao.com/search/index.htm?pid=<?php SiteNav_skey(4); ?>&key=">淘宝</button>
                </div>
                <input type="text" placeholder="无搜不江湖..." id="serchwd" baiduSug="2" class="sint"><input type="button" value="搜 索" class="sbtn ascbg">
            </div>
	<?php }else{  ?>
			<div class="serch-box mbanner">
				<?php  echo $zbp->Config('SiteNav')->SiteNav_itopbanner;  ?>
			</div>
	<?php } ?>
<?php } ?>
            <div class="header_rt">
                <div class="rtdiy"><?php  echo $zbp->Config('SiteNav')->SiteNav_rtlinks;  ?></div>
                <div class="ftip"><?php if ($zbp->Config('SiteNav')->SiteNav_rtdata!='0') { ?><span id="sitenav_from"></span><span id="j_date"></span><?php } ?></div>
<?php if ($zbp->Config('SiteNav')->SiteNav_scorllset!='3') { ?>
                <div class="htt">
                	<div class="ico"><i class="fa fa-info-circle"></i></div>
	                <ul>
	<?php if ($zbp->Config('SiteNav')->SiteNav_scorllset=='1') { ?>
        <?php  $array = explode(',',$zbp->Config('SiteNav')->SiteNav_scorllaid);  ?>
        <?php  foreach ( $array as $topnews) { ?>
	        <?php  $tpna=GetPost((int)$topnews);  ?>
	        <?php  $aurl=SiteNav_xyascii($tpna->Metas->alink);  ?>
						<li><a href="<?php  echo $tpna->Url;  ?>" title="<?php  echo $tpna->Title;  ?>"<?php if ($tpna->Metas->alink!="" && $tpna->Metas->djump!=1) { ?> onclick="javascript:SN_Go(String.fromCharCode(<?php  echo $aurl;  ?>))"<?php } ?> target="_blank"><?php  echo $tpna->Title;  ?></a></li>
		<?php }   ?>
	<?php }else{  ?>
		<?php  foreach ( GetList(6,$zbp->Config('SiteNav')->SiteNav_scorllcid) as $topnews) { ?>
			<?php  $aurl=SiteNav_xyascii($topnews->Metas->alink);  ?>
						<li><a href="<?php  echo $topnews->Url;  ?>" title="<?php  echo $topnews->Title;  ?>"<?php if ($topnews->Metas->alink!="" && $topnews->Metas->djump!=1) { ?>  onclick="javascript:SN_Go(String.fromCharCode(<?php  echo $aurl;  ?>))"<?php } ?> target="_blank"><?php  echo $topnews->Title;  ?></a></li>
		<?php }   ?>
	<?php } ?>
	                </ul>
                </div>
<?php } ?>
            </div>
            <div class="main-nav">
				<ul>
					<?php  if(isset($modules['navbar'])){echo $modules['navbar']->Content;}  ?>
				</ul>
            </div>
		    <?php if ($zbp->Config('SiteNav')->SiteNav_navico!="") { ?>
		    <span class="sn_navico"><?php  echo $zbp->Config('SiteNav')->SiteNav_navico;  ?></span>
		    <?php } ?>
        </div>
    </div>