📄 admin_lockuser.asp
字号:
if UserGroupID>3 and Cint(GroupSetting(29))=1 then
canlockuser=true
end if
if FoundUserPer and Cint(GroupSetting(29))=1 then
canlockuser=true
elseif FoundUserPer and Cint(GroupSetting(29))=0 then
canlockuser=false
end if
if not canlockuser then
Errmsg=Errmsg+"<br>"+"<li>您没有权限执行此操作。"
founderr=true
exit sub
end if
if DelDate="" or not isnumeric(DelDate) then
Errmsg=Errmsg+"<br>"+"<li>非法的参数。"
Founderr=true
exit sub
end if
if suserid="" or not isnumeric(suserid) then
Errmsg=Errmsg+"<br>"+"<li>非法的参数。"
Founderr=true
exit sub
end if
'删除帖子表中数据
ii=0
set rs=conn.execute("select Announceid,rootid,boardid,dateandtime from "&DelBBS&" where PostUserID="&suserid&" and not ParentID=0 and Locktopic<2 and datediff('d',Dateandtime,Now())<"&DelDate&"")
do while not rs.eof
ii=ii+1
'更新发贴用户数据
conn.execute("update [user] set article=article-1,UserDel=UserDel-1,UserWealth=UserWealth-"&Forum_user(3)&",userEP=userEP-"&Forum_user(8)&",userCP=userCP-"&Forum_user(13)&" where userid="&suserid)
conn.execute("update "&DelBBS&" set locktopic=2 where Announceid="&rs(0))
isEndReply rs(1),rs(0),1
if datediff("d",rs(3),Now())=0 then
todaynum=1
else
todaynum=0
end if
'得到该帖子所属论坛的上级论坛ID
set trs=conn.execute("select ParentStr from board where boardid="&rs(2))
UpdateBoardID=trs(0) & "," & rs(2)
'更新版面数据
conn.execute("update board set lastbbsnum=lastbbsnum-1,todayNum=todayNum-"&todayNum&" where boardid in ("&UpdateBoardID&")")
'更新总数据
conn.execute("update config set TodayNum=todayNum-"&todaynum&",BbsNum=bbsNum-1")
'更新最后回复数据
LastCount rs(2),rs(1),rs(0),2
rs.movenext
loop
set rs=nothing
sucmsg="<li>删除该用户回复"&ii&"条。"
call dvbbs_suc()
end sub
sub boardlist()
dim trs
dim dispboard
if not AdminUserPer then
Errmsg=Errmsg+"<br>"+"<li>您没有权限执行此操作。"
founderr=true
exit sub
else
dispboard=true
end if
response.write "<table style=""width:70%"" cellspacing=1 cellpadding=3 align=center class=tableborder1>"
response.write "<tr><th colspan=6 height=23 align=left>编辑"&request("username")&"论坛权限(红色表示该用户在该版面有自定义权限)</th></tr>"
if not isnumeric(request("userid")) then
response.write "<tr><td colspan=6 class=tablebody1>错误的用户参数。</td></tr>"
founderr=true
end if
if not founderr then
response.write "<tr><td colspan=6 class=tablebody1 height=25><a href=?action=userBoardPermission&boardid=0&userid="&request("userid")&">编辑该用户在其它页面的权限</a>(主要针对短信部分设置)</td></tr>"
'----------------------boardinfo--------------------
response.write "<tr><td colspan=6 class=tablebody1><B>点击论坛名称进入编辑状态</B><BR>"
dim reBoard_Setting,FBoardMaster
FBoardMaster=false
sql="select * from board order by rootid,orders"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof
reBoard_Setting=split(rs("Board_Setting"),",")
if rs("parentID")>0 and rs("depth")>0 then
set trs=conn.execute("select boardmaster from board where boardid in ("&rs("ParentStr")&") order by orders")
do while not trs.eof
if Cint(reBoard_Setting(40))=1 and not FBoardMaster then
if instr("|"&trs(0)&"|","|"&membername&"|")>0 then
FBoardMaster=true
else
FBoardMaster=false
end if
end if
i=i+1
if FBoardMaster then exit do
if i>9 then exit do
trs.movenext
loop
end if
if boardmaster and instr("|"&rs("BoardMaster")&"|","|"&membername&"|")=0 then
dispboard=false
end if
if FBoardMaster then dispboard=true
if master or superboardmaster then dispboard=true
if dispboard then
if rs("depth")>0 then
for i=1 to rs("depth")
response.write " "
next
end if
if rs("child")>0 then
response.write "<img src=""pic/plus.gif"">"
else
response.write "<img src=""pic/nofollow.gif"">"
end if
%>
<a href="?action=userBoardPermission&boardid=<%=rs("boardid")%>&userid=<%=request("userid")%>&name=<%=request("name")%>">
<%
set trs=conn.execute("select uc_userid from UserAccess where uc_Boardid="&rs("boardid")&" and uc_userid="&request("userid"))
if not (trs.eof and trs.bof) then
response.write "<font color=red>"
end if
if rs("parentid")=0 then response.write "<b>"
response.write rs("boardtype")
if rs("parentid")=0 then response.write "</b>"
if rs("child")>0 then response.write "("&rs("child")&")"
end if
response.write "</font></a><br>"
FBoardMaster=false
dispboard=false
rs.MoveNext
loop
set trs=nothing
set rs=nothing
response.write "</td></tr></table>"
'-------------------end-------------------
end if
end sub
sub GetUserPermission()
if not AdminUserPer then
Errmsg=Errmsg+"<br>"+"<li>您没有权限执行此操作。"
founderr=true
exit sub
end if
dim usertitle
if not isnumeric(request("userid")) then
errmsg=errmsg+"<br><li>错误的用户参数。"
founderr=true
exit sub
end if
if not isnumeric(request("boardid")) then
errmsg=errmsg+"<br><li>错误的版面参数。"
founderr=true
exit sub
end if
if not founderr then
response.write "<table class=tableborder1 cellspacing=1 cellpadding=3 align=center>"
set rs=conn.execute("select u.UserGroupID,ug.title,u.username from [user] u inner join UserGroups UG on u.userGroupID=ug.userGroupID where u.userid="&request("userid"))
UserGroupID=rs(0)
usertitle=rs(1)
membername=rs(2)
set rs=conn.execute("select boardtype from board where boardid="&request("boardid"))
if rs.eof and rs.bof then
boardtype="论坛其他页面"
else
boardtype=rs(0)
end if
response.write "<tr><th colspan=6 height=23 align=left>编辑 "&membername&" 在 "&boardtype&" 权限</th></tr>"
response.write "<tr><td colspan=6 height=25 class=tablebody1>注意:该用户属于 <B>"&usertitle&"</B> 用户组中,如果您设置了他的自定义权限,则该用户权限将以自定义权限为主</td></tr>"
Dim reGroupSetting
Dim FoundGroup,FoundUserPermission,FoundGroupPermission
FoundGroup=false
FoundUserPermission=false
FoundGroupPermission=false
set rs=conn.execute("select * from UserAccess where uc_boardid="&request("boardid")&" and uc_userid="&request("userid"))
if not (rs.eof and rs.bof) then
reGroupSetting=split(rs("uc_Setting"),",")
FoundGroup=true
FoundUserPermission=true
end if
if not foundgroup then
set rs=conn.execute("select * from BoardPermission where boardid="&request("boardid")&" and groupid="&usergroupid)
if not(rs.eof and rs.bof) then
reGroupSetting=split(rs("PSetting"),",")
FoundGroup=true
FoundGroupPermission=true
end if
end if
if not foundgroup then
set rs=conn.execute("select * from usergroups where usergroupid="&usergroupid)
if rs.eof and rs.bof then
response.write "未找到该用户组!"
response.end
else
FoundGroup=true
FoundGroupPermission=true
reGroupSetting=split(rs("GroupSetting"),",")
end if
end if
%>
<FORM METHOD=POST ACTION="?action=saveuserpermission">
<input type=hidden name="userid" value="<%=request("userid")%>">
<input type=hidden name="BoardID" value="<%=request("boardid")%>">
<input type=hidden name="username" value="<%=membername%>">
<input type=hidden name="name" value="<%=membername%>">
<tr>
<td height="23" colspan="2" class=tablebody1><input type=radio name="isdefault" value="1" <%if FoundGroupPermission then%>checked<%end if%>><B>使用用户组默认值</B> (注意: 这将删除任何之前所做的自定义设置)</td>
</tr>
<tr>
<td height="23" colspan="2" class=tablebody1><input type=radio name="isdefault" value="0" <%if FoundUserPermission then%>checked<%end if%>><B>使用自定义设置</B> </td>
</tr>
<tr>
<th height="23" colspan="2" align=left>==查看权限</th>
</tr>
<tr>
<td height="23" width="60%" class=tablebody1>可以浏览论坛</td>
<td height="23" width="40%" class=tablebody1>是<input name="canview" type=radio value="1" <%if reGroupSetting(0)=1 then%>checked<%end if%>> 否<input name="canview" type=radio value="0" <%if reGroupSetting(0)=0 then%>checked<%end if%>></td>
</tr>
<tr>
<td height="23" width="60%" class=tablebody1>可以查看会员信息(包括其他会员的资料和会员列表)
</td>
<td height="23" width="40%" class=tablebody1>是<input name="canviewuserinfo" type=radio value="1" <%if reGroupSetting(1)=1 then%>checked<%end if%>> 否<input name="canviewuserinfo" type=radio value="0" <%if reGroupSetting(1)=0 then%>checked<%end if%>></td>
</tr>
<tr>
<td height="23" width="60%" class=tablebody1>可以查看其他人发布的主题
</td>
<td height="23" width="40%" class=tablebody1>是<input name="canviewpost" type=radio value="1" <%if reGroupSetting(2)=1 then%>checked<%end if%>> 否<input name="canviewpost" type=radio value="0" <%if reGroupSetting(2)=0 then%>checked<%end if%>></td>
</tr>
<tr>
<td height="23" width="60%" class=tablebody1>可以浏览精华帖子
</td>
<td height="23" width="40%" class=tablebody1>是<input name="canviewbest" type=radio value="1" <%if reGroupSetting(41)=1 then%>checked<%end if%>> 否<input name="canviewbest" type=radio value="0" <%if reGroupSetting(41)=0 then%>checked<%end if%>></td>
</tr>
<tr>
<th height="23" colspan="2" align=left>==<b>发帖权限</b></th>
</tr>
<tr>
<td height="23" width="60%" class=tablebody1>可以发布新主题</td>
<td height="23" width="40%" class=tablebody1>是<input name="cannewpost" type=radio value="1" <%if reGroupSetting(3)=1 then%>checked<%end if%>> 否<input name="cannewpost" type=radio value="0" <%if reGroupSetting(3)=0 then%>checked<%end if%>></td>
</tr>
<tr>
<td height="23" width="60%" class=tablebody1>可以回复自己的主题
</td>
<td height="23" width="40%" class=tablebody1>是<input name="canreplymytopic" type=radio value="1" <%if reGroupSetting(4)=1 then%>checked<%end if%>> 否<input name="canreplymytopic" type=radio value="0" <%if reGroupSetting(4)=0 then%>checked<%end if%>></td>
</tr>
<tr>
<td height="23" width="60%" class=tablebody1>可以回复其他人的主题
</td>
<td height="23" width="40%" class=tablebody1>是<input name="canreplytopic" type=radio value="1" <%if reGroupSetting(5)=1 then%>checked<%end if%>> 否<input name="canreplytopic" type=radio value="0" <%if reGroupSetting(5)=0 then%>checked<%end if%>></td>
</tr>
<tr>
<td height="23" width="60%" class=tablebody1>可以在论坛允许评分的时候参与评分(鲜花和鸡蛋)?
</td>
<td height="23" width="40%" class=tablebody1>是<input name="canpostagree" type=radio value="1" <%if reGroupSetting(6)=1 then%>checked<%end if%>> 否<input name="canpostagree" type=radio value="0" <%if reGroupSetting(6)=0 then%>checked<%end if%>></td>
</tr>
<tr>
<td height="23" width="60%" class=tablebody1>参与评分所需金钱
</td>
<td height="23" width="40%" class=tablebody1><input name="postagreemoney" type=text size=4 value="<%=reGroupSetting(47)%>"></td>
</tr>
<tr>
<td height="23" width="60%" class=Forumrow>可以上传附件
</td>
<td height="23" width="40%" class=Forumrow>是<input name="canupload" type=radio value="1" <%if reGroupSetting(7)=1 then%>checked<%end if%>> 否<input name="canupload" type=radio value="0" <%if reGroupSetting(7)=0 then%>checked<%end if%>>
发帖可以上传<input name="canupload" type=radio value="2" <%if reGroupSetting(7)=2 then%>checked<%end if%>> 回复可以上传<input name="canupload" type=radio value="3" <%if reGroupSetting(7)=3 then%>checked<%end if%>>
</td>
</tr>
<tr>
<td height="23" width="60%" class=Forumrow>一次最多上传文件个数
</td>
<td height="23" width="40%" class=Forumrow><input name="canuploadnum" type=text size=4 value="<%=reGroupSetting(40)%>"></td>
</tr>
<tr>
<td height="23" width="60%" class=Forumrow>一天最多上传文件个数
</td>
<td height="23" width="40%" class=Forumrow><input name="ba2" type=text size=4 value="<%=reGroupSetting(50)%>"></td>
</tr>
<tr>
<td height="23" width="60%" class=tablebody1>上传文件大小限制
</td>
<td height="23" width="40%" class=tablebody1><input name="MaxUploadSize" type=text size=4 value="<%=reGroupSetting(44)%>"> KB</td>
</tr>
<tr>
<td height="23" width="60%" class=tablebody1>可以发布新投票</td>
<td height="23" width="40%" class=tablebody1>是<input name="canpostvote" type=radio value="1" <%if reGroupSetting(8)=1 then%>checked<%end if%>> 否<input name="canpostvote" type=radio value="0" <%if reGroupSetting(8)=0 then%>checked<%end if%>></td>
</tr>
<tr>
<td height="23" width="60%" class=tablebody1>可以参与投票</td>
<td height="23" width="40%" class=tablebody1>是<input name="canvote" type=radio value="1" <%if reGroupSetting(9)=1 then%>checked<%end if%>> 否<input name="canvote" type=radio value="0" <%if reGroupSetting(9)=0 then%>checked<%end if%>></td>
</tr>
<tr>
<td height="23" width="60%" class=tablebody1>可以发布小字报</td>
<td height="23" width="40%" class=tablebody1>是<input name="cansmallpaper" type=radio value="1" <%if reGroupSetting(17)=1 then%>checked<%end if%>> 否<input name="cansmallpaper" type=radio value="0" <%if reGroupSetting(17)=0 then%>checked<%end if%>></td>
</tr>
<tr>
<td height="23" width="60%" class=tablebody1>发布小字报所需金钱</td>
<td height="23" width="40%" class=tablebody1><input name="smallpapermoney" type=text value="<%=reGroupSetting(46)%>" size=4></td>
</tr>
<tr>
<th height="23" colspan="2" align=left>==<b>帖子/主题编辑权限</b></th>
</tr>
<tr>
<td height="23" width="60%" class=tablebody1>可以编辑自己的帖子
</td>
<td height="23" width="40%" class=tablebody1>是<input name="caneditmytopic" type=radio value="1" <%if reGroupSetting(10)=1 then%>checked<%end if%>> 否<input name="caneditmytopic" type=radio value="0" <%if reGroupSetting(10)=0 then%>checked<%end if%>></td>
</tr>
<tr>
<td height="23" width="60%" class=tablebody1>可以删除自己的帖子
</td>
<td height="23" width="40%" class=tablebody1>是<input name="candelmytopic" type=radio value="1" <%if reGroupSetting(11)=1 then%>checked<%end if%>> 否<input name="candelmytopic" type=radio value="0" <%if reGroupSetting(11)=0 then%>checked<%end if%>></td>
</tr>
<tr>
<td height="23" width="60%" class=tablebody1>可以移动自己的帖子到其他论坛
</td>
<td height="23" width="40%" class=tablebody1>是<input name="canmovemytopic" type=radio value="1" <%if reGroupSetting(12)=1 then%>checked<%end if%>> 否<input name="canmovemytopic" type=radio value="0" <%if reGroupSetting(12)=0 then%>checked<%end if%>></td>
</tr>
<tr>
<td height="23" width="60%" class=tablebody1>可以打开/关闭自己发布的主题
</td>
<td height="23" width="40%" class=tablebody1>是<input name="canclosemytopic" type=radio value="1" <%if reGroupSetting(13)=1 then%>checked<%end if%>> 否<input name="canclosemytopic" type=radio value="0" <%if reGroupSetting(13)=0 then%>checked<%end if%>></td>
</tr>
<tr>
<th height="23" colspan="2" align=left>==<b>其他权限</b></th>
</tr>
<tr>
<td height="23" width="60%" class=tablebody1>可以搜索论坛
</td>
<td height="23" width="40%" class=tablebody1>是<input name="cansearch" type=radio value="1" <%if reGroupSetting(14)=1 then%>checked<%end if%>> 否<input name="cansearch" type=radio value="0" <%if reGroupSetting(14)=0 then%>checked<%end if%>></td>
</tr>
<tr>
<td height="23" width="60%" class=tablebody1>可以使用'发送本页给好友'功能
</td>
<td height="23" width="40%" class=tablebody1>是<input name="canmailtopic" type=radio value="1" <%if reGroupSetting(15)=1 then%>checked<%end if%>> 否<input name="canmailtopic" type=radio value="0" <%if reGroupSetting(15)=0 then%>checked<%end if%>></td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -