<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%response.write "本页面已不再使用，如果您看到了本页面，表明您没有升级到最新版本"
response.end
If session("agentusername")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
ElseIf RegExpTest("[^A-Za-z0-9]",Request.QueryString ("username")) Then
	ef=True
	ec="用户名中有非法字符！"
ElseIf RegExpTest("[^A-Za-z0-9]",Request.QueryString ("ftpname")) Then
	ef=True
	ec="FTP名中有非法字符！"	
ElseIf not IsNumeric(Request("id"))  Then
	ef=True
	ec="产品ID应该是数字！"
end if

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 username='"&Request.QueryString ("username")&"' and (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"')"
if Request.QueryString ("id") <>"" then Sql="Select * from FreeHost.FreeHost_Product_Host where id='"&Request.QueryString ("id")&"' and (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"')"
if Request.QueryString ("ftpname") <>"" then Sql="Select * from FreeHost.FreeHost_Product_Host where ftpname='"&Request.QueryString ("ftpname")&"' and (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"')"
if Request.QueryString ("hostname")<>"" then Sql="Select * from FreeHost.FreeHost_Product_Host where hostname like '%"&ComX.idntoac_7i24_com(cstr(hostname))&"%' and (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"')"
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="此用户并没有开通虚拟主机！"
end if
end if

if not ef then
	Set ds = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_USER where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and username='"&dsph ("username")&"'"
if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
		ds.Open Sql,conn,1,1
if ds.eof then
	ef=True
	ec="用户不存在!"
end if
end if

if not ef then
%>
<!--#include virtual="/inc-freehost-function/htmlwrite.asp"--><%=htmlwrite("html5")%>　虚拟主机管理
<%=htmlwrite("html6")%><br>

<table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#C8DAFF" id="t1">
  <tr height="24">
    <td width="13%" align="right" bgcolor="#ECF2FF"> 用户名：</td>
    <td width="87%" align="left" bgcolor="#FAFAFA">　<a href="searchuser.asp?username=<%=ds("username")%>" target="_blank"><%=ds("username")%></a> 　 <a href="javascript:document.formTop.action='/user/changeuseragn.asp';document.formTop.username.value='<%=ds("username")%>';document.formTop.submit();"><font color="#000000">切换成此用户角色>>>(用户区点注销会自动退回管理区)</font></a>　 <a href="#"  onClick="t1.style.display='none';"><font color="#6595D6">X</font></a></td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 金额：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("usermoney")%> </td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 电子邮件：</td>
    <td align="left" bgcolor="#FAFAFA">　<a href=mailto:<%=ds("email")%>><font color="#000000"><%=ds("email")%></font></a> </td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> QQ：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("qq")%> </td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right">代理名：</td>
    <td align="left" bgcolor="#FAFAFA">　<%if ds("agent1")<>"n" then%>
      <a href="searchagent.asp?username=<%=ds("agent1")%>" target="_blank"><font color="blue"><%=ds("agent1")%></font></a>
      <%end if%></td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"><div align="right">中文名：</div></td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("truename")%> </td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 联系地址：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("address")%> 　邮编：<%=ds("postid")%> </td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 电话：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("tel")%> 　传真：<%=ds("fax")%> </td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 备注：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("coreinfo")%></td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 身份证号码：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("perid")%></td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 注册ip：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("regip")%> </td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 注册时间：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("regtime")%> </td>
  </tr>
</table>
              <form action="handhost2.asp" method="post" name="form1">
                <%if not dsph.eof then%>
                <DIV class="tableborder">
                  <table width="100%" border="0" cellspacing="1" cellpadding="2" align="center">
                    <tr bgcolor="#C1BFBF" align="center">
                      <td height="24" colspan="2" background="img/tablebg.gif"><font color="#FFFFFF">编号</font></td>
                      <td background="img/tablebg.gif"><font color="#FFFFFF">产品类型</font></td>
                      <td width="10%" height="24" background="img/tablebg.gif"><font color="#FFFFFF">用户名</font></td>
                      <td width="10%" height="24" background="img/tablebg.gif"><font color="#FFFFFF">域　名</font></td>
                      <td width="9%" height="24" background="img/tablebg.gif"><font color="#FFFFFF">FTP名</font></td>
                      <td width="8%" height="24" background="img/tablebg.gif"><font color="#FFFFFF">IP 地址</font></td>
                      <td width="11%" height="24" background="img/tablebg.gif"><font color="#FFFFFF">开通日期</font></td>
                      <td width="11%" height="24" background="img/tablebg.gif"><font color="#FFFFFF">到期日期</font></td>
                      <td width="7%" height="24" background="img/tablebg.gif"><font color="#FFFFFF">状态</font></td>
                      <td width="3%" height="24" background="img/tablebg.gif"><font color="#FFFFFF">ICP</font></td>
                      <td width="2%" background="img/tablebg.gif"><font color="#FFFFFF">管理</font></td>
                    </tr>
                    <%while not dsph.Eof%>
                    <%

	Hosttype=dsph("Hosttype")
	Set ori_host_name = Server.CreateObject("ADODB.Recordset")	
		Sql="Select id from FreeHost.FreeHost_HostProductlist where Hosttype='"&dsph("Hosttype")&"'"
		ori_host_name.Open Sql,conn,1,1
		if not ori_host_name.eof then
Set newname_host = Server.CreateObject("ADODB.Recordset")	
Sql="Select Hosttype from FreeHost.FreeHost_HostProductlist_AGN where agent1='"&session("agentusername")&"' and id='"&ori_host_name("id")&"'"
		newname_host.Open Sql,conn,1,1
if not newname_host.eof then Hosttype=newname_host("Hosttype")
newname_host.close
end if
ori_host_name.close

hostname=dsph("hostname")
hostname=replace(hostname, ":80:","")
hostname_arry=Split(hostname, ",")
 
	%>
                    <tr align="center" bgcolor="#E4EAF2">
                      <td width="6%"><%=dsph("id")%></td>
                      <td width="4%"><input type="radio" name="id" value="<%=dsph("id")%>" <%if dsph.RecordCount=1 then%>checked<%end if%>></td>
                      <td><%=Hosttype%>
                          <%if isAgnHostSer then%>
                          <br>
          (独立模式)
          <%end if%>
          <%if dsph("allowsub")="y" then%>
          　 <br>
          允许绑定子目录 <%=dsph("subweb")%> 个
          <%end if%></td>
                      <td height="30"><a href="searchuser.asp?username=<%=dsph("username")%>"><%=dsph("username")%></a></td>
                      <td><%for idname=0 to ubound(hostname_arry)%>
                        <a href="http://<%=hostname_arry(idname)%>" target="_blank">
                        <%if ComX.actoidc_7i24_com(cstr(hostname_arry(idname)))<>hostname_arry(idname) then%>
                        <%=ComX.actoidc_7i24_com(cstr(hostname_arry(idname)))%> (<%=hostname_arry(idname)%>)
                        <%else%>
                        <%=hostname_arry(idname)%>
                        <%end if%>
                        </a><br>
                        <%next%></td>
                      <td bgcolor="#E4EAF2"><%=dsph("ftpname")%><br>                          </td>
                      <td><%
	Set dsserver = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Serverlist where id='"&dsph ("ServerlistID")&"'"
	dsserver.Open Sql,conn,1,1
if not dsserver.eof then%>
                          <%=dsserver("ip")%>
                          <%end if
FreeHostsharekey=dsserver("FreeHostsharekey")
URL=dsserver("site")
dsserver.close
%></td>
                      <td width="11%"><%=dsph("starttime")%></td>
                      <td width="11%"><%=dsph("endtime")%></td>
                      <td width="7%"><%if dsph("endtime")>NOW then%>
                          <%if dsph("istest")="y" then%>
                          <font color="#FF0000">试用</font>
                          <%else%>
                          <%=dsph("status")%>
                          <%end if%>
                          <%else%>
                          <font color="#FF0000">过期</font>
                          <%if dsph("status")="暂停" then%>
                          <br>
                          <font color="#FF0000">暂停</font>
                          <%end if%>
                          <%end if%></td>
                      <td width="3%"><a href="hostadm2.asp?id=<%=dsph("id")%>&go=b">
                        <%if dsph("beianstatus")="备案成功" then%>
                        <FONT color=red>成功</FONT>
                        <%else%>
                        <FONT color=#000000>备案</FONT>
                        <%end if%>
                      </a></td>
                      <td width="2%"><a href="hostadm2.asp?id=<%=dsph("id")%>&go=a"><font color="#000000">面板</font></a></td>
                    </tr>
                    <%username=dsph("Ftpname")


if (instr(1,returnstr,"用户不存在！")>0) then %>
                    <font color=red>服务器上没有找到此用户，修复此用户</font>
                    <input type="submit" name="Submit" value="马上重开此用户">
                    <br>
                    <%end if
if returnstr="" then
%>
                    
                    <%=returnstr%>
                    <%
end if 
%>
                    <%
dsph.movenext
wend%>
                  </table>
                </div>
                <%dsph.close
set dsph=nothing
else%>
                <DIV class="tableborder"><br>
                    <br>
    没有相关的记录。<br>
    <br>
                </div>
                <%end if%>
                <br>
                <DIV class="tableborder">                </div>
              </form>
              <%=htmlwrite("html7")%>
<%end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>
