📄 bbsinfo.asp
字号:
<%
dim bid,bbs_title,bbs_skin,bbs_dis,bbs_opcl,hx66_Grade,userGrade,folder,hx66_bid,Hxcms_rs
dim username,ckuname,ckuGrade,IP,RelationArt,UserLogined,LoginTimes,userhidden
bid=request.querystring("bid")
bid=clng(bid)
IP=Request("REMOTE_ADDR")
if Request.Cookies("HX_USER")("User_Name")="" or isnull(Request.Cookies("HX_USER")("User_Name")) or Request.Cookies("HX_USER")("User_Pwd")="" or isnull(Request.Cookies("HX_USER")("User_Pwd")) then
username="亲爱的朋友"
UserLogined=False
userGrade=0
else
userid=clng(request.Cookies("HX_USER")("uid"))
name=CheckStr(request.Cookies("HX_USER")("User_Name"))
password=CheckStr(request.Cookies("HX_USER")("User_Pwd"))
LoginTimes=clng(request.Cookies("HX_USER")("LoginTimes"))
userhidden=clng(Request.Cookies("HX_USER")("userhidden"))
set conn1=server.CreateObject("adodb.connection")
DBPath = Server.MapPath(mdb)
conn1.open "provider=microsoft.jet.oledb.4.0; data source="&DBpath
set RelationArt = conn1.execute("select username,userGrade,userid from [User] where userid=" & userid &" and UserName='" & name & "' and password='" & password & "' order by userid desc")
IF RelationArt.eof and relationArt.bof Then
Response.Redirect "../show_error.asp?eid=非法登录,请不要破坏此系统,如果依然有问题请联系管理员!"
Response.End
else
UserLogined=True
username=relationArt(0)
ckuname=relationArt(0)
ckuGrade=relationArt(1)
userid=relationArt(2)
userGrade=ckuGrade+1
end if
end if
'------------------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------
sub checkdisp()
bid=request.querystring("bid")
if not IsNumeric(bid) or bid="" then
call showmsg("参数非法,版面编号临时出错")
response.end
else
bid=clng(bid)
end if
sqlstr="select * from hx66_bbsinfo where id="&bid
set rs=server.createobject("adodb.recordset")
rs.open sqlstr,conn,1,1
if not rs.eof then
bbs_title=rs("hx66_bbstitle")
bbs_skin=rs("hx66_bbsskin")
bbs_dis=rs("hx66_bbsdis")
bbs_opcl=rs("hx66_bbsopcl")
hx66_Grade=rs("hx66_Grade")
rs.close
set rs=nothing
if hx66_Grade="1" then
folder="注册会员"
elseif hx66_Grade="2" then
folder="VIP会员"
else
folder="游客"
end if
else
call showmsg("参数非法,数据库中未找到版面编号")
response.end
end if
if bbs_opcl=1 then
call showmsg("版面已关闭")
response.end
end if
if userGrade<hx66_Grade then
response.write"<SCRIPT language=JavaScript>alert(' 本版块为"&folder&"才能观看,请 返 回 !');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
end sub
'------------------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------
function checkziduan(ziduan)
bid=request.querystring("bid")
if not IsNumeric(bid) or bid="" then
call showmsg("参数非法,版面编号临时出错")
response.end
else
bid=clng(bid)
end if
checkziduan=0
sqlstr="select hx66_ziduan from hx66_bbsinfo where id="&bid
set rrrs=server.createobject("adodb.recordset")
rrrs.open sqlstr,conn,1,1
if not rrrs.eof then
hx66_ziduan=rrrs(0)
rrrs.close
set rrrs=nothing
if hx66_ziduan="2" then
folder="『展示版』"
elseif hx66_ziduan="1" then
folder="『回复版』"
else
folder="『正常版』"
end if
else
call showmsg("参数非法,数据库中未找到版面编号")
response.end
end if
if hx66_ziduan>=1 and ziduan="1" and checkbbsadmin(bid)=0 and checkadmin(ckuname)<3 then
response.write"<SCRIPT language=JavaScript>alert(' 本版块为"&folder&"不能发表主题,请返回 !');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
if hx66_ziduan>=2 and ziduan="2" then
response.write"<SCRIPT language=JavaScript>alert(' 本版块为"&folder&"不能发表回复,请返回 !');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
if ziduan="3" then
checkziduan=clng(hx66_ziduan)
end if
end function
'------------------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------
sub checkulogin()
if UserLogined<>True then
Response.write"<script language=javascript>alert('您还没有登陆,谢谢你的支持 !');history.back();</script>"
response.end
end if
end sub
function CheckStr(str)
dim tstr,l,i,ch
l=len(str)
for i=1 to l
ch=mid(str,i,1)
if ch="'" then
tstr=tstr+"'"
end if
tstr=tstr+ch
next
CheckStr=tstr
end function
'------------------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------
function checkbbsadmin(bbsid) '版主等级
set rrs=server.CreateObject("adodb.recordset")
sqlstr="select * from hx66_admin where hx66_name='"&ckuname&"' and hx66_bid="&bbsid&""
rrs.open sqlstr,conn,1,1
if not rrs.eof then
if rrs("hx66_bidadmin")=1 then
checkbbsadmin=2 '主版主
else
checkbbsadmin=1 '付版主
end if
else
checkbbsadmin=0 '会员
end if
rrs.close
set rrs=nothing
end function
'------------------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------
function checkadmin(bbs) '个人等级
set rrrs=server.CreateObject("adodb.recordset")
sqlstr="select * from hx66_admin where hx66_name='"&bbs&"' order by hx66_djadmin DESC"
rrrs.open sqlstr,conn,1,1
if not rrrs.eof then
if rrrs("hx66_bid")=0 then
if rrrs("hx66_djadmin")=99 then
checkadmin=4 '超级管理员
else
checkadmin=3 '管理员
end if
else
if rrrs("hx66_bidadmin")=1 then
checkadmin=2 '主版主
else
checkadmin=1 '付版主
end if
end if
else
checkadmin=0 '会员
end if
rrrs.close
set rrrs=nothing
end function
'------------------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------
function checkadmindj(djname,djbbsid) '个人显示等级
set rrrs=server.CreateObject("adodb.recordset")
sqlstr="select * from hx66_admin where hx66_name='"&djname&"' order by hx66_djadmin DESC"
rrrs.open sqlstr,conn,1,1
if not rrrs.eof then
if rrrs("hx66_bid")=0 then
if rrrs("hx66_djadmin")=99 then
checkadmindj=4 '超级管理员
else
checkadmindj=3 '管理员
end if
else
do while not rrrs.eof
if rrrs("hx66_bidadmin")=1 and rrrs("hx66_bid")=djbbsid then
checkadmindj=2 '主版主
exit function
elseif rrrs("hx66_bidadmin")=0 and rrrs("hx66_bid")=djbbsid then
checkadmindj=1 '付版主
exit function
else
checkadmindj=0 '会员
end if
rrrs.movenext
loop
end if
else
checkadmindj=0 '会员
end if
rrrs.close
set rrrs=nothing
end function
'------------------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------
function usersysinfo(info,getinfo)
if instr(info,";")>0 then
dim usersys
usersys=split(info,";")
if ubound(usersys)>=2 then
usersys(1)=replace(usersys(1),"MSIE","Internet Explorer")
usersys(2)=replace(usersys(2),")","")
usersys(2)=replace(usersys(2),"NT 5.1","XP")
usersys(2)=replace(usersys(2),"NT 5.0","2000")
usersys(2)=replace(usersys(2),"9x","Me")
usersys(1)="浏 览 器:" & Trim(usersys(1))
usersys(2)="操作系统:" & Trim(usersys(2))
if getinfo=1 then
usersysinfo=usersys(1)
else
usersysinfo=usersys(2)
end if
else
if getinfo=1 then
usersysinfo="浏 览 器:未知"
else
usersysinfo="操作系统:未知"
end if
end if
else
if getinfo=1 then
usersysinfo="未知"
else
usersysinfo="未知"
end if
end if
end function
'------------------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------
sub showbbsadmin()
dim rsbbsadmin,sqlbbsadmin
set rsbbsadmin=server.CreateObject("adodb.recordset")
sqlbbsadmin="select * from hx66_admin where hx66_bid="&bid
rsbbsadmin.open sqlbbsadmin,conn,1,1
do while not rsbbsadmin.eof
response.write"<a href=""viewperson.asp?bid="&bid&"&author="&server.urlencode(rsbbsadmin("hx66_name"))&""" target=""_blank"">"&rsbbsadmin("hx66_name")&"</a> "
rsbbsadmin.movenext
loop
rsbbsadmin.close
set rsbbsadmin=nothing
end sub
'------------------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------
sub checkhmd()
set rs=server.CreateObject("adodb.recordset")
sqlstr="select * from hx66_heiming where hx66_name='"&ckuname&"' and hx66_bid="&bid
rs.open sqlstr,conn,1,1
if not rs.eof then
showmsg("操作失败,您可能已经被该版版主加入了黑名单")
response.end
end if
rs.close
sql="select * from hx66_heiming where hx66_name='"&ckuname&"' and hx66_bid=0"
rs.open sql,conn,1,1
if not rs.eof then
showmsg("操作失败,您已经被管理员屏蔽了在本论坛的操作权限")
response.end
end if
rs.close
set rs=nothing
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -