chklogin.asp
来自「Activity——活动管理模块 Analyse——分析模块 Client—」· ASP 代码 · 共 57 行
ASP
57 行
<%
'*****************************************************
' Author : Jianfeng Hua
' Date : 2004.8.5
' File : ChkLogin.asp
' Description : Checks user's password
'*****************************************************
%>
<!--#include file="conn.asp"-->
<%
UserName=request("operator_name")
UserPass=replace(request("operator_pwd"),"'","''")
set rs = conn.execute("select * from [User] where UserName='"&UserName&"' and UserPass='"&UserPass&"'")
if not (rs.bof or rs.eof) then
session.timeout = 50
session("Session_User")=rs("UserID")
rs.close
set rs = nothing
%>
<HTML><HEAD><TITLE>用户登录</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK
href="css.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff leftMargin=0 topMargin=0>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align=center>
<tr>
<td width="100%" height="197" align="center">
<table border="0" cellspacing="0" cellpadding="0" height="85" bgcolor="#99ccff" width="100%">
<tr>
<td align="center">
<a>登录成功!!</a>
<script>
setTimeout("location.replace('menu.asp')",2000)
</script>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>
</BODY></HTML>
<%
else
response.write "<script language=javascript>"
response.write"alert('用户密码错误!');"
response.write"location.href='index.asp';"
response.write "</script>"
end if
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?