if session("id")="" or session("ac")="" or session("user")="" then
response.write "" & chr(13) & "alert('您还未登录!');"&"window.location.href = 'index.asp'"&" "
Response.End
end if
if request("id")="all" then
sql="DELETE FROM message WHERE tid="&session("id")&" and ttype='"&session("user")&"'"
else
sql="DELETE FROM message WHERE id="&clng(request("id"))&"and tid="&session("id")&" and ttype='"&session("user")&"'"
end if
rs.Open sql,conn,1,1
set rs=nothing
set conn=nothing
response.write "" & chr(13) & "alert('删除成功,即将返回!');"&"window.location.href = 'message.asp'"&" "
%>