<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%
If session("agentusername")="" 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 (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and starttime>'"&Request.QUERYSTRING ("starttime")&"' and starttime<'"&Request.QUERYSTRING ("endtime")&"' order by starttime asc"
 		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")%>
<%while not dsph.Eof%>
<table width="100%"  border="0" cellspacing="1" bgcolor="#000000">
  <tr>
    <td width="5%" align="center" bgcolor="#FFCC66">
<%=dsph("id")%>
    <td width="95%" bgcolor="#CCCCCC">用户名:<%=dsph("username")%> 主机头名:<%=replace(dsph("hostname"),":80:","")%>
	<%Set ds = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_USER where username='"&dsph("username")&"'"
		ds.Open Sql,conn,1,1
		if not ds.eof then
		%>　真名：<%=ds("truename")%>　地址：<%=ds("address")%>　电话：<%=ds("tel")%>　Email：<%=ds("email")%>
		
    <%else%>此用户已不存在！
    <%end if
		ds.close
		%>      开通时间:<%=dsph("starttime")%>　网站内容:<%=dsph("corewhat")%> </td>
  </tr>
</table>
<%
dsph.movenext
wend
dsph.close
set dsph=nothing
%>
<%=htmlwrite("html7")%>
<%end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>
