?? login.asp
字號:
<!-- #include file="../include/bkconn.asp" -->
<%
session("userright")=0
if Request("userID")<>"" then
sql="select * from users where userID='" & trim(request("userID")) & "' and Password='" & replace(trim(request("password")),"'","''") & "'"
'response.write sql
'response.End
set rs = conn.Execute(sql)
if not (rs.eof or err) then
session("userID")=rs("userID")
session("userClass")=1
if rs("right")=1 then session("userright")=1
response.redirect "default.asp"
else
%>
<script language=Javascript>
alert("錯誤!請重新輸入");
window.history.go(-1);
</script>
<%
end if
else
%>
<html>
<head>
<title>后臺管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language=Javascript>
<!--
function setFocus(){
form1.userID.focus();
}
//-->
</script>
<link rel="stylesheet" href="../main.css" type="text/css">
</head>
<body bgcolor="#9CC7EF" text="#000000" onload="setFocus()">
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<form method="post" action="login.asp" name="form1">
<table width="40%" border="1" bordercolordark=#9CC7EF bordercolorlight=#145AA0 cellspacing="0" cellpadding="3" align="center">
<tr>
<td colspan="2" height="28" bgcolor="#73B2EF">
<div align="center"><font color="#FFFFFF">登陸系統(tǒng)</font></div>
</td>
</tr>
<tr>
<td width="34%">
<div align="right">管理員帳號</div>
</td>
<td width="66%">
<input type="text" name="userID" size="20">
</td>
</tr>
<tr>
<td width="34%">
<div align="right">管理員密碼</div>
</td>
<td width="66%">
<input type="password" name="password" size="20" value="">
</td>
</tr>
<tr>
<td colspan="2" height="28" bgcolor="#73B2EF">
<div align="center">
<input type="submit" name="Submit" value="登陸">
</div>
</td>
</tr>
</table>
</form>
</body>
</html>
<%end if %>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -