<!--<?php print <<<EOT
--><!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=$db_charset" />
<title>$subject$forumtitle$db_bbsname - Powered by PHPWind.net</title>
<meta name="generator" content="PHPWind $wind_version" />
<meta name="keywords" content="$db_metakeyword" />
<meta name="description" content="$db_metadescrip" />
<link rel='archives' title='$db_bbsname' href='$db_bbsurl/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
-->
<base id="headbase" href="$db_bbsurl/" />
<link rel="stylesheet" type="text/css" href="$imgpath/$stylepath/wind-reset.css" />
<!--
EOT;
@include Pcv($css_path);
if($pwModeCss){print <<<EOT
-->
<link rel="stylesheet" type="text/css" href="$pwModeCss" />
<!--
EOT;
}print <<<EOT
-->
<script type="text/javascript" language="JavaScript" src="js/pw_ajax.js"></script>
<script language="JavaScript">
var agt = navigator.userAgent.toLowerCase();
var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_gecko= (navigator.product == "Gecko");
var imgpath = '$imgpath';
var verifyhash = '$verifyhash';
var modeimg = '$pwModeImg';
var modeBase = '$baseUrl';
var winduid = '$winduid';
var windid	= '$windid';
var groupid	= '$groupid';
if (location.href.indexOf('/simple/') != -1) {
	getObj('headbase').href = location.href.substr(0,location.href.indexOf('/simple/')+1);
} else if (location.href.indexOf('.html')!=-1) {
	var base = location.href.replace(/^(http(s)?:\/\/(.*?)\/)[^\/]*\/[0-9]+\/[0-9]{4,6}\/[0-9]+\.html$/i,'$1');
	if (base != location.href) {
		getObj('headbase').href = base;
	}
}
function getObj(id) {
	return document.getElementById(id);
}
function ietruebody() {
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}
function getTop() {
	return typeof window.pageYOffset != 'undefined' ? window.pageYOffset:ietruebody().scrollTop;
}
function getLeft() {
	return (typeof window.pageXOffset != 'undefined' ? window.pageXOffset:ietruebody().scrollLeft)
}
function IsElement(id) {
	return document.getElementById(id) != null ? true : false;
}
function setCurrent(src,dst,css) {
	var o = null;
	if (IsElement(src)) {
		o = getObj(src);
	} else if (dst && IsElement(dst)) {
		o = getObj(dst);
	}
	if (o) o.className += ' ' + css;
}
</script>
</head>
<body onkeydown="try{keyCodes(event);}catch(e){}">
<!--[if IE 6]>
<style>
html,body{overflow:hidden;height:100%;}
.fixed {
right:0;left:0;bottom:0;position: fixed;z-index:200
}
</style>
<div id=upPanel style="overflow:auto;width:100%;height:100%;position:relative;">
<![endif]-->
$msgsound
$head_postlist
$head_forumlist
<div id="mode-header">
	<div class="mode-header">
    	<div class="mode-head">
            <a href="$bbsurl" class="logo fl"><img src="$imgpath/$stylepath/logo.png" /></a>
            <div class="nav-operate" align="center">
            <table cellpadding="0" cellspacing="0" align="center" height="70" class="tac">
            <tr>
<!--
EOT;
$i = 0;$tmpHeadNavMore='';
foreach($db_headnav as $value) {
if ($i++ > 6) {
	$tmpHeadNavMore .= $value[html];
} else {
print <<<EOT
-->
				<td>
<!--
EOT;
if($value['image']){print <<<EOT
-->
				$value[image]
<!--
EOT;
}print <<<EOT
-->
				<p>$value[html]</p></td>
<!--
EOT;
}}if($tmpHeadNavMore){print <<<EOT
-->
				<td><a class="nav-more" onclick="read.open('menu_nav_more','td_nav_more');" style="cursor:pointer;" id="td_nav_more">更多</a></td>
<!--
EOT;
}print <<<EOT
-->
			</tr></table>
<!--
EOT;
if($tmpHeadNavMore){print <<<EOT
-->
			<div id="menu_nav_more" class="menu menu-post" style="display:none;width:15em;"><div class="menu-b">$tmpHeadNavMore</div></div>
<!--
EOT;
}print <<<EOT
-->
            </div>
        </div><div class="c"></div>
	</div><div class="c"></div>
	<div class="nav cc">
				<div class="nav-user">
					<table cellpadding="0" cellspacing="0" border="0">
<!--
EOT;
if($groupid=='guest'){
if ($db_ajax & 16) {
$arr_logintypename = array('用戶名','UID','Email');
print <<<EOT
-->
					<tr><td><a onclick="showLoginDiv();" title="展開登錄框" class="ml b" style="cursor:pointer">登錄</a>&nbsp;&nbsp;<a href="$regurl" class="b">注冊</a>
						<div id="user-login" class="menu menu-post" style="display:none;">
	                	<div class="menu-b" style="width:400px;">
						<form action="login.php" name="login_FORM" method="post">
							<input type="hidden" name="jumpurl" value="http://{$pwServer['HTTP_HOST']}{$REQUEST_URI}" />
							<input type="hidden" name="step" value="2" />
							<input type="hidden" name="cktime" value="31536000" />
							<table width="100%" cellpadding="0" cellspacing="0">
	                        	<tr><td class="menu-top" colspan="2"><span class="b fr f14" onclick="read.close();" style="cursor:pointer;">×</span>登錄</td></tr>
								<tr class="user-table">
									<td width="30%"><select name="lgt">
<!--
EOT;
if(count($arr_logintype)==1){
$value = current($arr_logintype);
print <<<EOT
-->
									<option value="$value" selected>$arr_logintypename[$value]</option>
<!--
EOT;
}elseif(count($arr_logintype)>1){
$i=1;
foreach($arr_logintype as $value){
$str_checked = $i==1? 'selected':'';
$i++;
print <<<EOT
-->
									<option value="$value" $str_checked>$arr_logintypename[$value]</option>
<!--
EOT;
}print <<<EOT
-->
									</select>
<!--
EOT;
}else{print <<<EOT
-->

									<input type="radio" name="lgt" value="$value" checked /><span id="login_$value">用戶名</span>
<!--
EOT;
}print <<<EOT
-->
								</td>
								<td class="tal"><input class="input gray" onfocus="checkinput(this);" onblur="if(getObj('logintab')) getObj('logintab').style.display='';checkinput(this,'輸入用戶名');" style="width:150px" name="pwuser" value="輸入用戶名" tabindex="1" /></td>
							</tr>
							<tr class="user-table">
								<td>密  碼</td><td class="tal"><input class="input" type="password" name="pwpwd" style="width:150px;" tabindex="2" /></td>
							</tr>
<!--
EOT;
if($db_gdcheck & 2){print <<<EOT
-->
							<tr class="user-table">
								<td>認證碼</td>
								<td class="tal">
									<input class="input" onfocus="showCK();" type="text" name="gdcode" size="5" tabindex="3"  />
									<img id="ckcode" style="cursor:pointer;display:none" onclick="this.src='ck.php?nowtime='+new Date().getTime();" alt="看不清楚，換一張" />
								</td>
							</tr>
<!--
EOT;
}if($db_ifsafecv){print <<<EOT
-->
							<tr class="user-table">
								<td>安全問題</td>
								<td class="tal">
									<select name="question" onchange="showcustomquest(this.value)" tabindex="4">
										<option value="0">無安全問題</option>
	<option value="1">我爸爸的出生地</option>
	<option value="2">我媽媽的出生地</option>
	<option value="3">我的小學校名</option>
	<option value="4">我的中學校名</option>
	<option value="5">我最喜歡的運動</option>
	<option value="6">我最喜歡的歌曲</option>
	<option value="7">我最喜歡的電影</option>
	<option value="8">我最喜歡的顏色</option>
	<option value="-1">自定義問題</option>
									</select>
									<input id="customquest" style="display:none" name="customquest" class="input" size="10" tabindex="5" />
								</td>
							</tr>
							<tr class="user-table">
								<td>您的答案</td>
								<td class="tal"><input name="answer" class="input" size="25" tabindex="6" /></td>
							</tr>
<!--
EOT;
}if($qcheck){print <<<EOT
-->
							<tr class="user-table">
								<td>驗證問答</td>
								<td class="tal">{$db_question[$qkey]}<br />
									<input class="input" name="qanswer" size="25" tabindex="7" />
									<input type="hidden" name="qkey" value="$qkey" />
								</td>
							</tr>
<!--
EOT;
}print <<<EOT
-->
							<tr class="user-table">
								<td></td>
								<td class="tal"><input class="btn fl" type="submit" value=" 登 錄 " tabindex="8" /> <a href="sendpwd.php" class="fl">找回密碼</a></td>
							</tr>
						</table>
					</form>
                    </div>
				</div></td></tr>

<script language="JavaScript">
function showcustomquest(qid){
	getObj('customquest').style.display = qid==-1 ? '' : 'none';
}
function checkinput(obj,val){
	if (obj.className.indexOf('gray')!=-1) {
		obj.value = '';
		obj.className = obj.className.replace('gray', 'black');
	} else if (val && obj.value=='') {
		obj.value = obj.defaultValue = val;
		if (obj.className.indexOf('black') == -1) {
			obj.className += ' gray';
		} else {
			obj.className = obj.className.replace('black', 'gray');
		}
	}
}
var mt;
function showLoginDiv(){
	mt = setTimeout('read.open(\'user-login\',\'show-login\',2,26);',200);
	document.onmousedown = function (e) {
		var o = is_ie ? window.event.srcElement : e.target;
		if (!issrc(o)) {
			read.close();
			document.onmousedown = '';
		}
	}
}
function issrc(o) {
	var k = 0;
	while (o) {
		if (o == read.menu) {
			return true;
		}
		if (o.tagName.toLowerCase() == 'body' || ++k>10) {
			break;
		}
		o = o.parentNode;
	}
	return false;
}
function showCK(){
	getObj('ckcode').style.display="";
	if (getObj('ckcode').src.indexOf('ck.php') == -1) {
		getObj('ckcode').src = 'ck.php?nowtime=' + new Date().getTime();
	}
}
</script>
<!--
EOT;
} else {print <<<EOT
-->
						<tr><td><a href="login.php" title="登錄" class="ml b">登錄</a>&nbsp;&nbsp;<a href="$regurl" class="b">注冊</a></td></tr>
<!--
EOT;
}
} else {print <<<EOT
-->
						<tr>
							<td><div id="userinfo_more" class="fl" style="height:1px;width:1px;overflow:hidden;"></div>
							<a style="cursor:pointer;" onclick="read.open('menu_userinfo_more','userinfo_more');">
<!--
EOT;
if (GetCookie('hideid') == 1) {print <<<EOT
-->
							<div id="stealth"></div><img src="$faceurl" class="portrait-s fl" id="iconimg" title="隱身"/>
<!--
EOT;
} else {print <<<EOT
-->
							<div id="stealth" class="hide"></div><img src="$faceurl" class="portrait-s fl" id="iconimg" title="在線"/>
<!--
EOT;
}print <<<EOT
-->
							</a>
							</td>
							<td><a href="u.php" class="b fl"><span>$windid</span></a></td>
							<td valign="top">

<!--
EOT;
if($winddb[newpm]>0 && $_G[maxmsg]>0){print <<<EOT
-->
							<a id="td_msg" class="icon-meg2" href="message.php" title="有新短消息">有新短消息</a>
<!--
EOT;
} else {print <<<EOT
-->
							<a id="td_msg" class="icon-meg" href="message.php" title="短消息">短消息</a>
<!--
EOT;
}print <<<EOT
-->
							<td>
							<a href="profile.php" title="設置中心">個人設置</a>&nbsp;
<!--
EOT;
if(CkInArray($windid,$manager) || $SYSTEM['allowadmincp']){print <<<EOT
-->
							<a href="$db_adminfile" target="_blank" class="s3">系統設置</a>
<!--
EOT;
}print <<<EOT
-->
							&nbsp;<a href="$loginouturl">退出</a>
<script language="JavaScript">
function changeState() {
	var msg = ajax.request.responseText;
	if (msg == 1){
		getObj('stealth').className = '';
		getObj('iconimg').title = '隱身';
		getObj('online_state').innerHTML = '<img src="$imgpath/$stylepath/head-ol.gif" align="absmiddle" /> 我要上線';
	}else{
		getObj('stealth').className = 'hide';
		getObj('iconimg').title = '在線';
		getObj('online_state').innerHTML = '<img src="$imgpath/$stylepath/stealth.gif" align="absmiddle" /> 我要隱身';
	}
}
</script>
<div id="menu_userinfo_more" class="menu cc userinfo-gps" style="display:none;">
						<div class="cc" style="width:16em;padding-left:6px;padding-bottom:.5em;">
							<a href="u.php" class="fl" style="margin-top:5px;">
<!--
EOT;
if (GetCookie('hideid') == 1) {print <<<EOT
-->
							<img src="$faceurl" class="portrait-s fl" id="iconimg-m" title="隱身"/>
<!--
EOT;
} else {print <<<EOT
-->
							<img src="$faceurl" class="portrait-s fl" id="iconimg-m" title="在線"/>
<!--
EOT;
}print <<<EOT
-->
							</a>
                            <ul class="menu-half">
                            	<li class="b"><a href="u.php" class="fl"><span>$windid</span></a></li>
                            	<li style="width:auto;"><div class="nav-user" style="float:left;">
<!--
EOT;
if($winddb[newpm]>0 && $_G[maxmsg]>0){print <<<EOT
-->
                                <a id="td_msg" class="icon-meg2" href="message.php" title="有新的消息">新消息</a>
<!--
EOT;
} else {print <<<EOT
-->
                                <a id="td_msg" class="icon-meg" href="message.php" title="消息">消息</a>
<!--
EOT;
}print <<<EOT
-->

							<a href="profile.php" class="fl" style="padding:.7em .3em" title="個人設置" >個人設置</a></div></li></ul>
							<ul class="menu-half" style="padding-left:3px;">
<!--
EOT;
if ($_G['allowhide']) {print <<<EOT
-->
                            <li><a style="cursor:pointer;" onclick="ajax.send('pw_ajax.php?action=changestate','',changeState)" class="s1" id="online_state">
<!--
EOT;
if (GetCookie('hideid') == 1) {print <<<EOT
-->
							<img src="$imgpath/$stylepath/head-ol.gif" align="absmiddle" /> 我要上線
<!--
EOT;
} else {print <<<EOT
-->
							<img src="$imgpath/$stylepath/stealth.gif" align="absmiddle" /> 我要隱身
<!--
EOT;
}print <<<EOT
-->
							</a></li>
<!--
EOT;
}print <<<EOT
-->
							<li>$gp_grouptitle</li><li>帖子: $winddb[postnum] </li>
							<li>今日: $winddb[todaypost] </li>
<!--
EOT;
if(CkInArray($windid,$manager) || $SYSTEM['allowadmincp']){print <<<EOT
-->
							<li><a href="$db_adminfile" target="_blank" class="s3">系統設置</a></li>
<!--
EOT;
}print <<<EOT
-->
							<li><a href="u.php?action=topic" class="fl blue">我的主題</a></li>
                            <li><a href="u.php?action=post" class="fl blue">我的回復</a></li>
							<li><a href="u.php?action=favor" class="fl blue">我的收藏</a></li>
                            <li><a href="u.php?action=feed" class="fl blue">好友近況</a></li>

							</ul>
						</div>
					</div>
<!--
EOT;
}print <<<EOT
-->
							</td>
						</tr>
					</table>
				</div>
				<ul class="nav-global">
					<li $pwNavCurStyle_home ><a href="$db_bbsurl">首頁</a></li>
