📄 bbslib.asp
字号:
'end if
'Query.Close
'set Query = nothing
Database.Execute("insert into LY (NC,ID,NR,ZT,SJ,LB) values ('"&GetPart(cmd,1)&"',"&Request.Cookies("ID")&","&"'"&midb(GetPart(cmd,2),1,500)&"',0,'"&ConvertDateTime(Now())&"',0)")
'Database.Execute("update HY set TL=TL-"&Application("LYTL")&" where ID="&Request.Cookies("ID")&" and (JYZ<2000 or ML<0)")
Fun201 = "0"
end function
function Fun202(cmd)
Database.Execute("delete from LY where NC='"&Request.Cookies("NC")&"' and ZT=1")
Fun202 = "0"
end function
function Fun203(cmd)
Database.Execute("delete from LY where XH="&GetPart(cmd,1))
Fun203 = "0"
end function
function Fun204(cmd)
if Request.Cookies("NC")="" or Request.Cookies("NC")="访客" then
Fun204 = "1|你不是注册会员,无法送礼!"
exit function
end if
Database.Execute("insert into LY (NC,ID,NR,ZT,SJ,LB) values ('"&GetPart(cmd,1)&"',"&Request.Cookies("ID")&","&"'"&midb(GetPart(cmd,2),1,500)&"',0,'"&ConvertDateTime(Now())&"',1)")
Database.Execute("update HY set ML=ML+"&GetPart(cmd,3)&" where NC='"&GetPart(cmd,1)&"'")
Fun204 = "0"
end function
function Fun300(cmd)
Dim buf
ReDim buf(Int(Application("MYLMS")))
Dim i,page,sql,Query,total
set Query = Server.CreateObject("ADODB.Recordset")
if not isNumeric(GetPart(cmd,2)) then
page = 1
else
page = Int(GetPart(cmd,2))
end if
sql = "select "&IIF(page >= 0,"top "&page*Int(Application("MYLMS")),"")&" ID,MC,JS,BZ,FBZ1,FBZ2,FBZ3,FBZ4,FWS,ZJFBSJ,ZJFB,ZT,(select COUNT(ID) from WZ where SSLM=LM.ID) AS ZTSL from LM where ZTS="&GetPart(cmd,1)&" order by CJSJ "
Query.Open sql,Database,1,1
if Query.Bof then
buf(0) = "0|0"
Query.Close
set Query = nothing
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select XX from LMFL where ID="&GetPart(cmd,1)
Query.Open sql,Database
if not Query.Bof then
buf(0) = buf(0)&"|"&GetPart(cmd,1)&"|"&Query("XX")
end if
Fun300 = buf
Query.Close
set Query = nothing
exit function
end if
if page >= 0 then
Query.Move (page-1)*Int(Application("MYLMS"))
else
total = Query.RecordCount
if total > Int(Application("MYLMS")) then
Query.Move total-Int(Application("MYLMS"))
end if
end if
for i=1 to Int(Application("MYLMS"))
if Query.Eof or Query.Bof then
exit for
end if
buf(i) = Query("ID")&"|"&trim(Query("MC"))&"|"&trim(Query("JS"))&"|"&trim(Query("BZ"))&" "&trim(Query("FBZ1"))&" "&trim(Query("FBZ2"))&" "&trim(Query("FBZ3"))&" "&trim(Query("FBZ4"))&"|"&Query("ZTSL")&"|"&Query("FWS")&"|"&ConvertDateTime(Query("ZJFBSJ"))&"|"&trim(Query("ZJFB"))&"|"&Query("ZT")
Query.MoveNext
next
Query.Close
set Query = nothing
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select COUNT(ID) AS SL from LM where ZTS="&GetPart(cmd,1)
Query.Open sql,Database
buf(0) = "0"&"|"&Query("SL")
Query.Close
set Query = nothing
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select XX from LMFL where ID="&GetPart(cmd,1)
Query.Open sql,Database
if not Query.Bof then
buf(0) = buf(0)&"|"&GetPart(cmd,1)&"|"&Query("XX")
end if
Fun300 = buf
Query.Close
set Query = nothing
end function
function Fun3000(cmd)
set Query = Server.CreateObject("ADODB.Recordset")
Query.ActiveConnection = Database
Query.CursorType = 3
Query.CacheSize = 50
Query.PageSize = 50
Query.LockType = 1
Query.Open("select ID,MC,JS,BZ,FBZ1,FBZ2,FBZ3,FBZ4,(select COUNT(ID) from WZ where SSLM=LM.ID) AS ZTS,FWS,ZJFBSJ,ZJFB,ZT from LM order by ZTS, FWS desc")
Dim buf
if Query.Bof then
ReDim buf(0)
buf(0) = "0|0"
Fun3000 = buf
set Query = nothing
exit function
end if
if isNumeric(GetPart(cmd,1)) then
if Int(GetPart(cmd,1)) > Query.PageCount then
Query.AbsolutePage = 1
else if Int(GetPart(cmd,1)) < 1 then
Query.AbsolutePage = 1
else
Query.AbsolutePage = Int(GetPart(cmd,1))
end if
end if
end if
ReDim buf(Query.RecordCount+1)
for i=1 to 50
if Query.Eof or Query.Bof then
exit for
end if
buf(i) = Query("ID")&"|"&trim(Query("MC"))&"|"&trim(Query("JS"))&"|"&trim(Query("BZ"))&" "&trim(Query("FBZ1"))&" "&trim(Query("FBZ2"))&" "&trim(Query("FBZ3"))&" "&trim(Query("FBZ4"))&"|"&Query("ZTS")&"|"&Query("FWS")&"|"&ConvertDateTime(Query("ZJFBSJ"))&"|"&trim(Query("ZJFB"))&"|"&Query("ZT")
Query.MoveNext
next
buf(0) = "0"&"|"&Query.RecordCount
Fun3000 = buf
set Query = nothing
end function
function Fun301(cmd)
Dim Query,sql
if Request.Cookies("NC")="" or Request.Cookies("NC")="访客" then
Fun301 = "1|"&"对不起,您未注册,不能发表高见!"
exit function
end if
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select TL,ML,ZT from HY where ID="&Request.Cookies("ID")
Query.Open sql,Database
if Query.Bof then
Fun301 = "1|"&"对不起,您不能发表高见!"
Query.Close
set Query = nothing
exit function
end if
if Int(Query("ZT")) = 1 then
Fun301 = "1|"&"对不起,您已被禁闭,不能发表高见!"
Query.Close
set Query = nothing
exit function
end if
if Int(Query("TL")) <= Int(Application("FTZSTL")) then
Fun301 = "1|"&"对不起,您的体力太低,请保重身体,修养一下再发表高见!"
Query.Close
set Query = nothing
exit function
end if
if Int(Query("ML")) <= Int(Application("FTZSML")) then
Fun301 = "1|"&"对不起,您的魅力太差,不能发表高见,请注意一下网上道德!"
Query.Close
set Query = nothing
exit function
end if
Query.Close
set Query = nothing
Database.Execute("insert into WZ (BT,ZZ,FBSJ,FWCS,HFCS,ZJGX,IP,ZT,LB,SSLM,BQ,NR) values ('"&midb(GetPart(cmd,2),1,200)&"','"&Request.Cookies("NC")&"','"&ConvertDateTime(Now())&"',0,0,'"&ConvertDateTime(Now())&"','"&Request.Cookies("IP")&"',0,"&_
GetPart(cmd,3)&","&GetPart(cmd,1)&",'"&GetPart(cmd,4)&"','"&midb(GetPart(cmd,5),1,60*1024)&"')")
Database.Execute("update HY set TL=TL-"&Application("FTTL")&",JQ=JQ+"&Application("FTJQ")&",JYZ=JYZ+"&Application("FTJY")&",ML=ML+"&Application("FTML")&",FTS=FTS+1 where ID="&Request.Cookies("ID"))
Database.Execute("update LM set ZJFBSJ='"&ConvertDateTime(Now())&"',ZJFB='"&Request.Cookies("NC")&"' where ID="&GetPart(cmd,1))
Fun301 = "0"
end function
function Fun302(cmd)
Dim buf
ReDim buf(Int(Application("MYWZS")))
Dim ret,sql
Dim i
Dim Count
Dim Query
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select top 1 ID from LMJZ where ID="&GetPart(cmd,1)&" and NC='"&Request.Cookies("NC")&"'"
Query.Open sql,Database
if not Query.Bof then
buf(0) = "1|对不起,您已被禁止入内!"
Fun302 = buf
Query.Close
set Query = nothing
exit function
end if
Query.Close
set Query = nothing
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select top 1 ZT,MM from LM where ID="&GetPart(cmd,1)
Query.Open sql,Database
if Query.Bof then
buf(0) = "2|对不起,该论坛不存在!"
Fun302 = buf
Query.Close
set Query = nothing
exit function
end if
if (Int(Query("ZT")) = 3) and (UCase(Request.Cookies("NC")) <> UCase(Application("NC"))) then
buf(0) = "3|对不起,该论坛已被管理员禁闭!"
Fun302 = buf
Query.Close
set Query = nothing
exit function
end if
if (Int(Query("ZT")) = 2) and (UCase(Request.Cookies("NC")) <> UCase(Application("NC"))) then
ret = Fun111(GetPart(cmd,1)&"|"&Request.Cookies("NC"))
if GetPart(ret,1) <> "0" then
if GetPart(cmd,4) <> trim(Query("MM")) then
buf(0) = "4|对不起,论坛密码有误,无法进入!"
Fun302 = buf
Query.Close
set Query = nothing
exit function
end if
end if
end if
Query.Close
set Query = nothing
if GetPart(cmd,3) = "1" then
Database.Execute("update LM set FWS=FWS+1 where ID="&GetPart(cmd,1))
end if
set Query = Server.CreateObject("ADODB.Recordset")
if not isNumeric(GetPart(cmd,2)) then
Count = Int(Application("MYWZS"))
else
Count = Int(Application("MYWZS"))*Int(GetPart(cmd,2))
end if
select case GetPart(cmd,5)
case "3"
sql = "select top "&Count&" ID,BT,ZZ,FBSJ,FWCS,HFCS,ZJGX,ZJHF,ZT,LB,BQ from WZ where SSLM="&GetPart(cmd,1)&" and ZT=1 order by ZJGX desc"
case "1"
sql = "select top "&Count&" ID,BT,ZZ,FBSJ,FWCS,HFCS,ZJGX,ZJHF,ZT,LB,BQ from WZ where SSLM="&GetPart(cmd,1)&" and ZZ='"&GetPart(cmd,6)&"' order by ZJGX desc"
case "2"
sql = "select top "&Count&" ID,BT,ZZ,FBSJ,FWCS,HFCS,ZJGX,ZJHF,ZT,LB,BQ from WZ where SSLM="&GetPart(cmd,1)&" and BT like '%"&GetPart(cmd,6)&"%' order by ZJGX desc"
case else
sql = "select top "&Count&" ID,BT,ZZ,FBSJ,FWCS,HFCS,ZJGX,ZJHF,ZT,LB,BQ from WZ where SSLM="&GetPart(cmd,1)&" order by ZT>=4, ZJGX desc"
end select
Query.Open sql,Database
if Query.Bof then
buf(0) = "0|0"
Fun302 = buf
Query.Close
set Query = nothing
exit function
end if
Query.Move Count-Int(Application("MYWZS"))
for i=1 to Int(Application("MYWZS"))
if Query.Eof or Query.Bof then
exit for
end if
buf(i) = Query("ID")&"|"&trim(Query("BT"))&"|"&trim(Query("ZZ"))&"|"&ConvertDateTime(Query("FBSJ"))&"|"&Query("FWCS")&"|"&Query("HFCS")&"|"&_
ConvertDateTime(Query("ZJGX"))&"|"&trim(Query("ZJHF"))&"|"&Query("ZT")&"|"&Query("LB")&"|"&trim(Query("BQ"))
Query.MoveNext
next
buf(0) = "0|"&Int(Application("MYWZS"))
Fun302 = buf
Query.Close
set Query = nothing
end function
function Fun303(cmd)
Dim Query,sql,sslm
if Request.Cookies("NC")="" or Request.Cookies("NC")="访客" then
Fun303 = "1|对不起,您未注册,无法回复文章!"
exit function
end if
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select TL,ML from HY where ID="&Request.Cookies("ID")
Query.Open sql,Database
if Query.Bof then
Fun303 = "1|"&"对不起,您不能回复文章!"
Query.Close
set Query = nothing
exit function
end if
if Int(Query("TL")) <= Int(Application("HFZSTL")) then
Fun303 = "1|"&"对不起,您的体力太低,请保重身体,休息一下再回复文章!"
Query.Close
set Query = nothing
exit function
end if
if Int(Query("ML")) <= Int(Application("FTZSML")) then
Fun303 = "1|"&"对不起,您的魅力太差,不能回复文章,请注意网上道德!"
Query.Close
set Query = nothing
exit function
end if
Query.Close
set Query = nothing
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select top 1 ZT,SSLM from WZ where ID="&GetPart(cmd,1)
Query.Open sql,Database
if Query.Bof then
Fun303 = "1|对不起,该主题不存在!"
Query.Close
set Query = nothing
exit function
end if
if (Int(Query("ZT")) and 2) > 0 then
Fun303 = "1|对不起
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -