WebID = Request("WebID")
if (WebID="") then Response.Redirect ("error.asp?id=001")
%>
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select ServerID,WebState,HostIP,FtpName,UserId from [Host_OK] where WebID=" & WebID
rs.open sql,conn,1,3
if rs.bof and rs.eof then Response.Redirect("error.asp?id=003")
ServerID=rs("ServerID")
HostIp=rs("HostIp")
UserId=rs("UserId")
FtpName=rs("FtpName")
rs.close
Set Autohost = Server.CreateObject("autohost.Createhost")
Autohost.HostIp=HostIp
Autohost.HostPort=Port
Autohost.Guid=Guid
Autohost.HostAction="delweb"'动作。站点删除命令
Autohost.HostIndex=ServerID'站点的INDEX
Autohost.HostUser=FtpName'FTP用户名
ReturnValue=Autohost.send'提交服务器执行
set Autohost=nothing
'以下是对返回值进行处理
if instr(ReturnValue,"失败") then
Response.Redirect("error.asp?ID=012")
elseif instr(ReturnValue,"BUSING") then
Response.Redirect("error.asp?ID=016")
elseif instr(ReturnValue,"CLOSE") or ReturnValue="" then
Response.Redirect("error.asp?ID=017")
elseif instr(ReturnValue,"非法命令") then
Response.Redirect("error.asp?ID=019")
elseif instr(ReturnValue,"非法用户") then
Response.Redirect("error.asp?ID=020")
end if
sql0="delete from [Domain_OK] where WebID=" & WebID
conn.Execute(Sql0)
sql1="delete from [Host_OK] where WebID=" & WebID '& " and ServerID='"&ServerID&"'"
conn.Execute(Sql1)
Response.Redirect("hostlist.asp")
%>