<!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">
<title>通行证 - <jcms:site.name/></title>
<head>
<meta   http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta   name="robots" content="noindex, nofollow" />
<meta   http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link href="../style/passport/login2.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../_libs/jquery.tools.pack.js"></script>
<script type="text/javascript" src="../_data/jcmsV4.x.js"></script>
<link   type="text/css" rel="stylesheet" href="../_data/jcmsV4.x.css" />
<script type="text/javascript">if (top!=self)top.location=self.location;</script>
</head>
<script type="text/javascript">
(function(){
	$(document).ready(function(){
		var act = q('act');
		if(act != "logout")
			sendRequest(1);
		else
			chkLogout();
	});

})();
var gSubmitTimes = 0;
function oLogin()
{
}
function chkLogin(){
	if(gSubmitTimes>4){
		alert('请想想密码再来');
		return;
	}
	var uName="";
	var uPass="";
	var uCode="";
	uName=$("#txtUserName").val();
	uPass=$("#txtUserPass").val();
	uCode=$("#txtUserCode").val();
	if(uName==""){
		alert('请填写用户名');
		$("#txtUserName").focus();
		return;
	}
	if(uPass==""){
		alert('请填写密码');
		$("#txtUserPass").focus();
		return;
	}
	if(uCode==""){
		alert('请填写校验码');
		$("#txtUserCode").focus();
		return;
	}
	var typeNum;
	var rbType=$("#loginform input");
	for(var i=0;i<rbType.length;i++)
	{
		if(rbType[i].checked && rbType[i].type=="radio" && rbType[i].name=="LoginType"){
			typeNum=rbType[i].value;
		}
	}
	$.ajax({
		type:		"post",
		dataType:	"html",
		url:		"ajax.aspx?oper=login&time="+(new Date().getTime()),
		data:		"name="+encodeURIComponent(uName)+"&pass="+encodeURIComponent(uPass)+"&code="+encodeURIComponent(uCode)+"&type="+typeNum,
        error:		function(XmlHttpRequest,textStatus, errorThrown) { alert(XmlHttpRequest.responseText);},
		success:	function(d){
			if (d== "ok")
				top.location.href=$("#txtRefer").val();
			else
			{
				gSubmitTimes=gSubmitTimes+1;
				alert(d);
				$OBJ('imgCode').src=_jcms_SetUrlRefresh('../plus/getcode.aspx');
			}
		}
	});
}
function chkLogout(){
	top.location.href="logout.aspx";
}
function sendRequest(p){
	if(p==0)
	{
		oLogin();
		return;
	}
	$.ajax({
		url:		"../user/ajax.aspx?time="+(new Date().getTime()),
		type:		"get",
		dataType:	"json",
		success:	function(d){
			if(d.result=="1")
				if(q('refer')!="")
					top.location.href=decodeURIComponent(q('refer'));
				else
					top.location.href=site.Dir + 'user/index/default.aspx';
			else
				oLogin();
		}
	});
}
</script>
<body>
<!--顶部-->
<div id="header">
	<div class="h_lt"><a href="../"><img src="../_data/style/logo.jpg" /></a></div>
	<div class="h_rt">
		<div class="userbar"><a href="register.aspx">注册</a> | <a href="login.aspx">登录</a> | <a href="../">首页</a> </div>
	</div>
	<div class="clear"></div>
</div>
<!--顶部-->
<div id="lad_center">
	<div class="lad_lt">
		<div class="tt"><a href="register.aspx"><img style="margin-left:5px;" src="../style/passport/land_t.gif" border="0" /></a></div>
		<div class="cont">
			<div class="ms">
				<p style="padding-top:20px;*padding-top:20px;padding-left:15px;"><strong>注册</strong><br/>
					如果还没有通行证，赶紧<a href="register.aspx">注册</a>一个。使用通行证，您可以在<jcms:site.name/>所有产品（包括：资讯、论坛、博客等）中登录，方便快捷！</p>
				<p style="padding-top:20px;*padding-top:20px;padding-left:15px;"><strong>找回密码</strong><br/>
					目前提供的方式是：点击<a href="getpassword.aspx">忘记密码</a>，填入您的用户名和注册邮箱，我们将会把重置密码发送到您的邮箱里。</p>
			</div>
		</div>
		<div class="fb"> </div>
	</div>
	<div class="lad_rt">
		<form id="loginform">
			<p style="*margin-top:20px;">帐　号
				<input tabindex="1" class="sr" type="text" id="txtUserName" name="txtUserName" maxlength="64" />
				<a style="color:#000;"></a> </p>
			<p>密　码
				<input tabindex="2" class="sr" type="password" name="txtUserPass" id="txtUserPass" maxlength="16" />
				<a style="color:#000;" href="getpassword.aspx">忘记密码？</a></p>
			<p>验　证
				<input tabindex="3" class="sr2" type="text" name="txtUserCode" id="txtUserCode" maxlength="6" style="ime-mode:disabled;" onpaste="return false" />
				<img id="imgCode" onclick="this.src=_jcms_SetUrlRefresh('../plus/getcode.aspx');" src="../plus/getcode.aspx" align="absmiddle" style="cursor: pointer" alt="看不清楚？点击换一张" title="看不清楚？点击换一张" /><img id="imgRead" onclick="PlayCodeVoice('player');" src="../style/common/maintb.gif" align="absmiddle" style="cursor: pointer;" alt="收听校验码" title="收听校验码" /><span id="player"></span></p>
			<p style="padding: 2px 0px 6px 45px; text-indent: -3px;">
				<input id="rbt1" type="radio" name="LoginType" value="0" checked="checked" />
				<label for="rbt1">安全登录</label>
				<input id="rbt2" type="radio" name="LoginType" value="7" />
				<label for="rbt2">记住状态</label></p>
			<p style="margin:0px 0px 10px 50px;color:red"></p>
			<p style="text-indent:40px;">
				<input type="button" class="Login1" onclick="chkLogin();" id="btnLogin" value="" />
				<input type="hidden" id="txtRefer" name="txtRefer" value="{$refer}">
				<a class="Login2" href="register.aspx"/></a>
			<div class="clear"></div>
			</p>
		</form>
	</div>
	<div class="clear"></div>
</div>
<!--中间-->
<!--底部-->
<jcms:include file="~/_data/html/footer2.htm" />
</body>
</html>
