📄 bbslib.asp
字号:
buf(i) = Query("NC")&"|"&Query("JQ")
Query.MoveNext
next
Query.Close
buf(0) = "0|10"
Fun122 = buf
set Query = nothing
end function
function Fun1222(cmd)
Dim buf(10)
Dim i
Dim Query,sql
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select top 10 NC,ML from HY where NC<>'"&Application("NC")&"' order by ML desc"
Query.Open sql,Database
for i=1 to 10
if Query.Bof or Query.Eof then exit for
buf(i) = Query("NC")&"|"&Query("ML")
Query.MoveNext
next
Query.Close
buf(0) = "0|10"
Fun1222 = buf
set Query = nothing
end function
function Fun123(cmd)
Dim buf(10)
Dim i,Query,sql
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select top 10 NC,ML from HY where ML<0 order by ML"
Query.Open sql,Database
for i=1 to 10
if Query.Bof or Query.Eof then exit for
buf(i) = Query("NC")&"|"&Query("ML")
Query.MoveNext
next
Query.Close
buf(0) = "0|10"
Fun123 = buf
set Query = nothing
end function
function Fun1233(cmd)
Dim buf(10)
Dim i,Query,sql
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select top 10 NC,FTS from HY where NC<>'"&Application("NC")&"' order by FTS desc"
Query.Open sql,Database
for i=1 to 10
if Query.Bof or Query.Eof then exit for
buf(i) = Query("NC")&"|"&Query("FTS")
Query.MoveNext
next
Query.Close
buf(0) = "0|10"
Fun1233 = buf
set Query = nothing
end function
function Fun124(cmd)
Dim buf
buf = Application("USER")
buf(0) = "0|2"
Fun124 = buf
end function
function Fun125(cmd)
if Request.Cookies("NC")="" or Request.Cookies("NC")="访客" then
ReDim buf(0)
Fun125 = "1|"
exit function
end if
Database.Execute("update HY set JYZ=JYZ+"&GetPart(cmd,1)&",TL=TL+"&GetPart(cmd,2)&",ML=ML+"&GetPart(cmd,3)&",JQ=JQ+"&GetPart(cmd,4)&" where NC='"&Request.Cookies("NC")&"'")
Database.Execute("update HY set TL=100 where TL>100")
Fun125 = "0|"
end function
function Fun126(cmd)
Dim buf(20)
Dim i,sql,page,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
if GetPart(cmd,1) = "0" then
sql = "select "&IIF(page >= 0,"top "&page*20,"")&" ID,NC,SJ,(select MC from LM where LM.ID=LMJZ.ID) AS MC from LMJZ order by ID"
Query.Open sql,Database,1,1
if not Query.Bof then
if page >= 0 then
Query.Move (page-1)*20
else
total = Query.RecordCount
if total > 20 then
Query.Move total-20
end if
end if
for i=1 to 20
if Query.Eof then exit for
buf(i) = Query("ID")&"|"&IIF(Query("ID") = "0","社区",trim(Query("MC")))&"|"&trim(Query("NC"))&"|"&ConvertDateTime(Query("SJ"))
Query.MoveNext
next
end if
buf(0) = "0|0"
else
sql = "select "&IIF(page >= 0,"top "&page*20,"")&" ID,NC,SJ,(select MC from LM where LM.ID=C_JZ.ID) AS MC from C_JZ order by ID"
Query.Open sql,Database,1,1
if not Query.Bof then
if page >= 0 then
Query.Move (page-1)*20
else
total = Query.RecordCount
if total > 20 then
Query.Move total-20
end if
end if
for i=1 to 20
if Query.Eof then exit for
buf(i) = Query("ID")&"|"&IIF(Query("ID") = "0","聊天大厅",trim(Query("MC")))&"|"&trim(Query("NC"))&"|"&ConvertDateTime(Query("SJ"))
Query.MoveNext
next
end if
buf(0) = "0|0"
end if
Query.Close
Fun126 = buf
set Query = nothing
end function
function Fun127(cmd)
Dim Query,sql
if Request.Cookies("NC")="" or Request.Cookies("NC")="访客" then
Fun127 = "1|对不起,您没有该权限!"
exit function
end if
if GetPart(cmd,1) = "0" then
if UCase(Request.Cookies("NC")) <> UCase(Application("NC")) then
Fun127 = "1|您没有解除禁闭的权限!"
exit function
end if
end if
if GetPart(cmd,1) <> "0" then
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select ID from LM where ID="&GetPart(cmd,1)&" and BZ='"&Request.Cookies("NC")&"'"
Query.Open sql,Database
if Query.Bof then
if UCase(Request.Cookies("NC")) <> UCase(Application("NC")) then
Fun127 = "1|对不起,您没有解除禁闭的权限!"
Query.Close
set Query = nothing
exit function
end if
end if
Query.Close
set Query = nothing
end if
Database.Execute("delete from C_JZ where ID="&GetPart(cmd,1)&" and NC='"&GetPart(cmd,2)&"'")
Fun127 = "0"
end function
function Fun128(cmd)
Dim buf(10)
Dim i,Query,sql
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select top 10 NC,XB from HY where ZT=0 order by ZCSJ desc"
Query.Open sql,Database
for i=1 to 10
if Query.Bof or Query.Eof then exit for
buf(i) = Query("NC")
select case Query("XB")
case "0"
buf(i) = buf(i)&"|"&"男"
case "1"
buf(i) = buf(i)&"|"&"女"
case "2"
buf(i) = buf(i)&"|"&"保密"
end select
Query.MoveNext
next
Query.Close
buf(0) = "0|10"
Fun128 = buf
set Query = nothing
end function
function Fun129(cmd)
Database.Execute("delete from ZXRY where XM='"&Request.Cookies("NC")&"' and ID="&Request.Cookies("ID"))
'Database.Execute("delete from G_USER where NC='"&Request.Cookies("NC")&"'")
'Database.Execute("delete from C_USER where NC='"&Request.Cookies("NC")&"'")
Fun129 = "0"
end function
function Fun130(cmd)
Dim Query,sql
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select VAL from INI where TYPE='FWCS'"
Query.Open sql,Database
Fun130 = "0"&"|"&Query("VAL")
Query.Close
set Query = nothing
end function
function Fun138(cmd)
Dim Query,sql
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select COUNT(ID) AS SL from ZXRY"
Query.Open sql,Database
Fun138 = "0|"&Query("SL")
Query.Close
set Query = nothing
'set Query = Server.CreateObject("ADODB.Recordset")
'sql = "select COUNT(GP) AS SL from C_USER"
'Query.Open sql,Database
'Fun138 = Fun138&"|"&Query("SL")
'Query.Close
'set Query = nothing
'set Query = Server.CreateObject("ADODB.Recordset")
'sql = "select COUNT(GID) AS SL from G_USER"
'Query.Open sql,Database
'Fun138 = Fun138&"|"&Query("SL")
'Query.Close
'set Query = nothing
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select COUNT(ID) AS SL,SUM(HFCS) AS HFSL from WZ"
Query.Open sql,Database
Fun138 = Fun138&"|"&Query("SL")&"|"&Query("HFSL")&"|"&Application("ZXFZ")
Query.Close
set Query = nothing
end function
function Fun139(cmd)
Dim buf(5)
Dim i
Dim Query,sql
set Query = Server.CreateObject("ADODB.Recordset")
if SQLServer = "0" then
sql = "select top 5 NC,JYZ from HY where NC<>'"&Application("NC")&"' and ZCSJ >= DATEADD('d',-30,'"&ConvertDateTime(now())&"') order by JYZ desc"
else
sql = "select top 5 NC,JYZ from HY where NC<>'"&Application("NC")&"' and DATEDIFF(dd,ZCSJ,'"&ConvertDateTime(Now())&"') <= 30 order by JYZ desc"
end if
Query.Open sql,Database
for i=1 to 5
if Query.Bof or Query.Eof then exit for
buf(i) = Query("NC")&"|"&Query("JYZ")
Query.MoveNext
next
buf(0) = "0|5"
Query.Close
set Query = nothing
Fun139 = buf
end function
function Fun200(cmd)
Dim buf(20)
Dim i,sql,page,total
Dim Query
if Request.Cookies("NC")="" or Request.Cookies("NC")="访客" then
buf(0) = "1|您不是注册会员,无法查看留言!"
Fun200 = buf
exit function
end if
set Query = Server.CreateObject("ADODB.Recordset")
if not isNumeric(GetPart(cmd,1)) then
page = 1
else
page = Int(GetPart(cmd,1))
end if
sql = "select "&IIF(page >= 0,"top "&page*20,"")&" a.NC,a.TX,b.SJ,b.NR,b.ZT,b.XH,b.LB from HY a,LY b where a.ID=b.ID and b.NC='"&Request.Cookies("NC")&"' order by SJ desc"
Query.Open sql,Database,1,1
if Query.Bof then
buf(0) = "0|0"
Fun200 = buf
Query.Close
set Query = nothing
exit function
end if
if page >= 0 then
Query.Move (page-1)*20
else
total = Query.RecordCount
if total > 20 then
Query.Move total-20
end if
end if
for i=1 to 20
if Query.Eof or Query.Bof then
exit for
end if
buf(i) = trim(Query("NC"))&"|"&ConvertDateTime(Query("SJ"))&"|"&IIF(Query("LB") = "0",trim(Query("NR")),"<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=30% style='font-family: 宋体; font-size: 9pt'><div align=center><img width=60 height=60 vspace=2 hspace=2 src=SQFF/SQGW/images/"&GetPartEx(trim(Query("NR")),",",1)&".jpg></div></td><td rowspan=2 style='font-family: 宋体; font-size: 9pt' valign=top>"&GetPartEx(trim(Query("NR")),",",3)&"</td></tr><tr><td width=30% style='font-family: 宋体; font-size: 9pt'><div align=center>"&GetPartEx(trim(Query("NR")),",",2)&"</div></td></tr></table>")&"|"&Query("ZT")&"|"&Query("XH")&"|"&Query("TX")
Query.MoveNext
next
Query.Close
set Query = nothing
Database.Execute("update LY set ZT=1 where NC='"&Request.Cookies("NC")&"'")
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select COUNT(ID) AS SL from LY where NC='"&Request.Cookies("NC")&"'"
Query.Open sql,Database
buf(0) = "0|"&Query("SL")
Fun200 = buf
Query.Close
set Query = nothing
end function
function Fun201(cmd)
Dim Query,sql
if Request.Cookies("NC")="" or Request.Cookies("NC")="访客" then
Fun201 = "1|你不是注册会员,无法留言!"
exit function
end if
if Request.Cookies("NC") = GetPart(cmd,1) then
Fun201 = "1|对不起,您不能给自己留言!"
exit function
end if
'set Query = Server.CreateObject("ADODB.Recordset")
'sql = "select top 1 TL from HY where ID="&Request.Cookies("ID")
'Query.Open sql,Database
'if Int(Query("TL")) < Int(Application("HFZSTL")) then
' Fun201 = "1|对不起,由于您疲劳过度,将无法留言!"
' Query.Close
' set Query = nothing
' exit function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -