<!-- #include file="setup.asp" -->
<!--#include file="z_dgconn.asp"-->
<%
top
dim id,candeletedg,founderr
founderr=false
candeletedg=false
if Request.Cookies("username")="" then
error("<li>您还还未<a href=login.asp>登陆</a>社区")
founderr=true
end if	
	
if Request("id")="" or (not isnumeric(Request("id"))) then
	error("<li>参数非法，请确认您是从有效连接进入")
	founderr=true
else
	id=clng(Request("id"))
end if
'==========判断是否可以删除点播 开始
master=split(administrators,"|")
for i = 1 to ubound(master)-1
mastera=master(i)
next

if not founderr then
	set rs=connDG.execute("select sender,incept from [media] where id="&id)
	if rs.bof and rs.eof then
		error("<li>参数非法，请确认您是从有效连接进入")
		founderr=true
	else 
	if rs(0)=Request("username") or rs(1)=Request("username") or Request.Cookies("username")="tonyhb" then
		candeletedg=true
	else
		error("<li>您没有删除此点播的权限")
		founderr=true	
	end if	
 end if	
end if	
'==========判断是否可以删除点播 结束	
if founderr or (not candeletedg) then
	call CloseDB()
else	
	sql="delete * from [media] where id="&id
	connDG.Execute(sql)
	call CloseDB()
succtitle="删除成功"
message=message&"<li><a href=default.asp>删除点播信息成功,返回上一页!</a><li><a href=default.asp>返回论坛首页</a>"
succeed(""&message&"<meta http-equiv=refresh content=3;url=Default.asp>")

end if
%>