?? login.asp
字號:
<!--#include file=conn.asp-->
<html>
<head>
<title>新聞發(fā)布統(tǒng)后臺登錄</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style.css" rel="stylesheet" type="text/css">
</head>
<body style="cursor:url(../images/2.gif)"><br><br><br>
<%
if request("Submit")="登 錄" then
dim admin,password
admin=trim(request("admin"))
password=trim(request("password"))
rs.Open "select * from admin where name='"&admin&"' and pwd='"&password&"'",conn,1,1
if not rs.eof then
session("admin")=trim(rs("name"))
session.Timeout=20
rs.Close
set rs=nothing
response.Redirect "main.asp"
else
response.write "<script LANGUAGE='javascript'>alert('對不起,登錄失敗!');history.go(-1);</script>"
end if
end if
%>
<form name="admininfo" method="post" action="login.asp">
<table width="250" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#6699cc" height="147">
<tr>
<td align="center" height="24" bgcolor="#4682b4"><font size="+1" color="#00bfff">管理員登錄</font></td>
</tr>
<tr bgcolor="#00bbff">
<td height="110">
<table width="178" border="1" bgcolor="#FFFFFF" align="center" cellpadding="1" cellspacing="1">
<tr bgcolor="#FFFFFF">
<td width="54">管理員:</td>
<td width="117"><input name="admin" type="text" id="admin" size="16" class="style2"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>密 碼:</td>
<td><input name="password" type="password" id="password" size="16" class="style2"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="2" align="center"><br><input onClick="return check();" type="submit" name="Submit" value="登 錄" class="button">
<input type="reset" name="Submit2" value="清 除" class="button" >
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td color="00bfff" height="20">
<p align="center">新聞發(fā)布系統(tǒng)后臺管理</td>
</tr>
</table>
</form>
</body>
</html>
<script LANGUAGE="javascript">
<!--
function checkspace(checkstr) {
var str = '';
for(i = 0; i < checkstr.length; i++) {
str = str + ' ';
}
return (str == checkstr);
}
function check()
{
if(checkspace(document.admininfo.admin.value)) {
document.admininfo.admin.focus();
alert("管理員用戶名不能為空!");
return false;
}
if(checkspace(document.admininfo.password.value)) {
document.admininfo.password.focus();
alert("密碼不能為空!");
return false;
}
document.admininfo.submit();
}
//-->
</script>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -