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

📄 admin_login.asp

📁 一个有用的东西 希望大家喜欢 谢谢大家对本站的支持
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<!--#include file="system/md5.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
function check(){
if(form1.textfield.value=='' || form1.textfield2.value==''){
alert("请检查输入!");
return false;
}
}
</script>
<%
dim action
action=trim(request("action"))
select case action
case "login"
loginok
case ""
login
case "loginout"
loginout
case else
response.Redirect("error.asp?errormsg=<li>错误的执行参数!</li><br><li>请确定你从有效链接进入!</li>")
end select

sub loginout
Session.Abandon
response.Redirect("ok.asp?msg=<li>操作:退出成功!</li><br><li>系统自动返回首页!</li>")
end sub

sub loginok
dim un,up
un=replace(trim(request("textfield")),"'","")
up=replace(trim(request("textfield2")),"'","")
logsql="select username,userpassword from master where username='"&un&"' and id=1"
set logrs=conn.execute(logsql)
if logrs.eof and logrs.bof then
response.Redirect("error.asp?errormsg=<li>错误的用户名!</li><br><li>请返回后重新输入!</li>")
else
if logrs("userpassword")<>md5(up) then
response.Redirect("error.asp?errormsg=<li>错误的用户密码!</li><br><li>请返回后重新输入!</li>")
else
session("admin")="mfkiqpl"
response.redirect("admin_main.asp")
end if
end if
end sub
sub login
response.write("<table width=755 border=0 align=center cellpadding=0 cellspacing=1 bgcolor="&c5&">")
response.write("<form name=form1 method=post action=admin_login.asp?action=login onSubmit='return check();'>")
response.write("<tr bgcolor="&c2&"><td height=24 colspan=2 align=center><table width='112'  border=0 cellspacing=0 cellpadding=0>")
response.write("<tr><td width='13%' align=right><strong><img src=images/mfk16.gif width=16 height=18></strong></td><td width='87%'><strong>  身 份 验 证</strong></td>")
response.write("</tr></table></td></tr><tr bgcolor="&c4&"><td width=323 height=28 align=right><img src=images/mfk15.gif width=16 height=16> 用 户:</td>")
response.write("<td width=429 height=24 bgcolor="&c4&"> ")
response.write("  <input name=textfield type=text size=18  onmouseover='this.focus();'></td>")
response.write("</tr><tr bgcolor="&c3&"><td height=28 align=right bgcolor="&c4&"><img src=images/mfk14.gif width=15 height=16> 密 码:</td>")
response.write("<td height=28 bgcolor="&c4&"> ")
response.write("  <input name=textfield2 type=password size=18 onmouseover='this.focus();'></td>")
response.write("</tr><tr align=center bgcolor="&c4&">")
response.write("<td height=30 colspan=2><input type=submit name=Submit value='登 录'>   <input type=reset name=Submit2 value='取 消'></td>")
response.write("</tr></form></table>")
end sub
response.write("<table width='755' border='0' align='center' cellpadding='0' cellspacing='0'><tr><td height='5'></td></tr></table>")
%>

⌨️ 快捷键说明

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