📄 btbbs_fun.asp
字号:
<%
Dim fileStreamObj,textStream,rs_fl
if Request.ServerVariables("HTTP_X_FORWARDED_FOR")="" then youipdress=Request.ServerVariables("REMOTE_ADDR") else youipdress=Request.ServerVariables("HTTP_X_FORWARDED_FOR") end if
if VarType(Application(BBSname&"LockIP"))=0 or Application(BBSname&"LockIP")="" then
Set rs_lockip=conn.execute("select IpDress from LockIP ")
if rs_lockip.bof and rs_lockip.eof then
Application(BBSname&"LockIP")="NO"
else
Application(BBSname&"LockIP")=""
while not rs_lockip.eof
Application(BBSname&"LockIP")=Application(BBSname&"LockIP")+rs_lockip("IpDress")+"|"
rs_lockip.movenext
wend
end if
rs_lockip.close
set rs_lockip=nothing
end if
if Application(BBSname&"LockIP")<>"NO" then
if Instr(1,Application(BBSname&"LockIP"),youipdress)<>0 then Response.Redirect "../Board/IpLock.html" end if
end if
'Response.Write Application(BBSname&"LockIP")
Function Login_EN() '登入快捷窗口
if login="Y" then
username=Request.Cookies("username")
Response.Write "<center><table width=760><tr><td>欢迎你 "&username&" <a href=exit.asp>重登陆</a> <img src=../images/splt.gif height=10> <a href=search.asp>检索</a><SCRIPT language=javascript>menu()</script> <a href=logout.asp>退出</a></td></tr></table>"
else
Response.Write "<center><table width=760><tr><td valign=center><a href=reg.asp>注册</a> <img src=../images/splt.gif height=10> <a href=exit.asp>登陆</a> <img src=../images/splt.gif height=10> <a href=search.asp>检索</a><SCRIPT language=javascript>menu()</script></td></tr></table>"
Response.Write "<table width=760 border=0 cellspacing=0 cellpadding=0 align=center class=table1><tr><td height=40 class=light0 valign=center>"
Response.Write "<form name=login method=post action=login.asp?loginwz=wz>"
Response.Write " 有效期 <Select name=CkiExp><option value=-1>无效<option value=365>一年<option value=1>一天<option value=2>两天<option value=7>一周<option value=31>一月</select> "
Response.Write " 用户名 <INPUT class=fminpt name=username type=text size=10>"
Response.Write " 密码 <INPUT class=fminpt name=password type=password size=10>"
Response.Write " <input type=Submit value=登陆 name=userlogin>"
Response.Write " [<a href=GetPass.asp>忘记密码了</a>] [<a href=reg.asp>新用户注册</a>]"
Response.Write "</td></tr></table>"
end if
End Function
Function BT_Board()
if VarType(Application(BBSname&"BT_Board"))=0 then
Set rs_fl=conn.execute("select id,所属分类ID,所属分类,版面名称,版面状态,访问控制,版面介绍,版主,主题总数,回复总数,版面标记图片,版面最后发帖,认证论坛用户 from 版面分类 Order by OrderID ")
if not (rs_fl.bof and rs_fl.eof) then Application(BBSname&"BT_Board")=rs_fl.GetRows(-1) end if
rs_fl.close
set rs_fl=nothing
AccessNum=AccessNum+1
else
if Application(BBSname&"BT_Board")(1,0)=-1 then
Set rs_fl=conn.execute("select id,所属分类ID,所属分类,版面名称,版面状态,访问控制,版面介绍,版主,主题总数,回复总数,版面标记图片,版面最后发帖,认证论坛用户 from 版面分类 Order by OrderID ")
if not (rs_fl.bof and rs_fl.eof) then Application(BBSname&"BT_Board")=rs_fl.GetRows(-1) end if
rs_fl.close
set rs_fl=nothing
AccessNum=AccessNum+1
end if
end if
End Function
Function BT_Board_GX()
Set rs_fl=conn.execute("select id,所属分类ID,所属分类,版面名称,版面状态,访问控制,版面介绍,版主,主题总数,回复总数,版面标记图片,版面最后发帖,认证论坛用户 from 版面分类 Order by OrderID ")
if not (rs_fl.bof and rs_fl.eof) then Application(BBSname&"BT_Board")=rs_fl.GetRows(-1) end if
rs_fl.close
set rs_fl=nothing
AccessNum=AccessNum+1
End Function
Function JCC_Board_Top()
if Application(BBSname&"TOP")="" then
DIM TopName
Const ForReading = 1
Const Forwriting = 2
Const ForAppending = 8
TopName = Server.MapPath("../inc/Top1.inc")
set fileStreamObj = CreateObject("Scripting.FileSystemObject")
set textStream = fileStreamObj.OpenTextFile(TopName,ForReading,False)
TopName=textStream.ReadAll()
textStream.Close()
set fileStreamObj=nothing
set textStream=nothing
Response.Write TopName
Application(BBSname&"TOP")=TopName
else
Response.Write Application(BBSname&"TOP")
end if
End Function
Function BT_SF()
if Request.Cookies("login")="Y" and Request.Cookies("username")<>"" and instr(1,Application(BBSname&"Online"),Request.Cookies("username"))>0 then
BT_SF="Y"
else
BT_SF="N"
end if
End Function
Function Pagination(PageCount,BoardID)
Dim WzPage,WzPageCount,PageNum
'BoardID = Request.QueryString("Board_ID")
If BoardID = 0 Then BoardID = 1
If Len(Request("Page"))<>0 Then
WzPage = Clng(Request("Page"))
Else
WzPage =1
End If
If WzPage <= 0 Then WzPage =1
PageNum = (WzPage \ 10)*10+1
If WzPage Mod 10 = 0 Then PageNum = (WzPage \ 10)*10-9
Response.Write ("<font face=""Webdings"">")
Response.Write ("<a href=""?BoardId="& BoardID &"&Page=1"" title=""首页"">9</a>")
Response.Write ("<a href=""?BoardId="& BoardID &"&Page="& PageNum-1 &""" title=""前十页"">7</a>")
Response.Write ("</font>")
For PageNum = PageNum TO PageNum + 9
If PageNum = WzPage Then
Response.Write ("<font color=""#FF0000"">")
Response.Write (" ["& PageNum &"] ")
Response.Write ("</font>")
Else
Response.Write (" <a href=""?BoardId="& BoardID &"&Page="& PageNum &""">")
Response.Write ("["& PageNum &"]")
Response.Write ("</a> ")
End If
If PageNum >= PageCount Then Exit For
Next
Response.Write ("<font face=""Webdings"">")
Response.Write ("<a href=""?BoardId="& BoardID &"&Page="& PageNum &""" title=""后十页"">8</a>")
Response.Write ("<a href=""?BoardId="& BoardID &"&Page="& PageCount &""" title=""末页"">:</a>")
Response.Write ("</font>")
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -