📄 checklogin.asp
字号:
<%response.expires=0%>
<!--#INCLUDE FILE="conn.asp" -->
<!--#INCLUDE FILE="const.asp" -->
<!--#INCLUDE FILE="char.asp" -->
<%
dim Errormsg,founderr
userid=trim(request.form("username"))
userpwd=trim(request.form("userpwd"))
if userid="" then
Errormsg=Errormsg+"<br>"+"<li>请输入用户名!</a>!"
call disperrs()
response.end
elseif isValidstring(userid)<>"" then
Errormsg=Errormsg+"<br>"+"<li>您输入了非法的用户名!</a>!"
call disperrs()
response.end
end if
userid=replace(userid,"'","")
userpwd=replace(userpwd,"'","")
set rs=conn.execute("select classid,studid,userpwd,locked,status from [student] where userid='"&userid&"'")
if rs.EOF then
Errormsg=Errormsg+"<br>"+"<li>对不起,您还没有<a href=register.asp>注册</a>!"
founderr=true
elseif rs("userpwd")<>userpwd then
Errormsg=Errormsg+"<br>"+"<li>密码错误!请重新<a href=javascript:history.back()>登陆</a>!!"
founderr=true
elseif rs("locked")=true then
Errormsg=Errormsg+"<br>"+"<li>对不起,您的同学录帐号已被锁定,若有任何问题,请与<a href=mailto:"&SystemEmail&">系统管理员联系</a>!"
founderr=true
end if
if founderr=true then
call disperrs()
response.end
end if
clsid=rs("classid")
sql="update [student] set point=point+"&pLogin&",visitcount=visitcount+1,lastlogin='"&now()&"' where userid='"&userid&"'"
conn.execute(sql)
response.cookies("txl")("username")=userid
Response.Cookies("txl").Expires=Date+365
session("txlusr")=userid
session("txlpwd")=userpwd
if clsid=0 then
%>
<html><head>
<meta NAME=GENERATOR Content="Microsoft FrontPage 4.0" CHARSET=GB2312>
<title><%=SchoolmateName%>——登录成功</title>
<link rel=stylesheet type=text/css href=txl.css>
</head>
<body alink=#333333 vlink=#333333 link=#333333 topmargin=0>
<%
response.write "<meta http-equiv=refresh content=3;URL=regclass.asp>"
response.write "<br><br><table cellpadding=0 cellspacing=1 border=0 width=85% bgcolor="&tablebordercolor&" align=center>"&_
"<tr><td><table cellpadding=3 cellspacing=1 border=0 width=""100%"">"&_
"<tr align=center><td width=100% bgcolor="&tabletitlecolor&"><b><FONT COLOR="&TableFontcolor&">状态:登录成功</font></b></td>"&_
"</tr><tr><td width=100% bgcolor="&tablebodycolor2&">"&_
"<FONT COLOR="&TableContentcolor&">登录成功,尚未注册班级<br><ul>"&_
"<li><a href=RegClass.asp><font color="&TableContentcolor&">注册班级</font></a></li>"&_
"</ul></td></tr></table></td></tr></table>"
response.end
end if
set rs1=conn.execute("Select classid from [class] where classid="&clsid)
if rs1.EOF then
Errormsg=Errormsg+"<br>"+"<li>您以前注册的班级不存在或已被删除,请<a href=regclass.asp>重新注册</a>。"
founderr=true
elseif rs("status")=true then
Errormsg=Errormsg+"<br>"+"<li>操作失败!您还没有通过班级管理员的审核。"
Errormsg=Errormsg+"<br>如果你不想等待班级管理员审核,你可以自行<a href=mymodify.asp?action=exitpass>退出审核状态</a>。"
founderr=true
end if
conn.execute("update [class] set visitcount=visitcount+1")
if founderr=true then
call disperrs()
response.end
end if
set rs=nothing
set rs1=nothing
call endconnection()
if instr(request("comeurl"),"register.asp")>0 or instr(request("comeurl"),"login.asp")>0 or instr(request("comeurl"),"chklogin.asp")>0 or trim(request("comeurl"))="" or instr(request("comeurl"),"index.asp")>0 then
response.redirect "myclass.asp"
else
response.redirect request("comeurl")
end if
sub disperrs()
%>
<html><head>
<meta NAME=GENERATOR Content="Microsoft FrontPage 4.0" CHARSET=GB2312>
<title><%=SchoolmateName%>——登录失败</title>
<link rel=stylesheet type=text/css href=txl.css>
</head>
<body alink=#333333 vlink=#333333 link=#333333 topmargin=0>
<br><br>
<table cellpadding=0 cellspacing=0 border=0 width=90% bgcolor=<%=TableborderColor%> align=center>
<tr>
<td>
<table cellpadding=5 cellspacing=1 border=0 width=100%>
<tr align="center">
<td width="100%" bgcolor=<%=TabletitleColor%>><font color="<%=TableFontColor%>"><b>同学录错误信息</b></font></td>
</tr>
<tr>
<td width="100%" bgcolor=<%=TablebodyColor2%> class=mp><font color="<%=TableContentColor%>"><br><b>产生错误的可能原因:</b><br><br>
<li>您是否仔细阅读了<a href=help.asp><font color="<%=TableContentColor%>">帮助文件</font></a>
<%=errormsg%><br><br></font>
</td>
</tr>
<tr align="center">
<td width="100%" bgcolor=<%=TabletitleColor%>>
<a href="javascript:history.go(-1)"><font color="<%=TableFontColor%>"> << 返回上一页</font></a>
</td>
</tr>
</table> </td></tr></table>
<%
end sub
%>
<!--#INCLUDE FILE="footer.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -