<!--<?php
!$webPageTitle && $webPageTitle = $db_bbsname;
$metaVersion = $wind_version;
$wind_repair && $metaVersion .= '(' . $wind_repair . ')';
if ($GLOBALS['page']>1) {
$tmpMetaPage = (int)$GLOBALS['page'];
$webPageTitle .= ' - 第'.$tmpMetaPage.'页';
$metaDescription = '第 '.$tmpMetaPage.'页 - '.$metaDescription;
}
print <<<EOT
--><!doctype html>
<html>
<head>
<meta charset="$db_charset" />
<title>$webPageTitle - Powered by phpwind</title>
<meta name="generator" content="phpwind v{$metaVersion}" />
<meta name="description" content="$metaDescription" />
<meta name="keywords" content="$metaKeywords" />
<base id="headbase" href="$db_bbsurl/" />
<link rel="stylesheet" href="$imgpath/pw_core.css?{$GLOBALS['wind_repair']}" />
<!--
EOT;
@include Pcv($css_path);
if($pwModeCss){print <<<EOT
--><link rel="stylesheet" href="$pwModeCss" />
<!--
EOT;
}if(($db_shiftstyle == 1 && $_COOKIE['widthCfg'] == 1) || $db_shiftstyle == 2){print <<<EOT
-->
<link id="fullscreenStyle" rel="stylesheet" href="$imgpath/fullscreen.css?{$GLOBALS['wind_repair']}" />
<!--
EOT;
}
SCR == 'post' && require PrintEot('post_css');
SCR == 'read' && require PrintEot('read_css');
print <<<EOT
-->
<link rel="icon" href="favicon.ico?v=3" type="image/x-icon" />
<script type="text/javascript" src="js/core/core.js"></script>
<script type="text/javascript" src="js/pw_ajax.js"></script>
<script>
var imgpath = '$imgpath';
var verifyhash = '$verifyhash';
var modeimg = '$pwModeImg';
var modeBase = '$baseUrl';
var winduid = '$winduid';
var windid	= '$windid';
var groupid	= '$groupid';
var basename = '$basename';
var temp_basename = '$temp_basename';
var db_shiftstyle = '$db_shiftstyle';
var pw_baseurl = "$db_bbsurl";
function shiftStyle(){
	if(db_shiftstyle == 1){
		if (getObj('widthCfg').innerHTML=='切换到宽版') {
			if(!getObj('fullscreenStyle')) {
					var l = document.createElement('link');
					l.id="fullscreenStyle";
					l.rel="stylesheet";
					l.type="text/css";
					l.href="$imgpath/fullscreen.css";
					l.media="all";
					document.body.appendChild(l);
			}else {
				getObj('fullscreenStyle').disabled = false;
			}
			getObj('widthCfg').innerHTML='切换到窄版';
			var widthCfg = 1;
		} else {
			var widthCfg = 0;
			getObj('fullscreenStyle').disabled=true;
			getObj('widthCfg').innerHTML='切换到宽版';
		}
		SetCookie('widthCfg',widthCfg);
		if(typeof goTop!="undefined"){
			goTop.setStyle();
		}
		if(typeof messagetip!="undefined"&&typeof messagetip.db!="undefined"){
			messagetip.setStyle();
			messagetip.update();
		}
	}
};
</script>
<!--[if IE 9 ]>
<meta name="msapplication-task" content="name=网站首页; action-uri=$db_bbsurl; icon-uri=favicon.ico" />
<meta name="msapplication-task" content="name=个人中心; action-uri=u.php; icon-uri=images/ico/home.ico" />
<meta name="msapplication-task" content="name=我的帖子; action-uri=apps.php?q=article; icon-uri=images/ico/post.ico" />
<meta name="msapplication-task" content="name=消息中心; action-uri=message.php; icon-uri=images/ico/mail.ico" />
<meta name="msapplication-task" content="name=我的设置; action-uri=profile.php; icon-uri=images/ico/edit.ico" />
<![endif]-->
<link rel='archives' title="$db_bbsname" href="simple/" />
<!--
EOT;
if($fid){print <<<EOT
--><link rel="alternate" type="application/rss+xml" title="RSS" href="$db_bbsurl/rss.php?fid=$fid" />
<!--
EOT;
}print <<<EOT
-->
<!--
EOT;
if(SCR == 'read' && $link_ref_canonical){print <<<EOT
--><link rel="canonical" href="$link_ref_canonical" />
<!--
EOT;
}print <<<EOT
-->
</head>
<body>
<!--
EOT;
$tmpMsgNum = 0;
($winddb['newpm']>0 && $_G['maxmsg']>=0) && $tmpMsgNum += $winddb['newpm'];
$winddb['newnotice']>0 && $tmpMsgNum += $winddb['newnotice'];
$winddb['newrequest']>0 && $tmpMsgNum += $winddb['newrequest'];
$tmpMsgNums = $tmpMsgNum > 0 ? '('.$tmpMsgNum.')' : '';

