default.asp
上传用户:feitengda
上传日期:2022-07-20
资源大小:73k
文件大小:2k
- <!--#include file="conn.asp"-->
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <link href=../css.css rel=STYLESHEET type=text/css>
- </head>
- <body bgcolor="#FFFFCC" text="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <td height="5"></td>
- </tr>
- </table>
- <%
- Select Case request("action")
- Case "login" :login()
- Case Else
- list()
- End Select
- Sub login
- admin_name=Trim(Replace(request("admin_name"),"'",""))
- admin_pass=Trim(Replace(request("admin_pass"),"'",""))
- If admin_name<>"" And admin_pass<>"" Then
- Set rs=conn.execute("select * from [56770_admin] where a_name='"&admin_name&"' and a_pass='"&admin_pass&"'")
- If rs.eof Then
- response.write "<script>alert('用户名或密码错误!~!');window.document.location.href='default.asp';</script>"
- response.End()
- Else
- session("admin_name")=admin_name
- response.redirect "manage.asp"
- End If
- Else
- response.redirect"default.asp"
- response.End()
- End If
- End Sub
- Sub list
- response.write"<table cellspadding='1' cellspacing='1' width='300' align='center' border='0' bgcolor='#E1DEDB'>"&_
- "<form method=post action=default.asp?action=login>"&_
- " <tr><td height=25 align=center colspan=2 bgcolor='#4685CA'>管理员登陆</td></tr>"&_
- " <tr><td width='20%'>用户名</td><td><input name=admin_name size=15 type=text></td></tr>"&_
- " <tr><td width='20%'>密 码</td><td><input name=admin_pass size=15 type=text></td></tr>"&_
- " <tr><td height=25 align=center colspan=2 bgcolor=#4685CA><input type=submit name=button value=登陆></td></tr>"&_
- " </form></table>"
- End Sub
- %>