📄 index.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<link href="images/css1.css" rel="stylesheet" type="text/css">
<!--#include file="inc.asp"-->
<!--#include file="md5.asp"-->
<title>管理员登录管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<%
dim action,userpsd,userid
action=request("action")
if action="login" then
userid=mfkiqpl.checkstr(mfkiqpl.getstr("textfield1"))
userpsd=mfkiqpl.checkstr(mfkiqpl.getstr("textfield2"))
finderr=false
if userid="" then
finderr=true
errmsg="你的管理员用户为空哦!\r"
end if
if userpsd="" then
finderr=true
errmsg=errmsg&"你的管理员密码为空哦!\r"
end if
if finderr then
mfkiqpl.alert(errmsg)
else
call checklogin
end if
else
%>
<body>
<table width="755" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td width="150" height="400" bgcolor="#FFFFFF"><table width="150" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="54" align="center"><a href="all.asp"><img src="images/mfkbb1.gif" width="137" height="48" border="0"></a></td>
</tr>
<tr>
<td height="54" align="center"><a href="all-1.asp"><img src="images/mfkbb2.gif" width="137" height="48" border="0"></a></td>
</tr>
<tr>
<td height="54" align="center"><a href="all-2.asp"><img src="images/mfkbb3.gif" width="137" height="48" border="0"></a></td>
</tr>
<tr>
<td height="54" align="center"><a href="user.asp"><img src="images/mfkbb4.gif" width="137" height="48" border="0"></a></td>
</tr>
<tr>
<td height="54" align="center"><a href="addlinks.asp"><img src="images/mfkbb5.gif" width="137" height="48" border="0"></a></td>
</tr>
<tr>
<td height="54" align="center"><a href="index.asp"><img src="images/mfkbb6.gif" width="137" height="48" border="0"></a></td>
</tr>
<tr>
<td height="54" align="center"><a href="http://www.yongzi.com" target="_blank"><img src="images/mfkbb7.gif" width="137" height="48" border="0"></a></td>
</tr>
</table></td>
<td width="602" valign="top" bgcolor="#FFFFFF"><table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/mfkbbb5.gif" width="600" height="32"></td>
</tr>
<tr>
<td>
<table width="280" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="77"> </td>
</tr>
</table><table width="282" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="36"><img src="images/mfk1.gif" width="282" height="36"></td>
</tr>
<tr>
<script>
function mfk(){
if(window.event.keyCode==13){
check();
}
}
function check(){
if(form1.textfield1.value=='' || form1.textfield2.value==''){
alert('别开玩笑了,你什么都没填写呢!');
form1.textfield1.focus();
return false;
}
form1.submit();
}
</script>
<td height="89" background="images/mfk3.gif"><table width="249" border="0" align="center" cellpadding="0" cellspacing="0">
<form action="index.asp?action=login" method="post" name="form1" onKeyDown="mfk();">
<tr>
<td width="170" height="26" align="center"><input name="textfield1" type="text" class="inputtext" id="textfield1" onMouseOver="this.focus();" size="12" maxlength="20"></td>
<td width="79" height="26">管理用户</td>
</tr>
<tr>
<td height="26" align="center"><input name="textfield2" type="password" class="inputtext" id="textfield2" onMouseOver="this.focus();" size="12" maxlength="20"></td>
<td height="26">管理密码</td>
</tr>
<tr align="center" valign="bottom">
<td height="25" colspan="2"><img style="cursor:hand; " onClick="check();" src="images/mfk4.gif" onMouseOver="this.src='images/mfk4-1.gif'" onMouseOut="this.src='images/mfk4.gif'"></td>
</tr>
</form>
</table></td>
</tr>
<tr>
<td height="7"><img src="images/mfk2.gif" width="282" height="7"></td>
</tr>
</table><%
end if
sub checklogin
finderr=false
mfkiqpl.openmdb
set rs=conn.execute("select * from admin where adminid='"&userid&"'")
if rs.eof or rs.bof then
finderr=true
errmsg="你的管理员用户名错误!\r"
else
if rs("adminpsd")<>md5(userpsd) then
finderr=true
errmsg=errmsg&"你的管理员密码错误!\r"
end if
end if
mfkiqpl.closers(rs)
mfkiqpl.closeconn
if finderr then
mfkiqpl.alert(errmsg)
else
session("admin")="mfkiqpl"
response.Redirect("admin-2.asp")
end if
end sub
%> </td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -