PrimsgID=request.QueryString("id")
If PrimsgID="" or IsNumeric(PrimsgID)=False then
response.Redirect("error.asp")
end if
strsql="select primsguser from primsg where primsgid="&PrimsgID
set rs=conn.execute(strsql)
if rs("primsguser")=session("username") or session("usergroup")=3 then
strsql="delete from primsg where primsgid="&PrimsgID
conn.execute(strsql)
else
response.Redirect("error.asp")
end if
rs.close
set rs=nothing
CloseDatabase
response.Redirect("primsg.asp")
%>