📄 comment_del_ad.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="data.asp"-->
<!--#include file="char.asp"-->
<!--#include file="header.inc"-->
<!--#include file="md5.asp"-->
<%
If IsEmpty(request("id")) OR IsEmpty(request("dataid")) Then
errorstr="URL错误"
errorbox(errorstr)
End If
dim id,dataid,idx,dataidx,user,pass
if request("action") = "delete" Then
idx=Request.Form("id")
dataidx=Request.Form("dataid")
if idx="" OR dataidx="" then
errorstr="表单数据丢失.系统不能进行下一步"
errorbox(errorstr)
End If
set rs=conn.execute("select ID,DataID from Comment where id="&idx&" and DataID="&dataidx&"")
if rs.bof and rs.bof then
errorstr="该回复不存在"
errorbox(errorstr)
End If
rs.close
set rs=nothing
user=replace(trim(request("user")),"'","")
pass=replace(trim(Request("pass")),"'","")
if user="" or pass="" then
errorstr="用户名或者密码为空时候不允许登陆"
errorbox(errorstr)
end if
pass=md5(pass)
set rs=conn.execute("select * from admin where id=1")
If (user=rs("Adminuser") and pass=rs("AdminPass")) Then
Conn.Execute("delete from Comment where id="&idx&" and DataID="&dataidx&"")
Successstr="您所提交的内容已经成功的清除"
Successbox(Successstr)
rs.close
conn.close
set rs=nothing
set conn=nothing
Else
errorstr="您提交的用户名和密码被系统否认"
errorbox(errorstr)
End If
Else
id=request("id")
dataid=request("dataid")
%>
<br><br><br><br>
<form name="form" method="post" action="Comment_del_ad.asp?action=delete">
<table width=200 cellspacing=1 cellpadding=0 align=center class=tableBorder1>
<tr><th height=25 colspan="2" align="left"> 删除评论</td></tr>
<tr><td height=25 align="right" class="TableBody1">user</td>
<td height=25 class="TableBody1"><input name="user" type="TEXT"size="10"></td></tr>
<tr><td height=25 align="right" class="TableBody1">pass</td>
<td height=25 class="TableBody1">
<input name="pass" TYPE="PASSWORD" size="10">
<INPUT TYPE="hidden" name="id" value="<%=id%>">
<INPUT TYPE="hidden" name="dataid" value="<%=dataid%>">
</td></tr>
<tr><td height=25 colspan="2" align="center" class="TableTitle2"><input type="submit" name="submit" value="Delete"></td></tr>
</table>
</form>
<br><br><br><br>
<%
End If
%>
<!--#include file="footer.inc"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -