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

📄 index.asp

📁 图书馆管理
💻 ASP
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb18030" />
<title>张涛工作室-asp图书管理系统3.0</title>
<link href="css.css" rel="stylesheet" type="text/css" /><script type="text/javascript">
function checklogin(){
if (document.form1.username.value==''){
alert('请输入用户名');
document.form1.username.focus()
document.form1.username.select();
return false;
}
if (document.form1.password.value==''){
alert('请输入密码');
document.form1.password.focus()
document.form1.password.select();
return false;
}
}
</script>

<!--#include file="md5.asp" -->
<!--#include file="conn.asp" -->
<style type="text/css">
<!--
.STYLE1 {
	color: #FF0000;
	font-weight: bold;
}
.STYLE3 {color: #000000}
-->
</style>
</head>

<body>
<p>&nbsp;</p>
<style type="text/css">
body { background:#fff; background-image : url("skins/images/body_bg.gif");background-repeat: repeat-x ;  }
td { font-size:12px;}
input { border:1px solid #999; }
.button { color: #135294; border:1px solid #666; height:21px; line-height:18px; background:url("images/button_bg.gif")}
div#nifty{margin: 0 10%;background: #ABD4EF;width: 420px;word-break:break-all; margin-top:60px;}
b.rtop, b.rbottom{display:block;background: #FFF}
b.rtop b, b.rbottom b{display:block;height: 1px;overflow: hidden; background: #ABD4EF}
b.r1{margin: 0 5px}
b.r2{margin: 0 3px}
b.r3{margin: 0 2px}
b.rtop b.r4, b.rbottom b.r4{margin: 0 1px;height: 2px}
</style>
<center>
<div id="nifty">
<b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b>
<div class="STYLE1" style="width:403px; height:26px; line-height:26px; background:none; font-size:12px; text-align:left;"> 
  <div align="center">图书管理系统 -- 管理登录</div>
</div>
<div style="width:403px; height:46px; background:#166CA3;"><img src="images/login.gif" alt="" /></div>
<div style="width:401px !important; width:403px; height:96px; background:#fff; border-left:1px solid #649EB2; border-right:1px solid #649EB2; ">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="3">
<form action="Index.asp?action=chkuser" method="post"  name="form1" id="form1">
	<tr>
		<td width="15%" align="right"><div align="left"><b>用户名</b><b>:</b></div></td>
		<td width="85%">
		  <div align="left">
		    <input name="username" type="text" class="input" id="username" size="20" />
	      </div></td>
	</tr>
	<tr>
		<td align="right"><div align="left"><b>密 码</b><b>:</b></div></td>
		<td>
		  <div align="left">
		    <input name="password" type="password" class="input" id="password" size="20" />
	      </div></td>
	</tr>
	<tr>
	<tr>
	<td align="right"></td>
	<td> <div align="left">
	  <input type="submit" name="button" id="button" value="登录" onclick="return checklogin();" />
	  <input type="button" name="button2" id="button2" value="关闭" onclick="window.close();" />
	  </div></td>
	</tr>
  </form>
</table>
</div>
<div style="width:401px !important; width:403px; height:50px; background:#F7F7E7; border:1px solid #649EB2; border-top:1px solid #ddd; margin-bottom:5px; font-size:12px; line-height:20px; ">图书管理系统:ASP +Access版3.0 <span class="STYLE3">QQ:11156530 
<br />
    程序开发: 张涛
</span></div>
<b class="rbottom"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b>
</div>
<p>&nbsp;</p>

<%
dim action
action=trim(request.QueryString("action"))
if action="chkuser" then
dim password,username
username=request.Form("username")
password=request.Form("password")
password=md5(password,16)
set rs=conn.execute("select * from manager where userid='"&username&"' and password='"&password&"'")
if not rs.eof then
session("username")=rs("userid")
session("userid")=rs("id")
  if rs("isadmin")=true then
    session("isadmin")="admin"
  end if	
response.Write "<script>alert(' 登录成功! \n\n 欢迎使用图书管理系统。');window.location.href='main.asp';</script>"
else
response.Write "<script>alert(' 密码错误! \n\n 请重试! ');window.location.href='index.asp';</script>"
end if
end if
%>
</body>
</html>

⌨️ 快捷键说明

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