login.asp

来自「为了开发出适用于中小型企业的通用人才管理软件。对于已备电脑等硬件设备而无人才管理」· ASP 代码 · 共 87 行

ASP
87
字号
<%@ Language=VBScript %>
<% 
Dim strUseName,strPassword,strSql

If Request.QueryString("active")="check" Then
%>
<!--#INCLUDE FILE="inc_Conn.asp" -->
<%
function chkQuoteOk(fString)
	chkQuoteOk = not(InStr(1, fString, "'", 0) > 0)
end function

strUseName=Request.form("UseName")
strPassword=Request.form("Password")

strSql="Select * from Admin where (News_UseName="
strSql=strSql & " '" & strUseName & "'"
strSql=strSql & " and News_PassWord="
strSql=strSql & " '" & strPassword & "'"
strSql=strSql & " and News_Lever=5"
strSql=strSql & ")"

set rs=MyCon.execute(strSql)

If not(rs.EOF) and ChkQuoteOk(strUseName) and ChkQuoteOk(strPassword) and Session("count")<10 Then 
Session("AdminID")=rs("AdminID")
Session(strCookieURL & "www.3rom.com") = "1369852475213" 
%>
<%
Response.redirect "index.asp"
Else
Session("count")=Session("count")+1
%>

<%
Response.redirect "Login.asp"
End If
rs.close
set rs=nothing
MyCon.close
set MyCon=nothing

ElseIf Request.QueryString("active")="Logout" Then
Session.Abandon
Response.redirect "index.asp"
Else
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="VI60_defaultClientScript" content="JavaScript">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Login</title>
<link rel="stylesheet" href="../css.css" type="text/css">
</head>

<body bgcolor="#D6D3CE">

<div align="center">
  <center>
  <form action="Login.asp?active=check" method="POST">
  <table border="1" cellpadding="0" cellspacing="0" width="75%">
    <tr>
      <td width="33%" valign="middle" align="right" nowrap>用户名:</td>
      <td width="33%"><input type="text" name="UseName" size="20"></td>
      <td width="34%"> </td>
    </tr>
    <tr>
      <td width="33%" valign="middle" align="right" nowrap>密&nbsp; 码:</td>
      <td width="33%"><input type="password" name="Password" size="20"></td>
      <td width="34%"> </td>
    </tr>
    <tr>
      <td width="100%" colspan="3" align="center"><input type="submit" value=" 提 交 " name="B1">&nbsp;&nbsp;&nbsp; 
        <input type="reset" value=" 重 置 " name="B2"></td>
    </tr>
  </table>
  </form>
  </center>
</div>

</body>

</html>
<% End If %>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?