📄 bbslib.asp
字号:
if GetPart(cmd,2) = Request.Cookies("NC") then
Fun108 = "1|对不起,您不能禁止自己!"
exit function
end if
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select top 1 ID from LM where ID="&GetPart(cmd,1)&" and ( BZ='"&GetPart(cmd,2)&"' or FBZ1='"&GetPart(cmd,2)&"' or FBZ2='"&GetPart(cmd,2)&"' or FBZ3='"&GetPart(cmd,2)&"' or FBZ4='"&GetPart(cmd,2)&"')"
Query.Open sql,Database
if not Query.Bof then
Fun108 = "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 ID from LM where ID="&GetPart(cmd,1)&" and ( BZ='"&Request.Cookies("NC")&"' or FBZ1='"&Request.Cookies("NC")&"' or FBZ2='"&Request.Cookies("NC")&"' or FBZ3='"&Request.Cookies("NC")&"' or FBZ4='"&Request.Cookies("NC")&"')"
Query.Open sql,Database
if Query.Bof then
Fun108 = "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 NC from LMJZ where ID="&GetPart(cmd,1)&" and NC='"&GetPart(cmd,2)&"'"
Query.Open sql,Database
if not Query.Bof then
Fun108 = "1|对不起,该人已处于禁闭状态!"
else
Database.Execute("insert into LMJZ (ID,NC,SJ) values ("&GetPart(cmd,1)&",'"&GetPart(cmd,2)&"','"&ConvertDateTime(Now())&"')")
Database.Execute("update HY set ML=ML-500 where NC='"&GetPart(cmd,2)&"'")
Fun108 = "0"
end if
Query.Close
set Query = nothing
end function
function Fun109(cmd)
Fun109 = Fun110("0|"&cmd)
end function
function Fun110(cmd)
Dim Query,sql
if Request.Cookies("NC")="" or Request.Cookies("NC")="访客" then
Fun110 = "1|对不起,您没有该权限!"
exit function
end if
if GetPart(cmd,1) = "0" then
if UCase(Request.Cookies("NC")) <> UCase(Application("NC")) then
Fun110 = "1|您没有解除禁闭的权限!"
exit function
end if
end if
if (GetPart(cmd,1) <> "0") and (Request.Cookies("NC") <> Application("NC")) then
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select top 1 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
Fun110 = "1|对不起,您不是该版版主,不能解除该人!"
Query.Close
set Query = nothing
exit function
end if
end if
Query.Close
set Query = nothing
end if
if UCase(Request.Cookies("NC")) <> UCase(Application("NC")) then
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select top 1 SJ from LMJZ where ID="&GetPart(cmd,1)&" and NC='"&GetPart(cmd,2)&"'"
Query.Open sql,Database
if ABS(DateDiff("d",Query("SJ"),now())) < 3 then
Query.Close
set Query = nothing
Fun110 = "1|对不起,至少需要3天后才能解除禁闭!"
exit function
end if
Query.Close
set Query = nothing
end if
Database.Execute("delete from LMJZ where ID="&GetPart(cmd,1)&" and NC='"&GetPart(cmd,2)&"'")
Fun110 = "0"
end function
function Fun111(cmd)
Dim Query,sql
if Request.Cookies("NC")="" or Request.Cookies("NC")="访客" then
Fun111 = "1|对不起,您不是该版版主!"
exit function
end if
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select top 1 ID from LM where ID="&GetPart(cmd,1)&" and ( BZ='"&GetPart(cmd,2)&"' or FBZ1='"&GetPart(cmd,2)&"' or FBZ2='"&GetPart(cmd,2)&"' or FBZ3='"&GetPart(cmd,2)&"' or FBZ4='"&GetPart(cmd,2)&"')"
Query.Open sql,Database
if Query.Bof then
Fun111 = "1"
else
Fun111 = "0"
end if
Query.Close
set Query = nothing
end function
function Fun112(cmd)
Dim Query,sql
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select COUNT(ID) AS SL from HY "
Query.Open sql,Database
Fun112 = "0|"&Query("SL")
Query.Close
set Query = nothing
end function
function Fun113(cmd)
Dim buf(10)
Dim Query,sql
Dim page
if SQLServer = "0" then
Database.Execute("delete from ZXRY where HDSJ < DATEADD('n',-5,'"&ConvertDateTime(now())&"')")
else
Database.Execute("delete from ZXRY where DATEDIFF(mi,HDSJ,'"&ConvertDateTime(Now())&"') > 2")
end if
set Query = Server.CreateObject("ADODB.Recordset")
if GetPart(cmd,1) = "" then
page = 1
else
page = Int(GetPart(cmd,1))
end if
set Query = Server.CreateObject("ADODB.Recordset")
sql = "Select top "&page*10&" XM,DLSJ,WZ,IP,YS from ZXRY"
Query.Open sql,Database
if not Query.Bof then
Query.Move (page-1)*10
for i=1 to 10
if Query.Eof then exit for
if Query("YS")="1" then
buf(i) = "隐身"&"|"&ConvertDateTime(Query("DLSJ"))&"|"&trim(Query("WZ"))&"|"
else
buf(i) = trim(Query("XM"))&"|"&ConvertDateTime(Query("DLSJ"))&"|"&trim(Query("WZ"))&"|"
end if
if UCase(Request.Cookies("NC")) = UCase(Application("NC")) then
buf(i) = buf(i)&trim(Query("IP"))&"|"&""
'buf(i) = buf(i)&trim(Query("IP"))&"|"&GetIPAddress(Query("IP"))
else
buf(i) = buf(i)&"已记录"&"|"&""
end if
Query.MoveNext
next
end if
Query.Close
set Query = nothing
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select COUNT(ID) AS SL from ZXRY"
Query.Open sql,Database
buf(0) = "0|"&IIF(Int(Query("SL")) mod 10 = 0,Int(Query("SL"))\10,(Int(Query("SL"))\10+1))&"|"&Query("SL")
Query.Close
set Query = nothing
fun113 = buf
end function
function Fun115(cmd)
Dim buf
Dim i
Dim Query,sql
if GetPart(cmd,1) = "" then
if (UCase(Request.Cookies("NC")) <> UCase(Application("NC"))) and (Request.Cookies("NC")="" or Request.Cookies("NC")="访客") then
ReDim buf(0)
buf(0) = "1|对不起,您没有该权限!"
Fun115 = buf
exit function
end if
else
if (GetPart(Fun111(GetPart(cmd,1)&"|"&Request.Cookies("NC")),1) <> "0") and (UCase(Request.Cookies("NC")) <> UCase(Application("NC"))) then
ReDim buf(0)
buf(0) = "1|对不起,您没有该权限!"
Fun115 = buf
exit function
end if
end if
set Query = Server.CreateObject("ADODB.Recordset")
if GetPart(cmd,1) = "" then
sql = "select a.NC,b.JYZ,b.ML from LMJZ a,HY b where a.ID=0 and a.NC=b.NC"
else
sql = "select a.NC,b.JYZ,b.ML from LMJZ a,HY b where a.ID="&GetPart(cmd,1)&" and a.NC=b.NC"
end if
Query.Open sql,Database,1,1
if Query.Bof then
ReDim buf(0)
buf(0) = "0"
Query.Close
set Query = nothing
Fun115 = buf
exit function
else
ReDim buf(Query.RecordCount)
for i=1 to UBound(buf)
if Query.Eof or Query.Bof then
exit for
end if
buf(i) = Query("NC")&"|"&Query("JYZ")&"|"&Query("ML")
Query.MoveNext
next
buf(0) = "0"
Fun115 = buf
Query.Close
set Query = nothing
end if
end function
function Fun117(cmd)
if (Request.Cookies("NC")="" or Request.Cookies("NC")="访客") and (UCase(Request.Cookies("NC")) <> UCase(Application("NC"))) then
Fun117 = "1|对不起,您不是管理员!"
exit function
end if
if (GetPart(cmd,1) = Request.Cookies("NC")) then
Fun117 = "1|对不起,您不能删除自己!"
exit function
end if
Database.Execute("delete from LY where ID=(select ID from HY where NC='"&GetPart(cmd,1)&"') or NC='"&GetPart(cmd,1)&"'")
Database.Execute("delete from HFWZ where XM='"&GetPart(cmd,1)&"'")
Database.Execute("delete from WZ where ZZ='"&GetPart(cmd,1)&"'")
Database.Execute("delete from YHZH where ID=(select ID from HY where NC='"&GetPart(cmd,1)&"')")
Database.Execute("delete from HY where NC='"&GetPart(cmd,1)&"'")
'Database.Execute("delete from G_LOG where NC='"&GetPart(cmd,1)&"'")
'Database.Execute("delete from C_JZ where NC='"&GetPart(cmd,1)&"'")
Database.Execute("delete from FRIEND where XM='"&GetPart(cmd,1)&"'")
Database.Execute("delete from LMJZ where NC='"&GetPart(cmd,1)&"'")
Database.Execute("delete from Church where Zhui='"&GetPart(cmd,1)&"' or BZhui='"&GetPart(cmd,1)&"'")
Database.Execute("delete from sheep where NC='"&GetPart(cmd,1)&"'")
Fun117 = "0"
end function
function Fun118(cmd)
if Request.Cookies("NC")="" or Request.Cookies("NC")="访客" then
Fun118 = "1|对不起,您不是注册会员,无法指定好友!"
exit function
end if
if GetPart(cmd,1) = Request.Cookies("NC") then
Fun118 = "1|对不起,您不能对自己操作!"
exit function
end if
Database.Execute("delete from FRIEND where ID="&Request.Cookies("ID")&" and XM='"&GetPart(cmd,1)&"'")
Database.Execute("insert into FRIEND (ID,XM) values ("&Request.Cookies("ID")&",'"&GetPart(cmd,1)&"')")
Fun118 = "0"
end function
function Fun119(cmd)
Dim buf
Dim Query,sql
Dim i
if Request.Cookies("NC")="" or Request.Cookies("NC")="访客" then
Fun118 = "1|对不起,您不是注册会员,无好友名单!"
exit function
end if
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select XM,JYZ,ML,JQ from FRIEND,HY where XM=NC and FRIEND.ID=(select ID from HY a where a.NC='"&GetPart(cmd,1)&"')"
Query.Open sql,Database,1,1
if Query.Bof then
ReDim buf(0)
buf(0) = "0|0"
Fun119 = buf
Query.Close
set Query = nothing
exit function
end if
ReDim buf(Query.RecordCount)
for i=1 to UBound(buf)
if Query.Bof or Query.Eof then exit for
buf(i) = Query("XM")&"|"&Query("JYZ")&"|"&Query("ML")&"|"&Query("JQ")
Query.MoveNext
next
buf(0) = "0|"&UBound(buf)
Fun119 = buf
Query.Close
set Query = nothing
end function
function Fun120(cmd)
if Request.Cookies("NC")="" or Request.Cookies("NC")="访客" then
Fun118 = "1|对不起,您不是注册会员!"
exit function
end if
Database.Execute("delete from FRIEND where XM='"&GetPart(cmd,1)&"' and ID="&Request.Cookies("ID"))
Fun = "0"
end function
function Fun121(cmd)
Dim buf(10)
Dim i
Dim Query,sql
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select top 10 NC,JYZ from HY where NC<>'"&Application("NC")&"' order by JYZ desc"
Query.Open sql,Database
for i=1 to 10
if Query.Bof or Query.Eof then exit for
buf(i) = Query("NC")&"|"&Query("JYZ")
Query.MoveNext
next
Query.Close
buf(0) = "0|10"
Fun121 = buf
set Query = nothing
end function
function Fun122(cmd)
Dim buf(10)
Dim i,Query,sql
set Query = Server.CreateObject("ADODB.Recordset")
sql = "select top 10 NC,JQ from HY where NC<>'"&Application("NC")&"' order by JQ desc"
Query.Open sql,Database
for i=1 to 10
if Query.Bof or Query.Eof then exit for
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -