⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.asp

📁 企业办公管理系统 ODBC名称 ASPData 登录用户和密码 xxp xxp
💻 ASP
字号:
<%@ Language=VBScript %>
<HTML>
	<HEAD>
		<title>系统登录</title>
		<%
'判断用户是否提交表单
if isempty(Request.Form("Login")) then  
Session.abandon
Session("NumAttempts") = 1
TheMessage = "请在下面登录:(缺省管理员用户名:xxp,密码:xxp)"
'校验用户提交的用户信息
else
set conn = server.createobject ("adodb.connection") 
conn.open "ASPData", "sa", "yourpassword"
TheUsername=Request.Form("Username")
ThePassword=Request.Form("Password")
If Instr(TheUsername, "'")=0 and Instr(ThePassword, "'")=0 and Instr(TheUsername, "'")=0 _
 and Instr(ThePassword, "'")=0 then
set RSLogin = conn.Execute("select * from PSLogins where " & "LoginID = '" _
           & TheUsername & "' and " & "Password = '" & ThePassword & "'")
if RSLogin.EOF then
Session("NumAttempts") = Session("NumAttempts") + 1
if Application("NumAttempts") = 0 then
TheMessage = "登录不成功,请重试:"
elseif Session("NumAttempts") > Application("NumAttempts") then
TheMessage = "登录不成功,登录次数已满,无法重试"
else
TheTimes=Application("NumAttempts")-Session("NumAttempts")+1
TheMessage = "登录不成功,还有" & TheTimes & "次机会,请重试:"
end if
else
Session("ID") = RSLogin("LoginID")
		Application("ID") = RSLogin("LoginID")		
		Session("Name") = RSLogin("Name")
		Session("Password") = RSLogin("Password")
		Session("Department") = RSLogin("Department")
		Session("EmailAddress")=RSLogin("EmailAddress")
		Session("Position")=RSLogin("Position")
		Session("InternalPhone")=RSLogin("InternalPhone")
		Session("HomePhone")=RSLogin("HomePhone")
		Session("MobilePhone")=RSLogin("MobilePhone")
		Session("QQ")=RSLogin("QQ")
		Session("Birthday")=RSLogin("Birthday")
		Session("HomeAddress")=RSLogin("HomeAddress")
		Session("IsSystemManager")=RSLogin("IsSystemManager")
		Session("IsFinancialManager")=RSLogin("IsFinancialManager")
		Response.Redirect "./html/home.asp"
end if
else
TheMessage="用户名或者密码输入不合格式"	
end if
end if
%>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
		<script id="clientEventHandlersJS" language="javascript">
<!--

function Password1_onblur() {

}

//-->
		</script>
	</HEAD>
	<body>
		<table width="800" border="0" bgcolor="#164da8" cellspacing="1" cellpadding="2" align="center">
			<tr bgcolor="white">
				<td valign="middle"><img src="../ASPLogo3.jpg" width="796" height="100"></td>
			</tr>
		</table>
		<table width="800" border="0" bordercolor="#164da8" align="center" cellpadding="0" cellspacing="0">
			<tr>
				<td height="13"><img src=".././image/banner2.jpg" width="800" height="12"></td>
			</tr>
		</table>
		<table width="800" border="0" bgcolor="#164da8" cellspacing="1" cellpadding="2" align="center">
			<tr>
				<td colspan="3">
					<font color="white">
						<P ALIGN="center">
						公司内部办公信息管理系统-&gt;登录页面</font></P></td>
			</tr>
			<tr bgcolor="white">
				<td><a href=".././html/home.asp"><font color="#104dad">返回上一站点</font></a></td>
				<td align="center">
					<font color="#104dad">
						<% response.write TheMessage %>
					</font>
				</td>
				<td align="right"><a href="Login.asp"><font color="#104dad">系统使用说明</font></a></td>
			</tr>
		</table>
		<table width="800" border="0" bordercolor="#164da8" align="center" cellpadding="0" cellspacing="0">
			<tr>
				<td height="13"><img src=".././image/banner2.jpg" width="800" height="12"></td>
			</tr>
		</table>
		<br>
		<table width="800" border="0" align="center" bgcolor="#3466bb" height="350">
			<tr bgcolor="white">
				<td align="center" bgcolor="#b6caeb" class="itm" height="8" colspan="2">
					<br>
					<% response.write TheMessage %>
					<div align="center">
						<%
 if TheMessage <> "登录不成功,登录次数已满,无法重试" then
 %>
						<form name="form" method="post" action="login.asp">
							<p><font color="#3466bb">用户</font>&nbsp; <input class="itm" name="UserName" size="15" id="Text1">
							</p>
							<p><font color="#3466bb">口令</font>&nbsp; <input class="itm" name="Password" size="15" type="password" id="Password1" onblur="return Password1_onblur()">
								<br>
								<br>
								<input type="submit" name="Login" value="登录" style="BORDER-RIGHT: #b6caeb 1px solid; BORDER-TOP: #b6caeb 1px solid; BORDER-LEFT: #b6caeb 1px solid; COLOR: #ffffff; BORDER-BOTTOM: #b6caeb 1px solid; BACKGROUND-COLOR: #3466bb">&nbsp;
								<input type="reset" name="Reset" value="重设" style="BORDER-RIGHT: #b6caeb 1px solid; BORDER-TOP: #b6caeb 1px solid; BORDER-LEFT: #b6caeb 1px solid; COLOR: #ffffff; BORDER-BOTTOM: #b6caeb 1px solid; BACKGROUND-COLOR: #3466bb">
							</p>
						</form>
						<%
end if
%>
					</div>
				</td>
			</tr>
		</table>
	</body>
</HTML>

⌨️ 快捷键说明

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