<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<%
dim rs,sql,id,i,str2
id=trim(request("selectedid"))
if trim(id)="" then
response.write "<script language=JavaScript>" & chr(13) & "alert('没有选择记录！');" & "history.back()" & "</script>"
response.end
end if
str2=split(id,",")
set rs=server.createobject("adodb.recordset")
for i=0 to ubound(str2)
sql="select * from [link] where id="&cstr(str2(i))
rs.open sql,conn,1,1
'On Error Resume Next
rs.close
sql="delete from [link] where id="&cstr(str2(i))
rs.open sql,conn,1,3
next
response.write "<script language=JavaScript>" & chr(13) & "alert('删除链接成功！')</script>"
response.write "<meta http-equiv=refresh content=""1;URL=link.asp"">"
response.end
rs.close
set rs=nothing
closedb
%>