<%
'-------------------------------------------------
'广州星外信息科技有限公司保留所有权利
'此代码的版权已在国家版权局登记
'有任何法律问题请联系网站律师
'http://sys.7i24.com
'-------------------------------------------------

showchineseinfo=true'改成false就不会提示中文提示信息.

If Not RegExpTest("[.A-Za-z0-9--]",Request.ServerVariables("SERVER_NAME")) Then
Response.Write "非法字符！"
Response.End
End If

if left(Request.ServerVariables("SERVER_NAME"),5)="mail." Then
If RegExpTest("[.A-Za-z0-9--]",Request.ServerVariables("SERVER_NAME")) then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
Set dspdallemail = Server.CreateObject("ADODB.Recordset")
		Sql="Select id from FreeHost.FreeHost_Product_ALLEmail where emailname='"&Application("admmailname")&"@"&Right(Request.ServerVariables("SERVER_NAME"),Len(Request.ServerVariables("SERVER_NAME"))-5)&"'"
		dspdallemail.Open Sql,conn,1,1
if not dspdallemail.Eof Then
dspdallemail.close
Set dspdallemail=Nothing
conn.close
Set conn=Nothing
Response.Redirect "http://"&Request.ServerVariables("SERVER_NAME")&":8888/"
Else
dspdallemail.close
Set dspdallemail=Nothing
conn.close
Set conn=Nothing
session("nomailname")=true
'server.Transfer "nohost.asp"
End if
End If
End if



Dim hostname,conn,ds,sql,url,ip,outcon
If showchineseinfo=True then Response.Write "<html><head>"
hostname=Request.ServerVariables("SERVER_NAME")
'hostname=replace(hostname,"www.","")
Set conn=Server.CreateObject("ADODB.Connection")
    conn.Open Application("FreeHostDBlink")
	Set ds = Server.CreateObject("ADODB.Recordset")	
	Sql="Select url,homename,havecheck,re From FreeHost.FreeHost_Product_URLRE where hostname='"&hostname&"'"
			if Instr(1,sql, ";", 1)>0 or Instr(1,replace(sql,"xn-",""), "--", 1)>0 then
outcon="非法字符！"
Response.End
end if
	ds.Open Sql,Conn,1,1
if not ds.EOF then

url=ds("url")

if ds("havecheck")="n" and Application("urlcheck")=true then
Response.Write "此域名尚未通过审查，请耐心等候管理员审查。"
Response.End
end if

if ds("havecheck")="x" then
Response.Write "此域名审查不通过，请重设转向目标地址。"
Response.End
end if

Response.Write "<title>"&ds("homename")&"</title><meta http-equiv=Content-Type content=text/html; charset=gb2312>"
if ds("re")="y" then
Response.Write "<meta http-equiv=refresh content=""0;URL="&url&""">"
else
Response.Write "</head>"
Response.Write "<frameset rows=0,436 cols=* border=0 framespacing=0 frameborder=NO>"
Response.Write "<frame src="""">"
Response.Write "<frame src="""&url&"""></frameset>"
end if
Response.Write "</html>"
else
'Response.Write "</head><body>没有这个URL转向域名</body></html>"

response.Status=400 
%>
<%If showchineseinfo=True then%></head><body><%End if%><h1>Bad Request (Invalid Hostname)</h1><%If showchineseinfo=True then%>
<br>没有这个URL转向域名

<%If session("nomailname")=True then%>
由于备案要求的原因,所有域名要绑定才能访问,您现在看到这个页面,是因为您尚未在用户区,邮箱面板中,绑定<%=Right(Request.ServerVariables("SERVER_NAME"),Len(Request.ServerVariables("SERVER_NAME"))-5)%>域名,请您先绑定它.
<%End if%>
<br><br><br><br>本页面的提示信息可以修改,文件位置在/nohost.asp,您可以在这儿您可以填写自己的网页内容,例如域名没有绑定,没有备案

</body></html>
<%End if%>
<%
session.Abandon()
response.end

end if
ds.close
set ds=nothing
conn.close
set conn=Nothing
Function RegExpTest(patrn, strng)
  Dim regEx
  Set regEx = New RegExp
  regEx.Pattern = patrn
  regEx.IgnoreCase = False
  RegExpTest = regEx.Test(strng)
End Function 
%>