<%@ Language=VBScript %>
<%
If session("admau")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
ElseIf Request.QueryString ("id")="" Then
	ef=True
	ec="请输入产品ID！"
ElseIf not IsNumeric(Request.QueryString ("id"))  Then
	ef=True
	ec="ID应该是数字！"
ElseIf session("canadmhostset")="" Then
	ef=True
	ec="您没有此权限！"
end if

if not ef then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
	Set dsph = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Product_Host where id='"&Request.QueryString ("id")&"'"
			if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
	dsph.Open Sql,conn,1,1
if dsph.Eof then
	ef=True
	ec="不存在的虚拟主机！"
end if
end if


If not ef then
	Set dsserver = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Serverlist where id='"&dsph ("ServerlistID")&"'"
	dsserver.Open Sql,conn,1,1
if dsserver.Eof then
	ef=True
	ec="服务器不存在！"
Else
if dsserver("ostype")="linux" then
'Response.Redirect dsserver("site")
%>
<form name="form1" method="post" action="<%=dsserver("site")%>/CMD_LOGIN" ID="Form1">
<input type=hidden name=referer value="/">
<input name="username" type="hidden" value="<%=dsph("ftpname")%>">
<input name="password" type="hidden" value="<%=dsph("ftppassword")%>">
<input type="submit" name="Submit" value="正在自动登陆DA后台...........">
</form>
<script language="JavaScript">
document.Form1.submit();
</script>
<%response.end
End if
end if
end if


if ef then
Response.Redirect "e.asp?e="&ec
end if%>