<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%
if not ef then
 
hostname=trim(replace(Request("hostname"),"http://",""))
if hostname<>"" then hostname=ComX.idntoac_7i24_com(cstr(hostname))
hostnamecheck=replace(hostname,".","")
hostnamecheck=replace(hostnamecheck,"xn--","")
If RegExpTest("[^A-Za-z0-9--]",hostnamecheck) Then
	ef=True
	ec="请输入合法的域名！"
end if
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 hostname+',' like '%:80:"&ComX.idntoac_7i24_com(cstr(hostname))&",%'"
			if Instr(1,sql, ";", 1)>0 or Instr(1,replace(sql,"xn--",""), "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end If
	dsph.Open Sql,conn,1,1
If dsph.Eof Then
		ef=True
		ec="主机不存在！"'&sql
end if
End If


if not ef then
%>

<TABLE 
            width="100%" border=1 align=center cellPadding=0 cellSpacing=0 borderColorLight=#cccccc borderColorDark=#fbfbfb>
  <TBODY>
    <TR>
      <TD height="40" align="center" vAlign=middle bgColor=#F3F3F3>主机真伪查询：</TD>
      <TD height="40" bgColor=#ffffff>　　您查询的域名：<%=hostname%>　在本系统中的虚拟主机存在。</TD>
    </TR>
    <TR>
      <TD height="40" align="center" vAlign=middle bgColor=#F3F3F3>虚拟主机状态：</TD>
      <TD height="40" bgColor=#ffffff>　　
          <%if dsph("endtime")>NOW then%>
          <%if dsph("istest")="y" then%>
          <font color="#FF0000">试用</font>
          <%else%>
          <%=dsph("status")%>
          <%if dsph("status")="暂停" then%>
        　原因：<font color="#FF0000"><%=dsph("pauseinfo")%></font>
        <%end if%>
        <%end if%>
        <%else%>
        <font color="#FF0000">过期</font>
        <%if dsph("status")="暂停" then%>
        <font color="#FF0000">暂停</font>
        <%end if%>
        <%end if%></TD>
    </TR>	
  </TBODY>
</TABLE>
<br>

<br>

<%
dsph.close
conn.Close
set conn=nothing
end if

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