<!--#include file="conn.asp"-->
<!--#include file="inc/const.asp"--><html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<title>用户登陆</title>
<style>
body {background:#efefef;margin:0 auto;font-size:12px;font-family:Verdana, Arial, Helvetica, Sans-serif,宋体;}
a:link {color:#333333; text-decoration:none;}
a:visited {color: #333333;text-decoration:none;}
a:hover {color:#ff6600;text-decoration:none;}
td {font-size:12px;color:#333333;font-family:Verdana, Arial, Helvetica, Sans-serif,宋体;}
input {font-size:12px;font-family:Verdana, Arial, Helvetica, Sans-serif,宋体;Border-top-width:1px;Border-left-width:1px;Border-bottom-width:1px;Border-right-width:1px}
</style>
<script type="text/javascript">
<!--
var show_checkcode = false;
function get_checkcode() {
	var chkCodeFile = "<%=CodeFilePath%>";
	if(!show_checkcode){
		if(document.getElementById("img_checkcode"))
			document.getElementById("img_checkcode").innerHTML = '<img  id="checkcodeimg" src="'+chkCodeFile+'?t='+Math.random()+'" alt="点击刷新验证码" style="cursor:pointer;border:0;vertical-align:middle;height:18px;" onclick="this.src=\''+chkCodeFile+'?t=\'+Math.random()" />'
			show_checkcode = true;

		if(document.getElementById("isok_checkcode"))
			document.getElementById("isok_checkcode").innerHTML = '<a href="javascript://" onclick="setTimeout(function(){ document.getElementById(\'checkcodeimg\').src=\''+chkCodeFile+'?t=\'+Math.random()},100);">看不清<\/a>';
	}
}
//-->
</script>
</head>
<body>
<%
'--本文件是登录表单示例，请各位自行修改
Dim IsCheckcode	:	IsCheckcode=CLng(NewAsp.MainSetting(23))
If Trim(Request.Cookies(NewAsp.CookiesName)) = "" Or NewAsp.memberid=0 Then
'--用户未登录状态
%>
 <table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <form name="form1" method="post" action="users/login.asp?action=login" target="_top">
<script language="javascript">
<!--
document.write('<input type="hidden" name="comeurl" value="'+ top.window.location +'">');  
// -->
</script>
      <tr>
        <td width="16%"></td>
        <td width="60%" nowrap>用户名：
          <input name="username" type="text" id="username" size="16" maxlength="20"> 
          密 码：
          <input name="password" type="password" id="password" size="16" maxlength="50">          
           COOKIE：
           <select name="CookieDate" size="1" id="CookieDate">
             <option value="0">不保存</option>
             <option value="1">保存一天</option>
             <option value="2">保存一月</option>
             <option value="3">保存一年</option>
           </select><%
           If IsCheckcode=1 Then
		   '--是否显示登录验证码
           %>
		   验证码：<input name="checkcode" type="text" class="logininput" id="checkcode" size="5" maxlength="4" onfocus="get_checkcode();this.onfocus=null;" onkeyup="ajaxcheckcode('check_code','checkcode');" />
				<span id="img_checkcode"><label style="cursor:pointer;" onclick="get_checkcode();">点击获取验证码</label></span><span id="isok_checkcode"></span>
			<%End If%>
	</td>
        <td width="13%" align="center" nowrap><input type="submit" name="submit_button" value="登 录"/></td>
        <td width="13%" align="center" nowrap><input type="button" name="reg_button" value="注 册" onclick="window.location.href='users/reg.asp';"/></td>
      </tr>
      </form>
</table>   
<%
Else
'--用户已登录状态
%>
 <table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="16%"></td>
        <td width="10%" align="center">用户名称：</td>
        <td width="12%"><font color="blue"><%=NewAsp.membername%></font></td>
	<td width="10%" align="center">用户身份：</td>
        <td width="12%"><font color="red"><%=NewAsp.membergroup%></font></td>
	<td width="10%" align="center">会员类型：</td>
	<td width="12%">
<%
If CInt(NewAsp.memberclass) = 1 Then
	Response.Write "计时会员"
ElseIf CInt(NewAsp.memberclass) = 999 Then
	Response.Write "管理员"
Else
	Response.Write "计点会员"
End If
%>
	</td>
        <td width="8%"><a href="users/" target="_top">管理中心</a></td>
        <td width="8%"><a href="users/logout.asp" target="_top">退出登录</a></td>
      </tr>
</table> 
<%
End If
NewAsp.PageEnd()
%>
</body></html>
