<%@ Language=VBScript %> <% If session("agentusername")="" Then ef=True ec="授权非法,有可能是超时造成的。" ElseIf not IsNumeric(Request("id")) Then ef=True ec="编号必须是数字" end if if not ef then Set conn=Server.CreateObject("ADODB.Connection") conn.Open Application("FreeHostDBlink") Set ds = Server.CreateObject("ADODB.Recordset") Sql="Select * from FreeHost.FreeHost_News where username='"&session("agentusername")&"' and id='"&Request("id")&"'" ds.Open Sql,conn,1,3 if ds.Eof then ef=True ec="没找到要删除的ID!" end if if not ef then ds.delete ds.Update ds.Close set ds=nothing conn.Close set conn=nothing Response.Redirect "setnews.asp" end if end if if ef then Response.Redirect "e.asp?e="&ec end if%>