<!--#include file="check.asp"-->
<%Response.Expires=0
Response.Buffer=true
Server.ScriptTimeOut=2080
sjjh_name=Session("sjjh_name")
sjjh_grade=Session("sjjh_grade")
sjjh_jhdj=Session("sjjh_jhdj")
nowinroom=session("nowinroom")
if sjjh_name="" then Response.Redirect "../error.asp?id=440"
if session("sjjh_adminok")<>true then Response.Redirect "../chat/readonly/bomb.htm"
if sjjh_grade<>11 or instr(Application("sjjh_admin"),sjjh_name)=0  then Response.Redirect "../error.asp?id=439"
Response.write "即将清理无帐号存在的物品数据，此过程根据数据库的大小可能需要几分钟时间。<br><br><font color=blue>正在清理物品数据......</font><br><br>"
Response.Flush
Set conn=Server.CreateObject("ADODB.CONNECTION")
set rs=server.createobject("adodb.recordset")
conn.open Application("sjjh_usermdb")
sql="Select * From sjjh_wpname order by wp_user"
rs.open sql,conn,1,1
do while not rs.eof and not rs.bof 
	xxid=rs("wp_id")
	xxb=rs("wp_user")
        set rs2=server.createobject("adodb.recordset")
	sql2="select * from sjjh_jhuser where jh_user='"&xxb&"'"
        rs2.open sql2,conn,1,1
	if rs2.eof then
		sql2="delete from sjjh_wpname where wp_id="&xxid 
		conn.Execute(sql2)
        Response.write "×"
	else
        Response.write "√"
	end if
Rs2.close 
rs.movenext 
Response.Flush
loop 
conn.close
%>
<LINK href="css/css.css" type=text/css rel=stylesheet>
<body text=#000000 link=#003366 vLink=#006666>
<br><br><br><font color=red><b>所有无主人的物品清理完毕</font></b>