<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%response.write "本页面已不再使用，如果您看到了本页面，表明您没有升级到最新版本"
response.end
If session("agentusername")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
ElseIf Request.QueryString ("hostname")="" and Request.QueryString ("ftpname")="" Then
	ef=True
	ec="必须输入一项内容！"
ElseIf Instr(1, Request.QueryString ("hostname"), "'", 1)>0 then
	ef=True
	ec="非法字符！"
ElseIf Instr(1, Request.QueryString ("ftpname"), "'", 1)>0 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")	
if Request.QueryString ("hostname")<>"" then Sql="Select * from FreeHost.FreeHost_Product_Host where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and hostname like '%"&replace(Request.QueryString ("hostname"),"http://","")&"%'"
if Request.QueryString ("ftpname")<>"" then Sql="Select * from FreeHost.FreeHost_Product_Host where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and ftpname like '%"&trim(Request.QueryString ("ftpname"))&"%'"
		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
%>
<!--#include virtual="/inc-freehost-function/htmlwrite.asp"--><%=htmlwrite("html5")%>
 　查找
 <%=htmlwrite("html6")%>
<%
if dsph.Eof then%>
没有此类的虚拟主机.	
<%else%>
<%while not dsph.Eof%>
<table width="100%"  border="0" cellspacing="1" bgcolor="#000000">
  <tr>
    <td width="9%" rowspan="2" align="center" bgcolor="#FFCC66">
<%=dsph("id")%>
    <td width="75%" bgcolor="#FFCC66">产品类型：<%=dsph("Hosttype")%> 主机头名:<%=replace(replace(dsph("hostname"),":80:",""),",","<br>")%>   FTP用户名:<%=dsph("ftpname")%> 
</td>
    <td width="8%" rowspan="2" align="center" bgcolor="#FFCC66"><%if dsph("endtime")>NOW then%>
      <%if dsph("istest")="y" then%>
      <strong><font color=#000099>目前处于试用期!</font></strong>
      <%else%>
      <font color="#FFFFFF"><%=dsph("status")%></font>
      <%end if%>
      <%else%>
      <font color="#FFFFFF"><strong>已过期！</strong></font>
      <%if dsph("status")="暂停" then%>
      <br>
      <font color="#FFFFFF">并且已暂停!</font>
      <%end if%>
      <%end if%></td>
    <td width="8%" rowspan="2" align="center" bgcolor="#FFCC66"><a href="hostadm2.asp?id=<%=dsph("id")%>&go=a" target="_blank">管理</a></td>
  </tr>
  <tr>
    <td bgcolor="#CCCCCC">开通时间:<%=dsph("starttime")%>　到期时间:<%=dsph("endtime")%> </td>
  </tr>
</table>
<%
dsph.movenext
wend
end if
dsph.close
set dsph=nothing
conn.Close 
set conn=nothing
%>
<%=htmlwrite("html7")%>
<%end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>
