<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<!--#include virtual="/inc-freehost-function/FreeHostFunction.asp"-->
<%server.ScriptTimeout =20
If session("agentusername")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
elseIf session("canmyserver")="" Then
	ef=True
	ec="您没有此操作的权限。"
ElseIf not IsNumeric(Request("id"))  Then
	ef=True
	ec="ID应该是数字！"
ElseIf Request("id")=""  Then
	ef=True
	ec="ID应该是数字！"
end if

if not ef then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
	Set dsHostserver = Server.CreateObject("ADODB.Recordset")	
Sql="Select * from FreeHost.FreeHost_Serveremaillist where id='"&Request("id")&"' and (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"')"
		dsHostserver.Open Sql,conn,1,1
If dsHostserver.Eof Then
	ef=True
	ec="服务器不存在。"
end if
end if

if not ef then
Response.Write SystemEmailTest(Request("id"))
end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>