📄 forum_isaction.asp
字号:
<!-- #include file="include/con_forum.asp" -->
<%
if not isnumeric(forumid) then
call format_redirect("forum.asp")
end if
dim sel_id,re_id,aname,ducou
ducou=int(format_mid_num(29))
sel_id=trim(request.querystring("sel_id"))
re_id=trim(request.querystring("re_id"))
if var_null(sel_id)="" then
call format_redirect("forum_list.asp?forum_id="&forumid)
end if
select case action
case "revert"
aname="还原"
case "restore"
aname="修复"
case "rap"
aname="奖惩"
case "move"
aname="转移"
case "istop"
aname="固顶"
case "istops"
aname="总固顶"
case "isgood"
aname="精华"
case "islock"
aname="锁定"
case "del"
aname="删除一条回贴"
if not(isnumeric(re_id)) then
call format_redirect("forum_list.asp?forum_id="&forumid)
end if
case "delete"
aname="删除"
case "del_re"
aname="删除回贴"
case else
aname=""
action=""
call format_redirect("forum_list.asp?forum_id="&forumid)
end select
%>
<!-- #include file="include/jk_upload.asp" -->
<!-- #include file="include/con_forum_fir.asp" -->
<%
dim dim_cause,action_num,num_err,num_ok,nums
dim_cause="维护|奖励|好文章|内容不符|重复|灌水|广告"
ftit=""&aname&""
call forum_first()
call web_head(0,1,h_var3,0,0)
if action="istops" then
if forum_power_true("")=false then
call web_error("power")
end if
else
if forum_power_true(forumpower)=false then
call web_error("power")
end if
end if
call forum_load()
'----------------------------中间 开始----------------------------
call forum_grade()
call forum_top(tit)
if forum_config(13)>0 then
action_num=forum_config(13)
else
action_num=dim_num(36)
end if
response.write vbcrlf&"<table cellspacing=1 cellpadding=4 class=table>"
response.write vbcrlf&"<tr><td colspan=2 class=td0> "&img_skin(web_img_m)&" "&tit&"</td></tr>"
if is_chk() then
response.write "<tr><td colspan=2 class=bg_td align=center height=200>"
call forum_isaction_chk()
response.write "</td></tr>"
else
call forum_isaction_main()
end if
response.write vbcrlf&"</table>"
response.write vbcrlf&ukong
'----------------------------中间 结束----------------------------
call forum_end()
call web_end(0,0)
function is_chk()
is_chk=false
if trim(request.form("chk"))="yes" then
is_chk=joekoe_cms.post_chk()
end if
end function
sub forum_isaction_chk()
dim cause,c_topic,r_id,move_fid,pm,pn,ismail,m_topic,ddim,dnum,chk_msg,chk_num,chk_topic,chk_f,found_err
num_err=0
num_ok=0
chk_num=0
chk_topic=""
found_err=""
cause=trim(request.form("cause"))
if instr("|"&dim_cause&"|","|"&cause&"|")<1 then cause=""
if cause<>"" then cause="["&cause&"]"
c_topic=joekoe_cms.code_form(request.form("c_topic"))
pm=trim(request.form("pm"))
if pm<>"m" then pm="p"
pn=trim(request.form("pn"))
if not(isnumeric(pn)) then pn=0
pn=cint(pn)
if pn>action_num or pn<0 then pn=0
ismail=trim(request.form("ismail"))
m_topic=joekoe_cms.code_form(request.form("m_topic"))
if var_null(m_topic)="" then m_topic="没有"
m_topic=joekoe_cms.code_form(m_topic)
move_fid=trim(request.form("move_fid"))
if not(isnumeric(move_fid)) then move_fid=0
if cause="" and c_topic="" then
found_err=found_err&"+请先输入操作("&aname&")的原因!<br>"
end if
if action="move" then
if int(move_fid)<1 or int(move_fid)=int(forumid) then
found_err=found_err&"+请先选择将主题要转移至的论坛!<br>"
else
sql="select top 1 forum_w,forum_hidden from bbs_forum where forum_id="&move_fid
set rs=conn.execute(sql)
if rs.eof then
found_err=found_err&"+<font class=red>要转移至的论坛不存在!!!</font><br>"
else
if rs("forum_w")=false then
found_err=found_err&"+要转移至的论坛已设置不可发贴!<br>"
end if
if rs("forum_hidden")=true then
found_err=found_err&"+要转移至的论坛已设置隐藏!<br>"
end if
end if
rs.close
end if
end if
if found_err<>"" then
response.write found_error(found_err,200)
exit sub
end if
sel_id=replace(sel_id," ","")
ddim=split(sel_id,",")
dnum=ubound(ddim)
nums=dnum
for i=0 to dnum
if isnumeric(ddim(i)) then
chk_num=chk_num+1
call is_type(ddim(i),move_fid,cause,c_topic,pm,pn,ismail,m_topic,chk_topic,chk_f)
end if
next
erase ddim
if int(num_ok)>0 and (action="del" or action="delete" or action="move" or action="revert" or action="restore") then
call forum_new_info_update(forumid)
end if
chk_msg=aname
if int(chk_num)>1 then
chk_msg=chk_msg&chk_num&"帖主题"
else
chk_msg=chk_msg&"《"&chk_topic&"》"
end if
chk_msg=chk_msg&",原因:"&cause&c_topic&",分值操作:"&chk_f
response.write vbcrlf&"<table border=0>" & _
vbcrlf&"<tr><td align=center>恭喜,操作("&aname&")成功!</td></tr>" & _
vbcrlf&"<tr><td><font class=red2>"&chk_msg&"</font></td></tr>" & _
vbcrlf&"<tr><td>统计信息:共 <font class=red>"&chk_num&"</font> 项,成功 <font class=red>"&num_ok&"</font> 项,失败 <font class=red>"&num_err&"</font> 项</td></tr>" & _
vbcrlf&"<tr><td height=30>您现在可以选择以下操作:</td></tr>" & _
vbcrlf&"<tr><td> 1、<a href='forum_list.asp?forum_id=" & forumid & "'>返回 <b>" & forumname & "</b></a></td></tr>" & _
vbcrlf&"<tr><td> 2、<a href='forum.asp'>返回论坛首页</a></td></tr>" & _
vbcrlf&"<tr><td height=30>系统将在 "&dim_num(21)&" 秒钟后自动返回 <b>" & forumname & "</b> ……</td></tr>" & _
vbcrlf&"</table><meta http-equiv='refresh' content='"&dim_num(21)&"; url=forum_list.asp?forum_id=" & forumid & "'>"
end sub
sub is_type(ftid,t_move_fid,t_cause,t_c_topic,t_pm,t_pn,t_ismail,t_m_topic,t_chk_topic,t_chk_f)
if not int_true(ftid) then exit sub
dim n_istop
n_istop=0
sql="select id,topic,username,istop from bbs_topic where forum_id="&forumid&" and id="&ftid
if action="del" then
sql="select reply_id,topic,username from bbs_data where forum_id="&forumid&" and reply_id="&ftid&" and id="&re_id
end if
set rs=joekoe_cms.exec(sql,1)
if rs.eof and rs.bof then
rs.close
num_err=num_err+1
exit sub
end if
dim it_topic,it_id,it_chk_msg,id_username,sql_0,sql_u,sql_t,sql_e,re_counter,re_username,re_tim,it_integral,numd
it_id=rs(0)
it_topic=rs(1)
id_username=rs(2)
if action<>"del" then n_istop=rs(3)
rs.close
if action="del" then it_topic="本贴为回贴"
t_chk_topic=it_topic
it_chk_msg=aname&"帖子《"&it_topic&"》,原因:"&t_cause&t_c_topic&",分值操作:"
t_chk_f="没有"
sql_u=""
it_integral=0
if int(t_pn)>0 then
it_integral=int(t_pn)
sql_u="update user_data set integral=integral"
if t_pm="m" then
sql_u=sql_u&"-"
it_integral=-it_integral
t_chk_f="减"
else
sql_u=sql_u&"+"
t_chk_f="加"
end if
sql_u=sql_u&t_pn&" where username='"&id_username&"'"
t_chk_f=t_chk_f&t_pn&"分"
end if
it_chk_msg=it_chk_msg&t_chk_f
select case action
case "revert","restore"
sql_0="select count(id) from bbs_data where forum_id="&forumid&" and reply_id="&ftid
set rs=joekoe_cms.exec(sql_0,1)
re_counter=rs(0)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -