📄 login.asp
字号:
<%Response.Buffer=true%>
<html>
<head>
<title></title>
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--
function B1_onclick() {
if ( frmsend.pass.value==""){
alert("密码不能为空!");
return false;
}else{
frmsend.submit();
return true;
}
}
//-->
</SCRIPT>
</head>
<body bgcolor="#ccffff">
<%LogTime=Now()%> <%Num1=Cstr(Hour(LogTime)) & Cstr(Minute(LogTime)) & Cstr(Second(LogTime))& Cstr(Int(Rnd*10000))%>
<form method="POST" name=frmsend action="login.asp">
<div align="center">
<input type="hidden" name="name" size="20" value="BBS管理员">
<input type="hidden" name="No" value=<%=Num1%>>
<font size="6">管理员登陆 </font></div>
<table border="0" cellpadding="0" cellspacing="0" width="382"
height="128" bgcolor="#FFCCFF" align="center">
<tr align="center">
<td colspan="3" height="15"> </td>
</tr>
<tr>
<td width="88" height="35" nowrap align="center">请输入密码:</td>
<td height="35" width="150">
<input type="password" name="pass" size="20">
</td>
</tr>
<tr align="center">
<td width="88" height="28">
<input type="submit" value="登陆" name="B1" LANGUAGE=javascript onclick="return B1_onclick()">
</td>
<td height="56" width="150">
<input type="reset" value="重填" name="B2">
</td>
<td height="56" width="144">
<input type="button" name="Button" value="注册管理员" onclick="javascript:window.location.href='save1.asp'">
</td>
</tr>
<tr align="center">
<td colspan="3" height="14"> </td>
</tr>
</table>
<table width="257" border="0" cellspacing="0" cellpadding="0" align="right">
<tr>
<td> </td>
</tr>
<tr>
<td>
<input type="submit" name="Submit" value="返回" onClick="window.history.go(-1)">
</td>
</tr>
</table>
</form>
</body>
</html>
<%
Set Conn=Server.CreateObject("ADODB.Connection")
Connstr="DBQ="+server.mappath("bbsdb.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;ImplicitCommitSync=Yes;MaxBufferSize=512;MaxScanRows=8;PageTimeout=5;SafeTransactions=0;Threads=3;UserCommitSync=Yes;"
Conn.Open connstr
%> <%
B1=Request("B1")
'response.write B1
If B1="登陆" Then
sql="SELECT * FROM user WHERE username='" &trim( Request("name")) & "'"
Set Rs=conn.Execute(sql)
If Rs.Eof Then
%>
<script language=javascript>
<!--
alert("管理员尚未注册,请先注册管理员");
//-->
</script>
<%
Else
If Request("pass")<>Rs("pwd") Then
%>
<script language=javascript>
<!--
alert("口令不对!");
//-->
</script>
<%
else%> <%sql="UPDATE user SET pois=" & Request("No") & " WHERE username='" & Request("name") & "'"
conn.Execute sql
conn.close%> <%Response.Redirect "save0.asp?No=" & Request("No") & " "%> <%End If
End If
End If
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -