dellping.asp

来自「采用三级目录」· ASP 代码 · 共 44 行

ASP
44
字号
<%
  if session("admin")="" then
  response.redirect "admin.asp"
  else
	if session("flag")>1 then
		response.write "<br><p align=center>您没有操作的权限</p>"
		response.end
	else
%>
<!-- #include file="conn.asp" -->
<%
dim articleid
    set rs=server.CreateObject ("ADODB.Recordset") 

rs.open "Select * from ping where id="&request("id") ,conn,2,3  
articleid=rs("articleid")
rs.delete  
rs.close
        set rs=server.createobject("adodb.recordset")
if left(articleid,1)="w" then
if not isNumeric(right(articleid,(len(articleid)-1))) then response.redirect "err.asp?id=14"
	sql="select ping from soft where id="&right(articleid,(len(articleid)-1))
else
if left(request("articleid"),1)="f" then
if not isNumeric(right(articleid,(len(articleid)-1))) then response.redirect "err.asp?id=14"
	sql="select ping from film where id="&right(articleid,(len(articleid)-1))
else
if not isNumeric(articleid) then response.redirect "err.asp?id=14"
	sql="select ping from article where articleid="&articleid
end if
end if
	rs.open sql,conn,1,3
        rs("ping")=rs("ping")-1
        rs.update
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing  
        
Response.Write "<script>window.alert('评论删除成功!');window.location='adminping.asp';</script>"     
	end if
  end if
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?