$hasNewMessage = $winddb['newpm'] || $winddb['newreferto'] || $winddb['newnotice'] || $winddb['newrequest'] || $winddb['newfans'];
if($winduid && $hasNewMessage && (!GetCookie('clearm_'.$winduid) || GetCookie('clearm_'.$winduid) < $tmpMsgNum)){print <<<EOT
-->
<div id="pw_all_tip" style="display:none;" data-msg='[{"num":{$winddb['newpm']},"name":"站内信","url":"message.php?type=sms"},{"num":{$winddb['newreferto']},"name":"提到我","url":"apps.php?q=weibo&do=refer"},{"num":{$winddb['newnotice']},"name":"新通知","url":"message.php?type=notice"},{"num":{$winddb['newfans']},"name":"新关注","url":"u.php?a=friend&type=attentioned"},{"num":{$winddb['newrequest']},"name":"新请求","url":"message.php?type=request"}]'>
<table><tr><td>
<div class="pw_all_tip">
	<a href="javascript:void(0)" class="adel" id="pw_all_tclose" data-num="{$tmpMsgNum}">关闭</a>
<!--
EOT;
	if($winddb['newpm']){print <<<EOT
-->
	<p>{$winddb['newpm']}条新站内信，<a href="message.php?type=sms">查看站内信</a></p>
<!--
EOT;
}if($winddb['newreferto']){print <<<EOT
-->
	<p>{$winddb['newreferto']}条信息提到我，<a href="apps.php?q=weibo&do=refer">查看@我</a></p>
<!--
EOT;
}if($winddb['newnotice']){print <<<EOT
-->
	<p>{$winddb['newnotice']}个新通知，<a href="message.php?type=notice">查看新通知</a></p>
<!--
EOT;
}if($winddb['newfans']){print <<<EOT
-->
	<p>{$winddb['newfans']}个新关注，<a href="u.php?a=friend&type=attentioned">查看新关注</a></p>
<!--
EOT;
}if($winddb['newrequest']){print <<<EOT
-->
	<p>{$winddb['newrequest']}个新请求，<a href="message.php?type=request">查看新请求</a></p>
<!--
EOT;
}print <<<EOT
-->
</div></td></tr></table></div>
<!--
EOT;
}
print <<<EOT
-->
$msgsound
<div id="top">
	<div class="top cc">
<!--
EOT;
if ($skincount >1){print <<<EOT
--><a href="javascript:;" id="td_skin" class="fr" style="width:28px;overflow:hidden;"><img src="$imgpath/pwicon/style.gif" class="fr" style="margin:4px 5px 0 0;" alt="论坛风格切换" /></a><!--
EOT;
}print<<<EOT
--><!--
EOT;
if ($db_shiftstyle == 1) {
if($_COOKIE['widthCfg'] == 1){print <<<EOT
--><a id="widthCfg" class="fr" href="javascript:shiftStyle();">切换到窄版</a><!--
EOT;
} else {print <<<EOT
--><a id="widthCfg" class="fr" href="javascript:shiftStyle();">切换到宽版</a>	<!--
EOT;
}}print<<<EOT
-->
<!--
EOT;
if ($_Navbar['head_left']) {
print <<<EOT
-->
    	<ul>
<!--
EOT;
if($db_columns && $db_mode == 'bbs'){
if(GetCookie('columns')==1 || strpos($pwServer['HTTP_REFERER'],$db_bbsurl)===false || strpos($pwServer['HTTP_REFERER'],$db_adminfile)!==false){
print <<<EOT
-->
            <li><a href="columns.php?action=columns">左右分栏</a></li>
<!--
EOT;
}else{print <<<EOT
-->
            <li><a href="columns.php">平板模式</a></li>
<!--
EOT;
}}

foreach($_Navbar['head_left'] as $key => $value){
	$html = buildNavLinkHtml($value['data']);
print <<<EOT
-->
            <li>$html</li>
<!--
EOT;
	if (is_array($value['subs'])) {
		$db_menuinit .= ",'nav_key_up_$key' : 'nav_key_sub_$key'"; //register
print <<<EOT
-->
			<div style="display: none;" class="pw_menu" id="nav_key_sub_{$key}">
			<ul class="menuList">
<!--
EOT;
		foreach ($value['subs'] as $value) {
			$html = buildNavLinkHtml($value);
print <<<EOT
-->
				<li>$html</li>
<!--
EOT;
		}
print <<<EOT
-->
			</ul>
			</div>
<!--
EOT;
		}
	}
print <<<EOT
-->
        </ul>
<!--
EOT;
}
print <<<EOT
-->
	</div>
</div>
<!--
EOT;
list($htmlAdvert,$arrayAdvert) = pwAdvert('Site.Header',$fid);
if($htmlAdvert){print <<<EOT
-->
<div class="tac" style="line-height:1;">$htmlAdvert</div>
<!--
EOT;
}print <<<EOT
-->
<div class="wrap">
<div id="header">
     <div id="head" class="cc">
        <a href="$db_bbsurl/"><img src="$imgpath/$stylepath/logo.png" class="fl" title="$db_bbsname" /></a>
<!--
EOT;
require PrintEot('header_login');
print <<<EOT
-->
    </div>
<!--
EOT;
print <<<EOT
-->
	<div class="nav_wrap">
		<div id="navA">
			<div class="navAL fl">&nbsp;</div>
        	<div class="navAR fr">&nbsp;</div>
			<div class="navA">
<!--
EOT;
if ($winduid) {
$db_menuinit .= ",'td_mymenu' : 'menu_mymenu'";
print <<<EOT
-->
				<div id="td_mymenu">快捷通道</div>
				<div id="menu_mymenu" style="display:none;">
				<div id="fast_menu" class="pw_menu">
					<ul class="menuList cc">
						<li><a href="apps.php?q=article"><img src="u/images/icon/posts.png" alt="帖子" />帖子</a></li>
						<li><a href="apps.php?q=medal"><img src="u/images/icon/medal.png" alt="勋章" />勋章</a></li>
						<li><a href="u.php?a=friend"><img src="u/images/icon/friend.png" alt="关注" />关注</a></li>
						<li><a href="jobcenter.php"><img src="u/images/icon/jobcenter.png" alt="任务" />任务</a></li>
<!--
EOT;
if ($db_kmd_ifkmd) {print <<<EOT
-->
						<li><a href="apps.php?q=kmd&a=help"><img src="u/images/icon/kmd.png" alt="孔明灯" />孔明灯</a></li>
<!--
EOT;
}print <<<EOT
-->
					</ul>
				</div>
				</div>
<!--
EOT;
} else {print <<<EOT
-->
				<div id="td_mymenu" style="cursor:pointer" onClick="read.open('menu_mymenu_old','td_mymenu',3);">快捷通道</div>
				<div id="menu_mymenu_old" class="popout" style="display:none;"><table border="0" cellspacing="0" cellpadding="0"><tbody><tr><td class="bgcorner1"></td><td class="pobg1"></td><td class="bgcorner2"></td></tr><tr><td class="pobg4"></td><td><div class="popoutContent">
						<div style="width:250px;">
									<div class="p10">
										<a href="javascript:;" onClick="read.close();" class="adel">关闭</a>
											您还没有登录，快捷通道只有在登录后才能使用。
<!--
EOT;
if ($db_ajax & 16) {print <<<EOT
-->
				<a onClick="showLoginDiv();return false;" href="login.php#breadCrumb" class="s4" rel="nofollow">立即登录</a>
<!--
EOT;
}else{print <<<EOT
-->
				<a href="login.php#breadCrumb" class="s4" rel="nofollow">立即登录</a>
<!--
EOT;
}print <<<EOT
-->
											<div class="divHr mb10"></div>
											还没有帐号？ 赶紧 <a href="$regurl" class="s4" rel="nofollow">注册一个</a>
									</div>
						 </div>
				</div></td><td class="pobg2"></td></tr><tr><td class="bgcorner4"></td><td class="pobg3"></td><td class="bgcorner3"></td></tr></tbody></table></div>
<!--
EOT;
}print <<<EOT
-->
				<ul class="cc">
<!--
EOT;
foreach ($_Navbar['main'] as $key => $value) {
	if ($key == 'html') continue;
	$currentClass = '';
	if ($value['data']['iscurrent']) {
		$currentClass = ' class="current"';
		$currentMainNavKey = $key;
	}
	$html = buildNavLinkHtml($value['data']);
	$crossEvent = $verticalEvent = $currentEvent = '';

	if (!$value['data']['iscurrent'] && 'cross' == $value['data']['floattype'] && $value['subs']) {
		$crossEvent = " onmouseover=\"ctrlSubMenu('nav_key_up_$key', 'nav_key_sub_$key');\"";
	}
	if (!$value['data']['iscurrent'] && 'vertical' == $value['data']['floattype'] && $value['subs']) {
		$verticalEvent = " onmouseover=\"tmpHideAllCross('nav_key_sub_$key',false);\"";
		$db_menuinit .= ",'nav_key_up_$key' : 'nav_key_sub_$key'";
	}
	if ($value['data']['iscurrent']) {
		$currentEvent = " onmouseover=\"tmpHideAllCross('nav_key_sub_$key',false);\"";
	}
print <<<EOT
-->
					<li{$currentClass}{$crossEvent}{$verticalEvent}{$currentEvent}>$html</li>
<!--
EOT;
}
print <<<EOT
-->

				</ul>
			</div>
        </div>
<!--
EOT;
if($ifHaveSubs){
$navBStyle = empty($_Navbar['main'][$currentMainNavKey]['subs']) ? 'style="display:none"' : '';
print <<<EOT
-->
				<div id="navB" $navBStyle class="pr">
<!--
EOT;
$showEmptyNav = true;
foreach ($_Navbar['main'] as $key => $value) {
	if ($key == 'html') continue;
	$subs = $value['subs'];
	$nav = $value['data'];
	if ($subs) {

		if ($nav['iscurrent']) {
			$showEmptyNav = false;
			$menuListClass = 'align' == $nav['selflisttype'] ? 'menuListB' : 'menuListC';
print <<<EOT
-->
			<div class="navB">
				<div class="navBbg">
                <ul class="$menuListClass cc">
<!--
EOT;
			foreach ($subs as $value) {
				$html = buildNavLinkHtml($value);
print <<<EOT
-->
                    <li>$html</li>
<!--
EOT;
			}
print <<<EOT
-->
                </ul>
				</div>
            </div>
<!--
EOT;
		} elseif ('cross' == $nav['floattype']) {
			//$db_menuinit .= ",'nav_key_up_$key' : 'nav_key_sub_$key'"; //register
			$menuListClass = 'space' == $nav['listtype'] ? 'menuListC' : 'menuListB';
print <<<EOT
-->
        	<div id="nav_key_sub_$key" class="navB" style="position:absolute; width:100%; top:0px; z-index:11; display:none;">
				<div class="navBbg">
                <ul class="$menuListClass cc">
<!--
EOT;
			foreach ($subs as $value) {
				$html = buildNavLinkHtml($value);
print <<<EOT
-->
                    <li>$html</li>
<!--
EOT;
			}
print <<<EOT
-->
                </ul>
				</div>
            </div>
<!--
EOT;
		} elseif ('vertical' == $nav['floattype']) {
			//$db_menuinit .= ",'nav_key_up_$key' : 'nav_key_sub_$key'"; //register
			$appendClass = 'twocol' == $nav['listtype'] ? 'menuHalf cc' : '';
			$width = 'twocol' == $nav['listtype'] ? '18' : '9';
print <<<EOT
-->
        	<div id="nav_key_sub_$key" style="display:none;">
				<div class="pw_menu" style="overflow:hidden;">
                <ul class="menuList $appendClass" style="width:{$width}em;">
<!--
EOT;
			foreach ($subs as $value) {
				$html = buildNavLinkHtml($value);
print <<<EOT
-->
                    <li>$html</li>
<!--
EOT;
			}
print <<<EOT
-->
                </ul>
				</div>
            </div>
<!--
EOT;
		}

	}
}
print <<<EOT
-->

		</div>
<!--
EOT;
}
print <<<EOT
-->
     </div>
<script>
var timeoutSpecifyId = {};
var navBStyle = '$navBStyle';

function tmpClose(elementId) {
    timeoutSpecifyId[elementId] = setTimeout(function() {
        getObj(elementId).style.display = 'none';
    }, 100);
}
function tmpHideAllCross(currentSubMenuId,showNavB) {
	if(!getObj('navB')) return;
	if (showNavB) {
		getObj('navB').style.display = '';
	}
    var elements = getElementsByClassName('navB', getObj('navB'));
    if(elements.length){
        for (var i=0,len = elements.length; i<len; i++) {
            if (elements[i].id != '' && elements[i].id != currentSubMenuId) elements[i].style.display = 'none';
        }
    }
}

function ctrlSubMenu(parentId, subMenuId) {
    try {
		clearTimeout(timeoutSpecifyId[subMenuId]);

		tmpHideAllCross(subMenuId,true);
		getObj(subMenuId).style.display = '';

		getObj(parentId).onmouseout = function() {
			tmpClose(subMenuId);
			 timeoutSpecifyId[parentId] = setTimeout(function() {
				if (navBStyle) {
					getObj('navB').style.display = 'none';
				}
			}, 100);
			getObj(parentId).onmouseout = '';
		};
		getObj(subMenuId).onmouseout = function() {
			tmpClose(subMenuId);
			if (navBStyle) {
				getObj('navB').style.display = 'none';
			}
		};
		getObj(subMenuId).onmouseover = function() {
			clearTimeout(timeoutSpecifyId[subMenuId]);
			clearTimeout(timeoutSpecifyId[parentId]);
			getObj(subMenuId).style.display = '';
			getObj('navB').style.display = '';
		};
	}catch(e){}
}
</script>
    <div id="searchA">
    	<div class="searchA_right fr">&nbsp;</div>
        <div class="searchA cc">
<!--
EOT;
/* platform weibo app --start */
$weiboSiteBindInfoService = L::loadClass('WeiboSiteBindInfoService', 'sns/weibotoplatform/service'); /* @var $weiboSiteBindInfoService PW_WeiboSiteBindInfoService */
$accounts = $weiboSiteBindInfoService->getOfficalAccounts();
if ($accounts) {
print <<<EOT
-->
<style type="text/css">
.weibos{height:22px;overflow:hidden;padding-left:10px; float:right;*width:250px;}
.weibos iframe{float:right;}
</style>
	<span class="weibos">
<!--
EOT;
	foreach ($accounts as $key => $account) {
print <<<EOT
-->
		$account[followButton]
<!--
EOT;
	}
print <<<EOT
-->
	</span>
<!--
EOT;
}
/* platform weibo app --end */
print <<<EOT
-->
<script>
var ins_method = 'AND';
var ins_sch_area = '1';
var ins_time = 'all';
var ins_fid = '$fid';
</script>
        	<form action="searcher.php" method="post" onSubmit="return searchInput();">
<!--
EOT;
if (SCR == 'thread'){
	print <<<EOT
-->
        		<input value="AND" type="hidden" name="method" id="ins_method">
        		<input value="1" type="hidden" name="sch_area" id="ins_sch_area">
        		<input value="all" type="hidden" name="sch_time" id="ins_time">
        		<input value="$fid" type="hidden" name="fid" id="ins_fid">
<!--
EOT;
}print <<<EOT
-->
	        	<input type="hidden" value="$verifyhash" name="verify">
	            <input value="2" type="hidden" name="step">
	            <input value="thread" type="hidden" id="search_type" name="type">
	            <div class="ip"><input id="search_input" type="text" value="搜索其实很简单！" class="gray" name="keyword" onFocus="searchFocus(this)" onBlur="searchBlur(this)" /></div>
	            <div class="s_select" onMouseOut="this.firstChild.style.display='none';" onMouseOver="this.firstChild.style.display='block';"><ul onClick="getSearchType(event)"><!--
EOT;
$schText = '帖子';
$schStyle = ' style="display:none"';
if (SCR == 'thread'){
	$schText = '本版';
	$schStyle = '';
	print <<<EOT
-->
<li type="thread" style="display:none" id="inner_forum">本版</li>
<!--
EOT;
}
if ($db_search_type) {
	foreach ($db_search_type as $key=>$value) {
		$currentType = SCR != 'thread' && $key == 'thread' ? ' style="display:none"' : '';
print <<<EOT
--><li type="$key"$currentType>{$value}</li><!--
EOT;
	}
} else {
print <<<EOT
-->
				<li type="thread"{$schStyle}>帖子</li>
				<li type="diary">日志</li>
				<li type="user">用户</li>
				<li type="forum">版块</li>
				<li type="group">群组</li>
<!--
EOT;
}print <<<EOT
--></ul><h6 class="w">$schText</h6></div>
	            <button type="submit" class="fl cp">搜索</button>
            </form>
            <div class="s_tags">
<!--
EOT;
$hotwords = ($db_hotwords) ? explode(",",$db_hotwords) : array();
if($hotwords){print <<<EOT
-->
            <span>热搜：</span>
<!--
EOT;
foreach($hotwords as $hotword){
print <<<EOT
--><a href="searcher.php?keyword={$hotword}&type=thread" class="s4" target="_blank">$hotword</a><!--
EOT;
}}
print <<<EOT
-->
            </div>
        </div>
    </div>
<!--
EOT;
if ($skincount > 1) {print <<<EOT
-->
<div id="menu_skin" class="pw_menu" style="display:none;">
	<div class="pw_menuBg">
		<div class="fl"><h6><img src="$imgpath/pwicon/style.gif" align="top" alt="风格切换" /></h6></div>
    <div class="c mb10">&nbsp;</div>
		<ul class="cc menuSkin">
<!--
EOT;
	foreach ($db_skindb as $key => $val) {
		$tmpCss = $key == $skin ? 'class="current"' : '';
print <<<EOT
-->
			<li {$tmpCss}>
				<a href="javascript:;" onClick="window.location=('{$s_url}skinco=$key');return false;">
					<i style="background:url($imgpath/$val[1]/preview.jpg) no-repeat">&nbsp;</i>
					<p class="tac">{$val[0]}</p>
				</a>
			</li>
<!--
EOT;
	}
print <<<EOT
-->
		</ul>
    </div>
</div>
<script>var td_skin = {pz : 22}</script>
<!--
EOT;
}if (!empty($shortcutforum)) {print <<<EOT
-->
<div id="menu_shortcut" class="pw_menu" style="display:none;">
	<h6><a href="javascript:;" class="link_down"><span>书签</span></a></h6>
	<ul class="menuList" id="forumBooks">
<!--
EOT;
foreach ($shortcutforum as $key => $value) {print <<<EOT
-->
		<li><a href="thread.php?fid=$key">$value</a></li>
<!--
EOT;
}print <<<EOT
-->
	</ul>
</div>
<script>var td_shortcut = {pz : 22}</script>
<!--
EOT;
}print <<<EOT
-->
</div>
<div class="tac mb5">
<!--
EOT;
list($htmlAdvert,$arrayAdvert) = pwAdvert('Site.NavBanner1',$fid);
if($htmlAdvert){print <<<EOT
-->
$htmlAdvert
<!--
EOT;
}
list($htmlAdvert,$arrayAdvert) = pwAdvert('Site.NavBanner2',$fid);
if($htmlAdvert){print <<<EOT
-->
$htmlAdvert
<!--
EOT;
}print <<<EOT
-->
</div>
<div class="main-wrap">
<div id="main">
<!--
EOT;
?>-->