<!--
EOT;
foreach($db_modes as $key=>$value){
if (!$value['ifopen'] || $defaultMode==$key) continue;
$tmpStyle = ${'pwNavCurStyle_'.$key};
print <<<EOT
-->
					<li $tmpStyle ><a href="$db_bbsurl?m=$key">$value[title]</a></li>
<!--
EOT;
}print <<<EOT
-->
			</ul>
            <span class="nav-bbs">
<!--
EOT;
if($_G[allowsort]){print <<<EOT
-->
                <a id="td_sort" href="sort.php">統計排行</a>
<!--
EOT;
}if($_G['show']){print <<<EOT
-->
                <a href="show.php" id="h_show">展區</a>
<!--
EOT;
}print <<<EOT
-->
                <a href="search.php" id="h_search">搜索</a>
                <a style="cursor:pointer;" id="td_hack">社區服務</a>
<!--
EOT;
foreach($db_hackdb as $key=>$hack){
if($hack[2]=='2' && file_exists(R_P."hack/$key/index.php")){print <<<EOT
-->
				<a href="hack.php?H_name=$hack[1]">$hack[0]</a>
<!--
EOT;
}}if($db_ifbookinfo){
$rawbbsname=rawurlencode($db_bbsname);
$rawbbsurl=rawurlencode($db_bbsurl);
$rawuser=rawurlencode($windid);
$pushurl="http://push.phpwind.com/book.php?tocharset=$db_charset&bbsname=$rawbbsname&bbsurl=$rawbbsurl&user=$rawuser";
if($tid){
$rawtitle=rawurlencode($subject);
print <<<EOT
-->
							<a href="$pushurl&tid=$tid&title=$rawtitle" target="_blank">訂閱本帖更新</a>
<!--
EOT;
}elseif($fid){
$rawforumname=rawurlencode($forumname);
print <<<EOT
-->
							<a href="$pushurl&fid=$fid&forumname=$rawforumname" target="_blank">訂閱本版更新</a>
<!--
EOT;
}else{print <<<EOT
-->
							<a href="$pushurl" target="_blank">訂閱全站新帖</a>
<!--
EOT;
}}print <<<EOT
-->
<a href="faq.php">幫助</a>
</span>

	</div>
    <div id="menu_hack" class="menu menu-post cc" style="display:none;">
        <div class="menu-b" style="width:9em;">
        <p>
<!--
EOT;
foreach ($db_hackdb as $key => $hack) {
if ($hack[2]=='1' && file_exists(R_P."hack/$key/index.php")) {print <<<EOT
-->
            <a href="hack.php?H_name=$hack[1]">$hack[0]</a>
<!--
EOT;
}}print <<<EOT
-->
        </p>
        </div>
    </div>
<!--
EOT;
if($db_menu%2 == 1){print <<<EOT
-->
    <div id="menu_sort" class="menu menu-post cc" style="display:none;">
        <div class="menu-b" style="width:9em;">
            <a href="sort.php">基本信息</a>
<!--
EOT;
if($db_ipstates){print <<<EOT
-->
            <a href="sort.php?action=ipstate">到訪IP統計</a>
<!--
EOT;
}print <<<EOT
-->
            <a href="sort.php?action=team">管理團隊</a>
            <a href="sort.php?action=admin">管理操作</a>
            <a href="sort.php?action=online">在線會員</a>
            <a href="sort.php?action=member">會員排行</a>
            <a href="sort.php?action=forum">版塊排行</a>
            <a href="sort.php?action=article">帖子排行</a>
            <a href="push.php?fid=$fid">推薦排行</a>
<!--
EOT;
if($db_iftag){print <<<EOT
-->
            <a href="job.php?action=taglist">標簽排行</a>
<!--
EOT;
}print <<<EOT
-->
        </div>
    </div>
<!--
EOT;
}print <<<EOT
-->
<div class="c"></div>
</div>
<div class="c"></div>
   	<div class="mode-main">
<!--
EOT;
if ($header_ad) {print <<<EOT
-->
<div class="tac" style="margin:.3em 0;padding:2px;">$header_ad</div>
<!--
EOT;
}
?>-->