<?php
print <<<EOT
<!doctype html>
<html>
<head>
<meta charset="$db_charset" />
<title>{$webPageTitle}提示信息 - Powered by phpwind</title>
<meta name="generator" content="phpwind $wind_version" />
<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);
print <<<EOT
-->
<link rel="stylesheet" href="$imgpath/register/register.css?{$GLOBALS['wind_repair']}" />
<style type="text/css">
p,ul,li{padding:0;margin:0;}
li{list-style:none}
.cp { cursor: pointer;}
</style>
<script type="text/javascript" src="js/core/core.js"></script>
<script type="text/javascript" src="js/pw_ajax.js"></script>
</head>
<body onKeyDown="try{keyCodes(event);}catch(e){}">
<div class="wrap">
	<div id="header">
		<div class="head_top"></div>
			 <div id="head" class="cc">
					<a href="$db_bbsurl/"><img src="$imgpath/$stylepath/logo.png" class="fl" title="phpwind" /></a>
			</div>
	</div>
	<div class="main-wrap">
		<div id="main">
			<div id="pw_content">
				<div class="p20">
					<div class="regTitle cc">
						<h5 class="s6"><b>提示信息</b></h5>
					</div>
					<div class="cc">
EOT;
if($showlogin){print <<<EOT
						<div class="regForm-wrap">
							<div class="regForm">
<script>
function showcustomquest(qid){
	getObj("customquest").style.display = qid==-1 ? '' : 'none';
}
</script>
								<div class="regIgnore" style="padding-bottom:20px;">
									<div class="f14 mb5">您沒有登錄或者您沒有權限訪問此頁面，可能有如下幾個原因</div>
									<ol>
										<li>1、{$msg_info}</li>
										<li>2、您還不是站點會員,請先登錄站點</li>
									</ol>
								</div>
<form action="login.php?" method="post" name="login">
								<div style="padding-left:15px;">
									<dl>
										<dt style="height:26px;">
EOT;
$arr_logintypename = array('用戶名','UID','電子郵箱');
$value = 0;
if(count($_LoginInfo['logintype'])==1){
	$value = current($_LoginInfo['logintype']);print <<<EOT

				<input type="hidden" name="lgt" value="$value"/>$arr_logintypename[$value]

EOT;
}elseif(count($_LoginInfo['logintype'])>1){print <<<EOT

				<select name="lgt" onchange="document.login.pwuser.focus();" class="f14">

EOT;
	$i=1;
	foreach($_LoginInfo['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="hidden" name="lgt" value="$value" />用戶名

EOT;
}print <<<EOT
										</dt>
										<dd class="ip"><div class=""><input class="input" type="text" tabindex="11" name="pwuser" /></div></dd>
									</dl>
									<dl class="cc">
										<dt>密　碼</dt>
										<dd class="ip"><div><input class="input" type="password" tabindex="12" name="pwpwd" /></div></dd>
										<dd><div class="p5"><a href="sendpwd.php#breadCrumb" class="s4" target="_blank" rel="nofollow">找回密碼</a></div></dd>
									</dl>
EOT;
if($db_ifsafecv){print <<<EOT

									<dl class="cc">
										<dt>安全問題</dt>
										<dd class="ip"><select name="question" class="f14" style="width:230px;margin-top:3px;" onchange="showcustomquest(this.value)" tabindex="13"><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></dd>
									</dl>
									<dl class="cc" id="customquest" style="display:none">
										<dt>自定義問題</dt>
										<dd class="ip"><div><input type="text" name="customquest" class="input" tabindex="14" /></div></dd>
									</dl>
									<dl class="cc">
										<dt>您的答案</dt>
										<dd class="ip"><div><input type="text" name="answer" class="input" tabindex="15"></div></dd>
									</dl>
EOT;
}if($db_ckquestion & 2 && $db_question){
if($db_imagequestion){
	$question = '<img id="ckquestion" src="ckquestion.php?q='.$qkey.'&t='.$timestamp.'" class="fl" align="top">';
}else{
	$question = $qkey<0 ? getMachineQuestion_1() :  $db_question[$qkey];
}
print <<<EOT
									<dl class="cc">
										<dt>驗證問答</dt>
										<dd class="ip"><div><input class="input" type="text" name="qanswer" tabindex="16" /></div>
					</dd><dd class="tp" style="padding-top:0;">{$question}
<!--
EOT;
list(,$showq) = explode("\t", $db_qcheck);
if($showq && $qkey>0){print <<<EOT
-->
					（答案︰{$db_answer[$qkey]}）
<!--
EOT;
}print <<<EOT
-->
					<input type="hidden" name="qkey" value="$qkey"/>
					</dd>
									</dl>


EOT;
}if($db_gdcheck & 2){
$checkCode = L::loadClass('checkcode', 'site');
$checkCodeString = $checkCode->getCheckCodeTemplate();
print <<<EOT

									<dl class="cc">
										<dt>驗證碼</dt>
										<dd class="ip ck"><div><input class="input" type="text" name="gdcode" size="6" tabindex="17" onfocus="showgd();" alt="請輸入驗證碼" /></div>
											<span id="ckcode" style="display:none;"></span>
											$checkCodeString
										</dd>
									</dl>
<script>
function loadjs(path, code, id, callBack) {
	id = id || '';
	if (id != '' && IsElement(id)) {
		try{callBack?callBack():0;}catch(e){}
		return false;
	}
	var header = document.getElementsByTagName("head")[0];
	var s = document.createElement("script");
	if (id) s.id = id;
	if (path) {
		if(is_webkit && path.indexOf(' ')>-1)
		{
			var reg = /src="(.+?)"/ig;
			var arr = reg.exec(path);
			if(arr){
				path = arr[1];
			}				
		}
		s.src = path;
	} else if (code) {
		s.text = code;
	}
	if (document.all) {
		s.onreadystatechange = function() {
			if (s.readyState == "loaded" || s.readyState == "complete") {
				callBack?callBack():0;
			}
		};
	} else {
		try{s.onload = callBack?callBack:null;}catch(e){callBack?callBack():0;}
	}
	header.appendChild(s);
	return true;
}
</script>

EOT;
}print <<<EOT
									<dl class="cc">
										<dt>隱身登錄</dt>
										<dd class="ip">
											<label class="mr10"><input name="hideid" type="radio" value="1" />開啟</label>
											<label><input name="hideid" type="radio" value="0" checked tabindex="18" />關閉</label>
										</dd>
									</dl>

									<dl class="cc">
										<dt>&nbsp;</dt>
										<dd class="ip">
											<span class="btn"><span><button type="submit" tabindex="19">登錄</button></span></span><input type="hidden" name="forward" value="" /><input type="hidden" name="jumpurl" value="$jumpurl" /><input type="hidden" name="m" value="$db_mode" /><input type="hidden" name="step" value="2" /><input type="hidden" name="cktime" value="31536000" />
										</dd>
									</dl>

								</div>
</form>									
<script>
document.login.pwuser.focus();
</script>
							</div>
						</div>
							<div class="regLogin f14">
								<div style="padding-left:20px;">
									<p class="mb5">還沒有帳號？</p>
									<p style="padding-bottom:30px;"><span class="bt"><span><button type="button" onClick="location.href='$db_registerfile#breadCrumb';">注冊一個</button></span></span></p>
									<p class="mb5"><a href="javascript:;" class="mr20 s4" onclick="javascript:history.go(-1);return false;" tabindex="20"><u>返回繼續操作</u></a></p>
									<p>或者 <a id="showindex" tabindex="20" class="s4" href="$db_bbsurl"><u>返回首頁</u></a></p>
								</div>

<!--
EOT;
/* platform weibo app --start */
L::loadClass('WeiboLoginViewHelper', 'sns/weibotoplatform/viewhelper', false);
$weiboLoginService = L::loadClass('WeiboLoginService', 'sns/weibotoplatform/service');
$loginWays = $weiboLoginService->getLoginWays();
if ($loginWays) {
print <<<EOT
-->
				<link rel="stylesheet" type="text/css" href="u/images/expand/weibologin.css" media="all" />
				<div style="padding-left:20px;padding-top:30px;">
					<p class="f14 mb5">使用合作網站帳號登錄︰</p>
					<ul class="waysList cc">
<!--
EOT;
	foreach ($loginWays as $loginWay) {
			$windowOpenScript = WeiboLoginViewHelper_WindowOpenScript($loginWay['type']);
print <<<EOT
-->
			<li style="float:none;width:140px;"><a class="s4" title="使用{$loginWay['accountTitle']}登錄" href="javascript:;" onclick="$windowOpenScript"><img src="{$loginWay['loginLogo']}" />{$loginWay['accountTitle']}</a></li>
<!--
EOT;
	}
print <<<EOT
-->
					</ul>
				</div>
<!--
EOT;
}
/* platform weibo app --end */

print <<<EOT
-->

							</div>

EOT;
}else{print <<<EOT
						<div class="regForm-wrap" style="min-height:80px;">
							<div class="regForm">
								<div class="regIgnore">
<p class="f14 mb10">$msg_info</p>
EOT;
$dejump && $dejump!=1 && include_once PrintEot($dejump);
print <<<EOT
<p class="f14"><a onclick="var needReload = (is_ie ? history.length == 0 : history.length == 1); if(needReload){self.location.reload();}else{history.back();}return false;" class="s4 cp" tabindex="20" id="showback"><u>返回繼續操作</u></a>，或者 <a id="showindex" tabindex="20" class="s4" href="$db_bbsurl"><u>返回首頁</u></a></p>
								</div>
							</div>
						</div>

EOT;
}print <<<EOT

					</div>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
</html>
EOT;
?>