📄 talkdel.asp
字号:
<!--插入html头部分以及数据库接口-->
<!--#include file="in_conn.asp"-->
<%
'获取传值
dim vtid
vtid=Request.QueryString("id")
if isNumeric(vtid) then
vtid=CLng(vtid)
else
Response.Redirect "resp.asp?cmd=talk_idmiss"
end if
%>
<body>
<!--插入网站置顶-->
<% if u_name="" then
Response.Redirect "log_err.asp"
else
%>
<!--#include file="in_topmb.asp"-->
<% end if %>
<script language="javascript">
function okpress(){
document.fm1.cmdok.disabled=true;
document.fm1.submit();
}
function cfa(){
if(document.fm1.chkfa.checked==true){
document.fm1.chkfa.value=1
}
else{
document.fm1.chkfa.value=0
}
}
</script>
<table align="center" width="700" height="50" border="0" cellspacing="0" cellpadding="11" class="rdkuang"><tr>
<td width="100%" height="100%" align="center">
<%
'找出相应记录
dim strdeltip
sqlstr="SELECT t_author,t_isreply,t_topic,t_kind FROM tbltalk WHERE t_ID="&vtid
rs.open sqlstr,conn,0,1
IF rs.eof AND rs.bof THEN
Response.Redirect "resp.asp?cmd=talk_idmiss"
END IF
'检查资格身份
'是否版主
dim isbanzhu
isbanzhu=1
dim rs35
set rs35=server.CreateObject("adodb.recordset")
sqlstr="SELECT master_1,master_2,master_3 FROM tblkind WHERE kd_ID="&rs("t_kind")
rs35.open sqlstr,conn,1,1
if u_name<>rs35("master_1") and u_name<>rs35("master_2") and u_name<>rs35("master_3") then
isbanzhu=0
end if
rs35.close
set rs35=nothing
IF rs("t_author")<>u_name AND u_power<2 THEN
Response.Write "<img src='img/jjerr.gif' border='0'> 很抱歉,你不是该帖的作者,您没有删除的权限!"
elseif rs("t_author")<>u_name AND u_name<>DEF_sysadm AND isbanzhu=0 then
rs.close
Response.Redirect "resp.asp?cmd=notkindmaster"
ELSE
if rs("t_isreply")=true then
strdeltip="确定要删除<font class='ft1'>"&rs("t_author")&"</font>的这篇回复吗?请确认!"
else
strdeltip="<b>删除主题:"&unhtml(rs("t_topic"))&"</b><br>确定要删除<font class='ft1'>"&rs("t_author")&"</font>的这篇主题吗?<br>其所有跟帖也将被一起删除哦,请确认!"
end if
%>
<FORM name="fm1" action="talkdel_deal.asp" method="post">
<table align="center" width="400" height="50" border="0" cellpadding="0" cellspacing="0"><tr>
<td width="100%" height="100%">
<% =strdeltip %>
<input type="hidden" name="hidID" value="<% =vtid %>">
<br>
<% if u_power>1 then %>
<br><input type="checkbox" name="chkfa" value="0" onClick="javascript:cfa();"> 带惩罚性质(被删帖的人的发水量将被扣除5吨!)
<% end if %>
<br><input type="button" name="cmdok" value=" 确定删除 " class="an" onClick="javascript:okpress()">
</td>
</tr></table>
</FORM>
<%
Response.Write "<a href='javascript:history.go(-1);'>[点击这里<Font color=red>返回</Font>]</a>"
END IF
rs.close
%>
</td>
</tr></table>
<br>
<!--插入在线统计-->
<!--#include file="in_online.asp"-->
<!--插入网站置底-->
<!--#include file="in_bottom.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -