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

📄 login.asp

📁 一个互联网络公司网站源码
💻 ASP
字号:
<!--#include file="conn.asp" -->
<%
	session.Timeout="30"
	if request.Form("btnlogin")="登录" then
	username=request.Form("username")
	pwd=request.Form("password")
	sql="select LoginID,UserName,manager from [user] where LoginID = '"&username&"' and Password = '"&pwd&"'"
'	response.Write(sql)
'	response.End()
	set rs=server.CreateObject("adodb.recordset")
	rs.open sql,conn,1,1
	if not rs.eof then
	session("LoginID")=rs("LoginID")
	session("UserName")=rs("UserName")
	Session("flag")=rs("manager")
	response.Redirect("index.asp")
	else
	end if
	end if
%>
<HTML>
  <HEAD>
		<TITLE>办公自动化系统</TITLE>
		<META http-equiv="Content-Type" content="text/html; charset=gb2312">
		<script src="js/js.js" language="javascript"></script>
  <style>
  body,td {
	font-size:12px;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;	
	padding: 1px 1px 1px;
	}
input {
	height:18px;
	border-color:#CCCCCC;
	border-style:solid;
	border-width:1px;
	width:130px;
}
  </style>
  </HEAD>
  <BODY bgColor="#619bd8" leftMargin="0" topMargin="0" scroll="no" onLoad="document.all.username.focus();">
		<DIV align="center">
			<CENTER>
				<TABLE cellSpacing="0" cellPadding="0" border="0">
					<TBODY>
						<TR>
							<TD vAlign="bottom" height="80"></TD>
						</TR>
						<TR>
							<TD>
								<TABLE class="OfficeLogin" height="200" cellSpacing="0" cellPadding="0" width="100%" bgColor="gainsboro" border="0">
									<TBODY>
										<TR>
											<TD>
												<TABLE height="150" cellSpacing="0" cellPadding="0" width="100%" border="0">
													<TBODY>
														<TR>
															<TD width="5" height="5"></TD>
															<TD height="5"></TD>
															<TD width="5" height="5"></TD>
														</TR>
														<TR>
															<TD width="5" height="5"></TD>
															<TD width="100"><IMG src="images/login_win.gif" width="360" height="170"></TD>
															<TD width="5" height="5"></TD>
														</TR>
														<TR>
															<TD width="5" height="5"></TD>
															<TD height="5"></TD>
															<TD width="5" height="5"></TD>
														</TR>
													</TBODY></TABLE>
											</TD>
										</TR>
										<TR>
											<TD align="middle">
												<form name="login" method="post" action="login.asp" id="login">
													<TABLE width="100%" height="120" border="0" cellPadding="0" cellSpacing="0">
														<TBODY>
															<TR>
																<TD height="10">&nbsp;</TD>
																<TD width="250"></TD>
															</TR>
															<TR>
																<TD align="right" height="30">用户名:</TD>
																<TD width="250"><input name="username" AUTOCOMPLETE="off" type="text" id="username" class="inputNormal" style="width:110px; height:24px; border-color:#619BD8; font-size:14px; color:#586DCA" onChange="if (this.value=='') document.all.s_uname.style.display='';else document.all.s_uname.style.display='none'" /><span id="s_uname" style="display:none; color:#FF0000"> * 用户名不能为空</span></TD>
															</TR>
															<TR>
																<TD align="right" height="30">密&nbsp;&nbsp;码:</TD>
																<TD width="250"><input name="password" type="password" id="password" class="inputNormal" style="width:110px; height:24px; border-color:#619BD8;"  onchange="if (this.value=='') document.all.s_pwd.style.display='';else document.all.s_pwd.style.display='none'" /><span id="s_pwd" style="display:none; color:#FF0000"> * 密码不能为空</span></TD>
															</TR>
															<TR>
																<TD align="right" colSpan="2" height="18">
																	<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
																		<TBODY>
																			<TR>
																				<TD colspan="5">																				</TD>
																			</TR>
																			<TR align="middle">
																				<TD width="55%" align="right"><input type="submit" name="btnlogin" style="width:70px; border-width:1px; border-color:#619BD8; height:30px; border-style:outset;" onClick="return check()" value="登录" /></TD>
																			    <TD width="45%" align="middle">&nbsp;</TD>
																			</TR>
																		</TBODY></TABLE>
																</TD>
															</TR>
												  </TBODY></TABLE>
<script>
function check(){
	if (document.all.username.value==""){
		document.all.s_uname.style.display="";
		document.all.username.focus();
		return false;
	}
	if (document.all.password.value==""){
		document.all.s_pwd.style.display="";
		document.all.password.focus();
		return false;
	}
}
</script>
		</form>
											</TD>
										</TR>
									</TBODY></TABLE>
							</TD>
						</TR>
			  </TBODY></TABLE>
			</CENTER>
		</DIV>
	</BODY>
</HTML>

⌨️ 快捷键说明

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