📄 default.asp
字号:
<%Response.Buffer=true%>
<html>
<head>
<title></title>
<body bgcolor="#CCFFFF">
<%LogTime=Now()%> <%Num1=Cstr(Hour(LogTime)) & Cstr(Minute(LogTime)) & Cstr(Second(LogTime))& Cstr(Int(Rnd*10000))%>
<form method="POST" action="default.asp">
<div align="center"><font size="6" color="#FF0000"><strong><font color="#CC3366">BBS登陆</font></strong></font></div>
<table border="0" cellpadding="0" cellspacing="0" width="328"
height="15" bgcolor="#FFCCFF" align="center">
<tr>
<td colspan="4" height="21"> </td>
</tr>
<tr>
<td width="111" height="1" align="center" nowrap>用 户 名:</td>
<td height="2" colspan="3">
<input type="text" name="name" size="20">
</td>
</tr>
<tr>
<td width="111" height="31" align="center" nowrap>用户密码:</td>
<td height="31" colspan="3">
<input type="password" name="pass" size="20">
<input type="hidden" name="No" value=<%=Num1%>>
</td>
</tr>
<tr>
<td width="111" height="48" align="center">
<input type="submit" value="登陆论坛" name="B1">
</td>
<td width="94" height="48" valign="middle" nowrap align="center">
<input type="reset" value="删除重写" name="B2">
</td>
<td width="123" height="48" valign="middle" nowrap align="center"> </td>
</tr>
<tr>
<td height="4" colspan="5"> </td>
</tr>
</table>
</form>
<%
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")
If B1="登陆论坛" Then
sql="SELECT * FROM user WHERE username='" & Request("name") & "'"
Set Rs=conn.Execute(sql)
If Rs.Bof OR Rs.Eof Then
%>
<script language=javascript>
<!--
alert("非法用户,请你注册为新用户!");
//-->
</script>
<%
Else
If Request("pass")<>Rs("pwd") Then
Response.Write "口令出错,请检查是否大小写不对。<br>"
else%> <%sql="UPDATE user SET pois=" & Request("No") & " WHERE username='" & Request("name") & "'"
conn.Execute sql
conn.close%> <%Response.Redirect "look.asp?No=" & Request("No") & " "%> <%End If
End If
End If
%>
<div align="center"><a href="fuser.asp">注册新用户</a> <a href="login.asp">管理员入口</a>
(管理员的密码为321,利用时可以修改) </div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -