<!--#include file="../Include/Conn.asp" -->
<!--#include file="../Include/html.inc"-->
<% uname=session("cuid")
if request("del")="true" then
conn.Execute("delete * from company where uname='"&uname&"'")
conn.Execute("delete * from cmailbox where reid='"&uname&"'")
conn.Execute("delete * from zp where uname='"&uname&"'")
conn.Execute("delete * from cfavorite where uname='"&uname&"'")
conn.Execute("delete * from pfavorite where fuid='"&uname&"'")
response.write"<SCRIPT language=JavaScript>alert('用户注销成功！');"
response.write"this.location.href='../index.asp';</SCRIPT>"
end if

Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from company where uname='"&uname&"'and cname<>'""'"
rs.open sql,conn,1,1 %>
<% if rs.eof or rs.bof then
   response.write"<SCRIPT language=JavaScript>alert('您尚未登录公司资料，请先登录公司资料！');"
   response.write"javascript:history.go(-1);</SCRIPT>" 
   end if %>