<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%
server.ScriptTimeout =240
If session("admau")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
elseIf session("canshowagn")="" Then
	ef=True
	ec="您没有此操作的权限。"
ElseIf Request("username")="" and Request("truename")="" and Request("email")=""  and Request("domain")="" And Request("qq")="" And Request("tel")="" And Request("perid")="" And Request("mobi")="" Then
	ef=True
	ec="必须输入一项内容！"
ElseIf RegExpTest("[^A-Za-z0-9]",Request("username")) Then
	ef=True
	ec="用户名非法字符！"
ElseIf RegExpTest("[^A-Za-z0-9]",Request("qq")) Then
	ef=True
	ec="qq非法字符！"
ElseIf RegExpTest("[^A-Za-z0-9]",Request("tel")) Then
	ef=True
	ec="电话非法字符！"
ElseIf RegExpTest("[^A-Za-z0-9]",Replace(Request("mobi"),"-","")) Then
	ef=True
	ec="mobi电话非法字符！"
ElseIf RegExpTest("[^A-Za-z0-9]",Request("perid")) Then
	ef=True
	ec="身份证非法字符！"
elseif Request("email")<>"" And RegExpTest("^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$",Request("email"))=false then
	ef=True
	ec="邮箱不正确！"
ElseIf RegExpTest("[^\u4e00-\u9fa5]",Request("truename")) Then
	ef=True
	ec="姓名中有非法字符！"
ElseIf RegExpTest("[^\u4e00-\u9fa5]",Request("address")) Then
	ef=True
	ec="地址中只能输入中文！"
ElseIf Instr(1,Request("username"), "'", 1)>0 or Instr(1,Request("truename"), "'", 1)>0 or Instr(1,Request("address"), "'", 1)>0 or Instr(1,Request("email"), "'", 1)>0 Then
	ef=True
	ec="非法字符！"
end If

if not ef then
 
hostname=trim(replace(Request("domain"),"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
hostname=Request("domain")
end if

if not ef then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
	Set ds = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Agent where username='"&LCase(Trim(Request("username")))&"'"
if Request("like")="y" then	Sql="Select * from FreeHost.FreeHost_Agent where username like '%"&Request("username")&"%'"
if Request("truename")<>"" then	Sql="Select * from FreeHost.FreeHost_Agent where truename like '%"&Request("truename")&"%'"
if Request("email")<>"" then	Sql="Select * from FreeHost.FreeHost_Agent where email like '%"&Request("email")&"%'"
if Request("address")<>"" then	Sql="Select * from FreeHost.FreeHost_Agent where address like '%"&Request("address")&"%'"

if Request("qq")<>"" then	Sql="Select * from FreeHost.FreeHost_Agent where qq like '%"&Request("qq")&"%'"
if Request("tel")<>"" then	Sql="Select * from FreeHost.FreeHost_Agent where tel like '%"&Request("tel")&"%'"
if Request("perid")<>"" then	Sql="Select * from FreeHost.FreeHost_Agent where perid like '%"&Request("perid")&"%'"
if Request("mobi")<>"" then	Sql="Select * from FreeHost.FreeHost_Agent where mobi like '%"&Request("mobi")&"%'"
'response.write sql
'response.end
		if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if

if Request("domain")<>"" then
Sqlnew="Select * from FreeHost.FreeHost_Agent_ALLdomain where domain like '%"&hostname&"'"
Set dsagentdomain = Server.CreateObject("ADODB.Recordset")	
		if Instr(1,Sqlnew, ";", 1)>0 or Instr(1,Sqlnew, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
		dsagentdomain.Open Sqlnew,conn,1,1
if not dsagentdomain.Eof then
Sql="Select * from FreeHost.FreeHost_Agent where username = '"&dsagentdomain ("username")&"'"
else
	ef=True
	ec="用户不存在！"
end if
dsagentdomain.close
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("html8")%>
<%=htmlwrite("html9")%>

<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0 background="img/midtop4.gif">
  <TBODY>
    <TR>
      <TD width=53 align="left" background="img/midtop1.gif" onClick="ShowDtable(1,6)"><strong> 　 </strong><font color="#FFFFFF">─<strong>&gt;</strong></font> </TD>
      <TD width="83"><table height="59"  border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="7" background="img/midtop.gif">&nbsp;</td>
            <td width="60" align="center" valign="middle" background="img/r3.jpg" style="FONT-WEIGHT: bolder; Cursor:hand"    id="tableTop1"><font color="#FFFFFF"> 代理资料</font><br></td>
            <td width="5" background="img/midtop2.gif">&nbsp;</td>
          </tr>
      </table></TD>
      <TD width="83">&nbsp;</TD>
      <TD width="83">&nbsp;</TD>
      <TD width="83" align="left">&nbsp;</TD>
      <TD width="83" align="left">&nbsp;</TD>
      <TD align="left">&nbsp;</TD>
      <TD width=23 align="right"><IMG height=59 
                  src="img/rtop4.jpg" 
                  width=19></TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0>
  <TBODY>
    <TR>
      <TD width=19 background="img/midlef.gif"  id=rightid>&nbsp;</TD>
      <TD height="462" align="left" vAlign=top background="contopa.gif" bgcolor="#FFFFFF"><table width="98%"  border="0" cellspacing="0" cellpadding="0" id="table2">
          <tr>
            <td width="10" height="23" background="img/contopa.gif">&nbsp;</td>
            <td height="23" align="left" valign="top" background="img/contopb.gif"><table width="100%"  border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td height="8" colspan="3"></td>
                </tr>
                <tr>
                  <td width="25">&nbsp;</td>
                  <td align="left" valign="top"><font color="#FFFFFF"><strong>查找的结果</strong></font></td>
                  <td width="10"><a href="#"  onClick="table2.style.display='none';"></a></td>
                </tr>
            </table></td>
            <td width="10" height="23" background="img/contopc.gif">&nbsp;</td>
          </tr>
          <tr>
            <td background="img/conmid1.gif">&nbsp;</td>
            <td>

<div id="truecon">
<%while not ds.eof%>
<table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#C8DAFF">
  <tr height="24">
    <td width="13%" align="right" bgcolor="#ECF2FF"> <b>代理名</b>：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("username")%> 　<a href="delagent.asp?username=<%=ds("username")%>"><font color="#000000">马上删除此代理&gt;&gt;&gt;</font></a>　 <a href="javascript:document.formTop.action='/agent/changeagn.asp';document.formTop.username.value='<%=ds("username")%>';document.formTop.submit();"><font color="#000000">切换成此代理角色>>>(代理区点注销会自动退回管理区)</font></a>　</td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 金额：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("usermoney")%> 元　　　　<a href="/user/myprice.asp?username=<%=ds("username")%>" target=_blank><font color="#000000">查看此代理的价格列表&gt;&gt;&gt;</font></a> 　<a href="usercheckid.asp?username=<%=ds("username")%>" target="_blank">修改/审核注册资料
        <%If Application("mustcheckid")=True and ds("havechnR")=true Then%>
        <font color="#FF0000">(资料已改待审核)</font>
        <%end if%>
    </a>　 <%If ds("haveblock")=True Then%>
      <a href="blockagent.asp?username=<%=ds("username")%>&op=0" target="_blank"><font color="#FF0000">(代理已锁定点击解锁)</font></a><%else%><a href="blockagent.asp?username=<%=ds("username")%>&op=1" target="_blank">锁定代理</a>
      <%end if%>　<a href="moneyall.asp?username=<%=ds("username")%>">财务</a></td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 类型：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("agenttype")%> 　　　　　<a href="admagentprice.asp?username=<%=ds("username")%>"><font color="#000000">手工设置此</font><font color="#000000">代理的价格&gt;&gt;&gt;</font></a> </td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 代理级数：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("agentdegree")%>(直接代理级数是零)</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"> 名下所有用户的资金总和：</td>
    <td align="left" bgcolor="#FAFAFA">　
        <%
'domain
	Set dsagnuserall = Server.CreateObject("ADODB.Recordset")	
    Sql="Select usermoney=sum(usermoney) from FreeHost.FreeHost_User WHERE (agent1='"&ds("username")&"' or agent2='"&ds("username")&"')"
		dsagnuserall.Open Sql,conn,1,1%>
        <%=dsagnuserall("usermoney")%>　元 <a href="admuserlistuser.asp?username=<%=ds("username")%>"><font color="#000000">列出名下所有用户&gt;&gt;
        <%dsagnuserall.close
	Set dsagnall = Server.CreateObject("ADODB.Recordset")	
    Sql="Select count(*) from FreeHost.FreeHost_User WHERE (agent1='"&ds("username")&"' or agent2='"&ds("username")&"')"
		dsagnall.Open Sql,conn,1,1%>
    共：<%=dsagnall(0)%>　个<br>
    <%
dsagnall.close
%>
      </font></a></td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 名下所有代理的资金总和：</td>
    <td align="left" bgcolor="#FAFAFA">　
      <%
'domain
	Set dsagnall = Server.CreateObject("ADODB.Recordset")	
    Sql="Select usermoney=sum(usermoney) from FreeHost.FreeHost_Agent WHERE (agent1='"&ds("username")&"' or agent2='"&ds("username")&"')"
		dsagnall.Open Sql,conn,1,1%><%=dsagnall("usermoney")%>　元
<%
dsagnall.close
%>
<a href="admuserlistagent.asp?username=<%=ds("username")%>"><font color="#000000">列出名下所有代理&gt;&gt;
<%
	Set dsagnall = Server.CreateObject("ADODB.Recordset")	
    Sql="Select count(*) from FreeHost.FreeHost_Agent WHERE (agent1='"&ds("username")&"' or agent2='"&ds("username")&"')"
		dsagnall.Open Sql,conn,1,1%>
共：<%=dsagnall(0)%>　个
<%
dsagnall.close
%>
</font></a></td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 权限：</td>
    <td align="left" bgcolor="#FAFAFA">　子代理权限：
        <%if ds("cannextagn")="y" then%>
        <font color=red>有</font>
        <%else%>
    无
    <%end if%>
    　　 API权限：
    <%if ds("canuseapi")=true then%>
    <font color=red>有</font>
    <%else%>
    无
    <%end if%>
    　　 自己的网上支付接口权限：
    <%if ds("canusenetpay")=true then%>
    <font color=red>有</font>
    <%else%>
    无
    <%end if%>
    　　 独立模式权限：
    <%if ds("canmyserver")="y" then%>
    <font color=red>有</font>
    <%else%>
    无
    <%end if%>
    </td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 服务的域名：</td>
    <td align="left" bgcolor="#FAFAFA"><%
'domain
	Set dsagentdomain = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Agent_ALLdomain where username='"&ds("username")&"'"
		dsagentdomain.Open Sql,conn,1,1
while not dsagentdomain.Eof%>
　　<a href="http://<%=dsagentdomain("domain")%>" target="_blank"><font color="#000000">http://<%=dsagentdomain("domain")%></font></a><br>
      <%
dsagentdomain.movenext
Wend
dsagentdomain.close
set dsagentdomain=nothing
%></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> 　<a href="emailone.asp?email=<%=ds("email")%>&title=<%=ds("username")%>用户您好" target="_blank">发邮件给这个代理&gt;&gt;&gt;</a></td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> QQ：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("qq")%> 　<a href="tencent://message/?uin=<%=ds("qq")%>&Site=<%=Request.ServerVariables("SERVER_NAME")%>&Menu=yes" title="发送即时消息给用户"" target="_blank">发送即时消息给代理&gt;&gt;</a></td>
  </tr>
<form name="form2" method="post" action="kefu-change.asp">	  
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right">业务员：</td>
    <td align="left" bgcolor="#FAFAFA">　
业务员：<a href="admkefu.asp?kefu=<%=ds("kefunow")%>"><%=ds("kefunow")%></a>　　改为
<select name="kefuto">
  <option selected>请选择: </option>
  <%Set dskefu = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_KeFu order by id desc"
	dskefu.Open Sql,conn,1,1
if not dskefu.Eof then
while not dskefu.eof%>
  <option value="<%=dskefu("kefu")%>" <%if ds("kefunow")=dskefu("kefu") then%>selected<%end if%>><%=dskefu("kefu")%></option>
  <%
dskefu.movenext
wend
end if
%>
</select>
<input type="hidden" name="username" value="<%=ds("username")%>">
<input type="submit" name="Submit" value="更换">
</td>
  </tr>
    </form>  
  <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("prv")%>/<%=ds("city")%>/<%=ds("address")%> 　联系人：<%=ds("contact")%> 邮编：<%=ds("postid")%> </td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 电话：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("tel")%> 　
      <%if ds("checkmobiok")=True then%>
      已验证
      <%end if%> 
      手机：<%=ds("mobi")%> 传真：<%=ds("fax")%> </td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 手机：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("mobi")%>　 <a href="smsone.asp?SendNum=<%=ds("mobi")%>&Content=<%=ds("username")%>用户您好" target="_blank">发短信给这个手机&gt;&gt;&gt;</a></td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 备注：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("coreinfo")%>　<a href="javascript:document.formTop.action='/user/changeuser.asp?gourl=/user/modify.asp';document.formTop.username.value='<%=ds("username")%>';document.formTop.submit();"><font color="#000000">修改代理资料>>>(点注销会自动退回管理区)</font></a></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>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 上次登陆时间：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("lastuse")%> </td>
  </tr>
</table>

  <strong><br>
  <br>
  名下已开通的虚拟主机:</strong><br>
  <%
Set dsph = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Product_Host where agent1='"&ds("username")&"'"
	dsph.Open Sql,conn,1,1
if dsph.Eof then%>
没有已开通的虚拟主机.
<%else%>
记录数：<%=dsph.recordcount%>
<table width="100%" border="0" cellspacing="1" cellpadding="2" align="center" bgcolor="#333333">
  <tr bgcolor="#C1BFBF" align="center">
    <td height="21">产品类型</td>
    <td>用户名</td>
    <td>域　名</td>
    <td height="21">FTP用户名</td>
    <td>IP 地址</td>
    <td>开通日期</td>
    <td>到期日期</td>
    <td>状态</td>
    <td>操作</td>
    <td>ICP</td>
  </tr>
  <%while not dsph.Eof%>
  <%

	Hosttype=dsph("Hosttype")
	Set ori_host_name = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * 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 * from FreeHost.FreeHost_HostProductlist_AGN where agent1='"&dsph("agent1")&"' and id='"&ori_host_name("id")&"'"
		newname_host.Open Sql,conn,1,1
if not newname_host.eof then
Hosttype=newname_host("Hosttype")
end if
		end if


	%>
  <tr align="center" bgcolor="#FFFFFF">
    <td height="30"><%=Hosttype%></td>
    <td><a href="searchuser.asp?username=<%=dsph("username")%>"><%=dsph("username")%></a></td>
    <td><%
hostname=dsph("hostname")
hostname=replace(hostname, ":80:","")
hostname_arry=Split(hostname, ",")	
	
	Set dsserver = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Serverlist where id='"&dsph ("ServerlistID")&"'"
	dsserver.Open Sql,conn,1,1
	ostype=dsserver("ostype")
	if dsserver("ostype")="linux" and dsserver("autodelicp")=true then
	Set dsICPDB = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_ICPDB where ftpname='"&dsph("ftpname")&"'"
	dsICPDB.Open Sql,conn,1,1
if dsICPDB.eof then%>
      <%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%>
      <%end if
while not dsICPDB.Eof%>
主域名:<%=dsICPDB("domain")%><br>
备案:<%=dsICPDB("status")%> <br>
<%dsICPDB.movenext
wend
dsICPDB.close	
	%>
<%else%>
<%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%>
<%end if%></td>
    <td><%=dsph("ftpname")%></td>
    <td><%
	Set dsserver = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Serverlist where id='"&dsph ("ServerlistID")&"'"
	dsserver.Open Sql,conn,1,1
%>
        <%=dsserver("ip")%>
        <%dsserver.close%></td>
    <td><%=formatdatetime(dsph("starttime"),1)%></td>
    <td><%=formatdatetime(dsph("endtime"),1)%></td>

    <td><%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 bgcolor="#FFFFFF"><a href="handhost1.asp?username=<%=dsph("username")%>&id=<%=dsph("id")%>"><font color="#000000">管理</font></a></td>
    <td bgcolor="#FFFFFF"><a href="beian.asp?id=<%=dsph("id")%>">
      <%if dsph("beianstatus")="备案成功" then%>
      <FONT color=red>成功</FONT>
      <%else%>
      <FONT color=#000000>备案</FONT>
      <%end if%>
    </a></td>
  </tr>
  <%
dsph.movenext
wend%>
</table>
<%
dsph.close
set dsph=nothing
end if%>
<br>
<strong>名下已开通的邮箱产品:</strong><br>
<%
Set dsphemail = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Product_Email where agent1='"&ds ("username")&"'"
	dsphemail.Open Sql,conn,1,1
if dsphemail.Eof then%>
没有已开通的邮箱产品.
<%else%>
记录数：<%=dsphemail.recordcount%>
<table width="100%" border="0" cellspacing="1" cellpadding="2" align="center" bgcolor="#333333">
  <tr bgcolor="#C1BFBF" align="center">
    <td height="21">产品类型</td>
    <td>用户名</td>
    <td>绑定域名</td>
    <td height="21">所属父产品</td>
    <td>IP 地址</td>
    <td>开通日期</td>
    <td>到期日期</td>
    <td>状态</td>
    <td>操作</td>
  </tr>
  <%while not dsphemail.Eof%>
  <%
	Emailtype=dsphemail("Emailtype")
	Set ori_email_name = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_EmailProductlist where Emailtype='"&dsphemail("Emailtype")&"'"
		ori_email_name.Open Sql,conn,1,1
		if not ori_email_name.eof then
Set newname_email = Server.CreateObject("ADODB.Recordset")	
Sql="Select * from FreeHost.FreeHost_EmailProductlist_AGN where agent1='"&dsphemail("agent1")&"' and id='"&ori_email_name("id")&"'"
		newname_email.Open Sql,conn,1,1
if not newname_email.eof then
Emailtype=newname_email("Emailtype")
end if
		end if

	%>
  <tr align="center" bgcolor="#FFFFFF">
    <td height="30"><%=Emailtype%> </td>
    <td><a href="searchuser.asp?username=<%=dsphemail("username")%>"><%=dsphemail("username")%></a></td>
    <td><%
	Set dspdallemail = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Product_ALLEmail where username='"&dsphemail ("username")&"' and PdEID='"&dsphemail ("id")&"' order by emailname"
		dspdallemail.Open Sql,conn,1,1
		if not dspdallemail.eof then
		if not isnull(dspdallemail("emailname")) then
		%>
        <%= replace(dspdallemail("emailname"),"webmaster@","")%>
        <%
		end if
		end if%></td>
    <td><%
	Set dsph = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Product_Host where id='"&dsphemail("byhost")&"' and username='"&dsphemail("username")&"'"
	dsph.Open Sql,conn,1,1
if not dsph.Eof then
nohost=false%>
        <a href="handhost1.asp?id=<%=dsphemail("byhost")%>"><font color="black">虚拟主机(<%=dsph("ftpname")%>)</font></a>
        <%else
nohost=true
end if%>
        <%
Set dsdm = Server.CreateObject("ADODB.Recordset")	
Sql="Select * from FreeHost.FreeHost_Product_Domain where username='"&dsphemail ("username")&"' and id ='"&dsphemail("bydomain")&"'"
	dsdm.Open Sql,conn,1,1
if not dsdm.Eof then
nodomain=false%>
        <a href="listmydomain.asp?id=<%=dsphemail("bydomain")%>"><font color="black">域名(<%=dsdm("domain")%>)</font></a>
        <%else
nodomain=true
end if
if nohost and nodomain then%>
      无
      <%end if%>
    </td>
    <td><%
	Set dsserver = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Serveremaillist where id='"&dsphemail ("ServerlistID")&"'"
	dsserver.Open Sql,conn,1,1
%>
        <%=dsserver("ip")%>
        <%dsserver.close%></td>
    <td><%=formatdatetime(dsphemail("starttime"),1)%></td>
    <td><%=formatdatetime(dsphemail("endtime"),1)%></td>
    <td><%if dsphemail("endtime")>NOW then%>
        <%if dsphemail("istest")="y" then%>
        <font color="#FF0000">试用</font>
        <%else%>
        <%=dsphemail("status")%>
        <%end if%>
        <%else%>
        <font color="#FF0000">过期</font>
        <%if dsphemail("status")="暂停" then%>
        <br>
        <font color="#FF0000">暂停</font>
        <%end if%>
        <%end if%></td>
    <td bgcolor="#FFFFFF"><a href="handemail1.asp?id=<%=dsphemail("id")%>"><font color="#000000">管理</font></a></td>
  </tr>
  <%
dsphemail.movenext
wend%>
</table>
<%
dsphemail.close
set dsphemail=nothing
end if
%>
<strong></strong>
<strong><br>
<br>
名下已开通的数据库产品:</strong><br>
<%
Set dsphSql = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Product_Sql where agent1='"&ds ("username")&"'"
	dsphSql.Open Sql,conn,1,1
if dsphSql.Eof then%>
没有已开通的数据库产品.
<%else%>
记录数：<%=dsphSql.recordcount%>
<table width="100%" border="0" cellspacing="1" cellpadding="2" align="center" bgcolor="#333333">
  <tr bgcolor="#C1BFBF" align="center">
    <td height="21">产品类型</td>
    <td>用户名</td>
    <td>数据库名</td>
    <td height="21">所属父产品</td>
    <td>IP 地址</td>
    <td>开通日期</td>
    <td>到期日期</td>
    <td>状态</td>
    <td>操作</td>
  </tr>
  <%while not dsphSql.Eof%>
  <%
	Sqltype=dsphSql("Sqltype")
	Set ori_Sql_name = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_SqlProductlist where Sqltype='"&dsphSql("Sqltype")&"'"
		ori_Sql_name.Open Sql,conn,1,1
		if not ori_Sql_name.eof then
Set newname_Sql = Server.CreateObject("ADODB.Recordset")	
Sql="Select * from FreeHost.FreeHost_SqlProductlist_AGN where agent1='"&dsphSql("agent1")&"' and id='"&ori_Sql_name("id")&"'"
		newname_Sql.Open Sql,conn,1,1
if not newname_Sql.eof then
Sqltype=newname_Sql("Sqltype")
end if
		end if

	%>
  <tr align="center" bgcolor="#FFFFFF">
    <td height="30"><%=Sqltype%> </td>
    <td><a href="searchuser.asp?username=<%=dsphSql("username")%>"><%=dsphSql("username")%></a></td>
    <td><%=dsphSql("sqlname")%></td>
    <td><%
	Set dsph = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Product_Host where id='"&dsphSql("byhost")&"' and username='"&dsphSql("username")&"'"
	dsph.Open Sql,conn,1,1
if not dsph.Eof then
nohost=false%>
        <a href="handhost1.asp?id=<%=dsphSql("byhost")%>&go=a"><font color="black">虚拟主机(<%=dsph("ftpname")%>)</font></a>
        <%else%>
      无
      <%end if%>
    </td>
    <td><%
	Set dsserver = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Serversqllist where id='"&dsphSql ("ServerlistID")&"'"
	dsserver.Open Sql,conn,1,1
%>
        <%=dsserver("ip")%>
        <%dsserver.close%></td>
    <td><%=formatdatetime(dsphSql("starttime"),1)%></td>
    <td><%=formatdatetime(dsphSql("endtime"),1)%></td>
    <td><%if dsphSql("endtime")>NOW then%>
        <%if dsphSql("istest")="y" then%>
        <font color="#FF0000">试用</font>
        <%else%>
        <%=dsphSql("status")%>
        <%end if%>
        <%else%>
        <font color="#FF0000">过期</font>
        <%if dsphSql("status")="暂停" then%>
        <br>
        <font color="#FF0000">暂停</font>
        <%end if%>
        <%end if%></td>
    <td bgcolor="#FFFFFF"><a href="handsql1.asp?id=<%=dsphSql("id")%>"><font color="#000000">管理</font></a></td>
  </tr>
  <%
dsphSql.movenext
wend%>
</table>
<%

dsphSql.close
set dsphSql=nothing
end if
%>
<strong><br>
<br>
名下已开通的域名产品:</strong><br>
<%
Set dsdm = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Product_Domain where agent1='"&ds ("username")&"'"
	dsdm.Open Sql,conn,1,1
if dsdm.Eof then%>
没有已开通的域名产品.
<%else%>
记录数：<%=dsdm.recordcount%>
<table width="100%"  border="0" cellspacing="1" bgcolor="#000000">
  <tr bgcolor="#C1BFBF">
    <td width="8%" align="center">编号</td>
    <td align="center">用户名</td>
    <td width="15%" align="center">域名</td>
    <td width="12%" align="center">状态</td>
    <td width="13%" align="center">注册时间</td>
    <td width="14%" align="center">到期时间</td>
    <td width="12%" align="center">初始密码</td>
    <td width="9%" align="center">信息</td>
    <td align="center">操作</td>
  </tr>
  <%while not dsdm.Eof%>
  <tr bgcolor="#FFFFFF">
    <td width="8%" align="center"><%=dsdm("id")%></td>
    <td align="center"><a href="searchuser.asp?username=<%=dsdm("username")%>"><%=dsdm("username")%></a></td>
    <td width="15%" align="center"><a href="listmydomain.asp?id=<%=dsdm("id")%>" ><font color="#000000"><%=dsdm("Domain")%></font></a></td>
    <td width="12%" align="center"><%if dsdm("endtime")<NOW and dsdm("status")="正常" then%>
      <font color=red>过期</font>
      <%else%>
      <%=dsdm("status")%>
      <%end if%></td>
    <td width="13%" align="center"><%=formatdatetime(dsdm("starttime"),1)%></td>
    <td width="14%" align="center"><%if not isnull(dsdm("endtime")) then%>
        <%=formatdatetime(dsdm("endtime"),1)%>
        <%end if%></td>
    <td width="12%" align="center"><%=dsdm("inipass")%><br>
        <a href="domainpass.asp?id=<%=dsdm("id")%>" target="_blank"><font color="#000000">重置密码</font></a></td>
    <td width="9%" align="center"><%if dsdm("status")="预注册成功" then%>
        <a href="infoa.asp?id=<%=dsdm("id")%>" target="_blank"><font color="#000000">查询</font></a>
        <%else%>
        <a href="domainadm2.asp?id=<%=dsdm("id")%>" target="_blank"><font color="#000000">管理DNS</font></a>
        <%end if%>
    </td>
    <td align="center"><a href="listmydomain.asp?id=<%=dsdm("id")%>" ><font color="#000000">管理</font></a></td>
  </tr>
  <%
dsdm.movenext
wend%>
</table>
<%
dsdm.close
set dsdm=nothing
end if
%>
<br>
<strong>已开通的IDC产品:</strong><br>
<%
Set dsphIDC = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Product_IDC where agent1='"&ds ("username")&"'"
	dsphIDC.Open Sql,conn,1,1
if dsphIDC.Eof then%>
没有已开通的IDC产品.
<%else%>
记录数：<%=dsphIDC.recordcount%>
<table width="100%" border="0" cellspacing="1" cellpadding="2" align="center" bgcolor="#333333">
  <tr bgcolor="#C1BFBF" align="center">
    <td height="21">产品类型</td>
    <td>产品类型</td>
    <td>开通日期</td>
    <td>到期日期</td>
    <td>IP</td>
    <td>状态</td>
    <td>操作</td>
  </tr>
  <%while not dsphIDC.Eof%>
  <%
	IDCtype=dsphIDC("IDCtype")
	Set ori_IDC_name = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_IDCProductlist where IDCtype='"&dsphIDC("IDCtype")&"'"
		ori_IDC_name.Open Sql,conn,1,1
		if not ori_IDC_name.eof then
Set newname_IDC = Server.CreateObject("ADODB.Recordset")	
Sql="Select * from FreeHost.FreeHost_IDCProductlist_AGN where agent1='"&dsphIDC("agent1")&"' and id='"&ori_IDC_name("id")&"'"
		newname_IDC.Open Sql,conn,1,1
if not newname_IDC.eof then
IDCtype=newname_IDC("IDCtype")
end if
		end if

	%>
  <tr align="center" bgcolor="#FFFFFF">
    <td height="30"><%=IDCtype%> </td>
    <td><%=dsphIDC("idctype")%>
      <%
	IDCtype=dsphIDC("IDCtype")
	Set ori_IDC_name = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_IDCProductlist where IDCtype='"&dsphIDC("IDCtype")&"'"
		ori_IDC_name.Open Sql,conn,1,1
		if not ori_IDC_name.eof then	  
	  if ori_IDC_name("istg")=true then%>
[托管]
<%else%>
[租用]
<%end if
	  end if
	  ori_IDC_name.close
	  %></td>
    <td><%=formatdatetime(dsphIDC("starttime"),1)%></td>
    <td><%=formatdatetime(dsphIDC("endtime"),1)%></td>
    <td><%
	Set dsX = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_IDCIP where PDID="&dsphIDC("id")
		dsX.Open Sql,conn,1,1
If dsX.Eof Then%>
IP尚未分配
  <%else
while not dsX.eof
%>
  <%=dsX("IP")%> <br>
  <%
dsX.movenext
wend
end if%></td>
    <td><%if dsphIDC("endtime")>NOW then%>
        <%if dsphIDC("istest")="y" then%>
        <font color="#FF0000">试用</font>
        <%else%>
        <%=dsphIDC("status")%>
        <%end if%>
        <%else%>
        <font color="#FF0000">过期</font>
        <%if dsphIDC("status")="暂停" then%>
        <br>
        <font color="#FF0000">暂停</font>
        <%end if%>
        <%end if%></td>
    <td bgcolor="#FFFFFF"><a href="handIDC1.asp?id=<%=dsphIDC("id")%>"><font color="#000000">管理</font></a></td>
  </tr>
  <%
dsphIDC.movenext
wend%>
</table>
<%
dsphIDC.close
set dsphIDC=nothing
end if
%>

<br>
  <strong>已开通的云服务器产品:</strong><br>
  <%
Set dsphVPS = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Product_VPS where agent1='"&ds ("username")&"'"
	dsphVPS.Open Sql,conn,1,1
if dsphVPS.Eof then%>
  没有已开通的云服务器产品.
  <%else%>
记录数：<%=dsphVPS.recordcount%> <table width="100%" border="0" cellspacing="1" cellpadding="2" align="center" bgcolor="#333333">
  <tr bgcolor="#C1BFBF" align="center">
    <td height="21">产品类型</td>
    <td>云服务器名</td>
    <td>已分配IP</td>
    <td>开通日期</td>
    <td>到期日期</td>
    <td>状态</td>
    <td>操作</td>
  </tr>
<%while not dsphVPS.Eof%>
<%
	vpstype=dsphVPS("vpstype")
	Set ori_VPS_name = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_VPSProductlist where vpstype='"&dsphVPS("vpstype")&"'"
		ori_VPS_name.Open Sql,conn,1,1
		if not ori_VPS_name.eof then
Set newname_VPS = Server.CreateObject("ADODB.Recordset")	
Sql="Select * from FreeHost.FreeHost_VPSProductlist_AGN where agent1='"&dsphVPS("agent1")&"' and id='"&ori_VPS_name("id")&"'"
		newname_VPS.Open Sql,conn,1,1
if not newname_VPS.eof then
vpstype=newname_VPS("vpstype")
end if
		end if

	%>
  <tr align="center" bgcolor="#FFFFFF">
    <td height="30">
<%=vpstype%>
</td>
    <td><%=dsphVPS("vpsname")%></td>
    <td><%
	if dsphVPS("isagentpd")=true then%>
      <%=dsphVPS("AgnUpIP")%>
      <%
	else
	Set dsX = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Product_VPS_IP where VPSID="&dsphVPS("id")
		dsX.Open Sql,conn,1,1
while not dsX.eof
%>
      <%=dsX("IP")%> <br>
      <%
if dsX("portstart")>0 then

if isONEip=true then
	Set dsPORTserver = Server.CreateObject("ADODB.Recordset")	
Sql="Select * from FreeHost.FreeHost_ServerPORTlist where id='"&useportserver&"'"
		dsPORTserver.Open Sql,conn,1,1%>
      <%=dsPORTserver("IP")%>(公网)<br>
      <%end if	

end if
dsX.movenext
wend
end if
%></td>
    <td><%=formatdatetime(dsphVPS("starttime"),1)%></td>
    <td><%=formatdatetime(dsphVPS("endtime"),1)%></td>
    <td><%if dsphVPS("endtime")>NOW then%>
      <%if dsphVPS("istest")="y" then%>
      <font color="#FF0000">试用</font><%else%>
      <%=dsphVPS("status")%>
      <%end if%>
      <%else%>
      <font color="#FF0000">过期</font>
      <%if dsphVPS("status")="暂停" then%>
      <br>
      <font color="#FF0000">暂停</font>
      <%end if%>
      <%end if%></td>
    <td bgcolor="#FFFFFF"><a href="handvps1.asp?id=<%=dsphVPS("id")%>"><font color="#000000">管理</font></a></td>
  </tr>
<%
dsphVPS.movenext
wend%>
</table> 
  <%

dsphVPS.close
set dsphVPS=nothing
end if
%>
  <br>
<strong>已开通的CDN产品:</strong><br>
  <%
Set dsphCDN = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Product_CDN where agent1='"&ds ("username")&"'"
	dsphCDN.Open Sql,conn,1,1
if dsphCDN.Eof then%>
  没有已开通的CDN产品.
  <%else%>
记录数：<%=dsphCDN.recordcount%> <table width="100%" border="0" cellspacing="1" cellpadding="2" align="center" bgcolor="#333333">
  <tr bgcolor="#C1BFBF" align="center">
    <td height="21">产品类型</td>
    <td>CDN名</td>
    <td>域名</td>
    <td>开通日期</td>
    <td>到期日期</td>
    <td>状态</td>
    <td>操作</td>
  </tr>
<%while not dsphCDN.Eof%>
<%
	CDNtype=dsphCDN("CDNtype")
	Set ori_CDN_name = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_CDNProductlist where CDNtype='"&dsphCDN("CDNtype")&"'"
		ori_CDN_name.Open Sql,conn,1,1
		if not ori_CDN_name.eof then
Set newname_CDN = Server.CreateObject("ADODB.Recordset")	
Sql="Select * from FreeHost.FreeHost_CDNProductlist_AGN where agent1='"&dsphCDN("agent1")&"' and id='"&ori_CDN_name("id")&"'"
		newname_CDN.Open Sql,conn,1,1
if not newname_CDN.eof then
CDNtype=newname_CDN("CDNtype")
end if
		end if

	%>
  <tr align="center" bgcolor="#FFFFFF">
    <td height="30">
<%=CDNtype%>
</td>
    <td><%=dsphCDN("ftpname")%></td>
    <td><%
hostname=dsphCDN("hostname")
If IsNull(dsphCDN("hostname")) Then hostname=""
'hostname=replace(hostname, ":80:","")
hostname_arry=Split(hostname, ",")

for idname=0 to ubound(hostname_arry)
domary=Split(hostname_arry(idname),":")
domain=domary(2)
%>
	  <a href="http://<%=domain%>" target="_blank"><%if ComX.actoidc_7i24_com(cstr(domain))<>domain then%>
          <%=ComX.actoidc_7i24_com(cstr(domain))%> (<%=domain%>)
          <%else%>
          <%=domain%>
          <%end if%>(端口:<%=domary(1)%> IP:<%=domary(0)%>)</a><br>
      <%next%>
</td>
    <td><%=formatdatetime(dsphCDN("starttime"),1)%></td>
    <td><%=formatdatetime(dsphCDN("endtime"),1)%></td>
    <td><%if dsphCDN("endtime")>NOW then%>
      <%if dsphCDN("istest")="y" then%>
      <font color="#FF0000">试用</font><%else%>
      <%=dsphCDN("status")%>
      <%end if%>
      <%else%>
      <font color="#FF0000">过期</font>
      <%if dsphCDN("status")="暂停" then%>
      <br>
      <font color="#FF0000">暂停</font>
      <%end if%>
      <%end if%></td>
    <td bgcolor="#FFFFFF"><a href="handCDN1.asp?id=<%=dsphCDN("id")%>"><font color="#000000">管理</font></a></td>
  </tr>
<%
dsphCDN.movenext
wend%>
</table> 
  <%

dsphCDN.close
set dsphCDN=nothing
end if
%>




<br>
<strong>已开通的其他类产品:</strong><br>
<%
Set dsphOther = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Product_Other where agent1='"&ds ("username")&"'"
	dsphOther.Open Sql,conn,1,1
if dsphOther.Eof then%>
没有已开通的其他类产品.
<%else%>
记录数：<%=dsphOther.recordcount%>
<table width="100%" border="0" cellspacing="1" cellpadding="2" align="center" bgcolor="#333333">
  <tr bgcolor="#C1BFBF" align="center">
    <td height="21">产品类型</td>
    <td>开通日期</td>
    <td>到期日期</td>
    <td>状态</td>
    <td>操作</td>
  </tr>
  <%while not dsphOther.Eof%>
  <%
	Othertype=dsphOther("Othertype")
	Set ori_Other_name = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_OtherProductlist where Othertype='"&dsphOther("Othertype")&"'"
		ori_Other_name.Open Sql,conn,1,1
		if not ori_Other_name.eof then
Set newname_Other = Server.CreateObject("ADODB.Recordset")	
Sql="Select * from FreeHost.FreeHost_OtherProductlist_AGN where agent1='"&dsphOther("agent1")&"' and id='"&ori_Other_name("id")&"'"
		newname_Other.Open Sql,conn,1,1
if not newname_Other.eof then
Othertype=newname_Other("Othertype")
end if
		end if

	%>
  <tr align="center" bgcolor="#FFFFFF">
    <td height="30"><%=Othertype%> </td>
    <td><%=formatdatetime(dsphOther("starttime"),1)%></td>
    <td><%=formatdatetime(dsphOther("endtime"),1)%></td>
    <td><%if dsphOther("endtime")>NOW then%>
        <%if dsphOther("istest")="y" then%>
        <font color="#FF0000">试用</font>
        <%else%>
        <%=dsphOther("status")%>
        <%end if%>
        <%else%>
        <font color="#FF0000">过期</font>
        <%if dsphOther("status")="暂停" then%>
        <br>
        <font color="#FF0000">暂停</font>
        <%end if%>
        <%end if%></td>
    <td bgcolor="#FFFFFF"><a href="handOther1.asp?id=<%=dsphOther("id")%>"><font color="#000000">管理</font></a></td>
  </tr>
  <%
dsphOther.movenext
wend%>
</table>
<%
dsphOther.close
set dsphOther=nothing
end if
%>
<strong><br>
财务记录：</strong><br>
<%
	Set dsmoney = Server.CreateObject("ADODB.Recordset")	
'	Sql="Select * from FreeHost.FreeHost_moneylog where username='"&ds("username")&"' and usermoney<>0 order by id desc"
	Sql="Select * from FreeHost.FreeHost_moneylog where isdel is null and (username='"&ds("username")&"' or opusername='"&ds("username")&"' or agent1='"&ds("username")&"' or agent2='"&ds("username")&"') order by id desc"
	dsmoney.PageSize = 25
	dsmoney.Open Sql,conn,1,1
if dsmoney.Eof then
%>
<br>
数据库中不存在款项操作记录。
<%
else
if Request.ServerVariables("QUERY_STRING")<>"" then
ask=Split(Request.ServerVariables("QUERY_STRING"), chr(38)&"pn")
else
ask=Split("freehost=1", "")
ask(0)="freehost=lsoft"
end if
	pn=1
if Request.QueryString ("pn")<>"" then pn=Request.QueryString ("pn")
If dsmoney.RecordCount <> 0 Then dsmoney.AbsolutePage = CLng(pn)  
    if clng(pn)<=10 then
    begini=1
      if dsmoney.PageCount<=10 then
       endini=dsmoney.PageCount 
       else
       endini=10
      end if
    end if
%>
<%if clng(pn)<=10 then%>最新 <%for i=begini to endini
    if clng(pn)=i then%><font color=red>[<%=i%>]</font><%else%><a href="<%=Request.ServerVariables("URL")%>?<%=ask(0)%>&pn=<%=i%>"><font color="#000000">[<%=i%>]</font></a><%end if%>　<%next%> 
        <%else%>　<a href="<%=Request.ServerVariables("URL")%>?<%=ask(0)%>&pn=1"><font color="#000000">最新[1]--[10]</font></a>　　现在是第<font color=red>[<%=pn%>]</font>页 
        　共<%=dsmoney.PageCount%>页　<%end if%><%If Clng(pn)>1 Then%><a href="<%=Request.ServerVariables("URL")%>?<%=ask(0)%>&pn=<%=pn-1%>"><font color="#000000">上一页</font></a>
        <%End If%>|<%If Clng(pn)<dsmoney.PageCount Then%><a href="<%=Request.ServerVariables("URL")%>?<%=ask(0)%>&pn=<%=pn+1%>"><font color="#000000">下一页</font></a>
        <%End If%>
<table width="100%"  border="0" cellspacing="1" bgcolor="#B5BECE">
  <tr bgcolor="#CCCCCC">
    <td width="6%" align="center">编号</td>    
    <td width="11%" align="center">用户名</td>
	<td width="11%" align="center">操作人</td>
    <td width="20%" align="center">时间与IP</td>
    <td width="10%" align="center">金额</td>
    <td width="10%" align="center">余额</td>
    <td width="12%" align="center">原因</td>
    <td width="12%" align="center">内部记录</td>
    <td width="11%" align="center">产品</td>
    <td width="7%" align="center">ID</td>
  </tr>
<%
For N=1 To dsmoney.PageSize 
					If dsmoney.RecordCount=0 Then Exit For
%>
  <tr bgcolor="#F2F2F2">
    <td width="6%" align="center"><%=dsmoney("id")%></td>
    <td width="11%" align="center"><a href="searchuser.asp?username=<%=dsmoney("username")%>" target="_blank"><font color="black"><%=dsmoney("username")%></font></a>
      <%if dsmoney("isagent")="y" then%>
      <font color=red>&#8482;</font>
    <%end if%></td>
	<td width="11%" align="center"><a href="searchuser.asp?username=<%=dsmoney("opusername")%>" target="_blank"><font color="black"><%=dsmoney("opusername")%></font></a></td>
    <td width="20%" align="center"><%=dsmoney("attime")%><br>
    <%=dsmoney("ip")%></td>
    <td width="10%" align="center"><a href="moneyshow.asp?id=<%=dsmoney("id")%>"><font color="black">
    <%if dsmoney("isadd")="y" then%>+<%elseif dsmoney("isadd")="n" then%>-<%end if%><%=replace(formatNumber(dsmoney("usermoney"),2,-1),".00","")%> 元</font></a></td>
    <td width="10%" align="center"><a href="moneyshow.asp?id=<%=dsmoney("id")%>"><font color="black">
      <%=dsmoney("agnEndmoney")%></font></a></td>
    <td width="12%" align="center"><%=dsmoney("forwhat")%></td>
    <td width="12%" align="center"><%=dsmoney("corewhat")%></td>
    <td width="11%" align="center"><%=dsmoney("whichProduct")%></td>
    <td width="7%" align="center"><%=dsmoney("pdid")%></td>
  </tr>

<%
If clng(pn)=dsmoney.PageCount Then
I = dsmoney.RecordCount - (dsmoney.PageCount-1) * dsmoney.PageSize
If N=I Then Exit For
End If
dsmoney.movenext
Next%>
</table>
<%end if
dsmoney.close
set dsmoney=nothing%>
        
<br>
<br>

<%
ds.movenext
wend
ds.Close
set ds=nothing
conn.Close 
set conn=nothing
%></div>



</td>
            <td width="10" background="img/conmid2.gif">&nbsp;</td>
          </tr>
          <tr>
            <td width="10" height="10"><img src="img/conend1.gif" width="10" height="10"></td>
            <td height="10" background="img/conend2.gif"></td>
            <td width="10" height="10"><img src="img/conend3.gif" width="10" height="10"></td>
          </tr>
        </table>
          <table width="98%"  border="0" cellspacing="0" cellpadding="0" id="table3"style="display:none">
            <tr>
              <td width="10" height="23" background="img/contopa.gif">&nbsp;</td>
              <td height="23" align="left" valign="top" background="img/contopb.gif"><table width="100%"  border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td height="8" colspan="3"></td>
                  </tr>
                  <tr>
                    <td width="25">&nbsp;</td>
                    <td align="left" valign="top"><font color="#FFFFFF"><strong>查询与统计</strong></font></td>
                    <td width="10"><a href="#"  onClick="table3.style.display='none';"><font color="#FFFFFF">X</font></a></td>
                  </tr>
              </table></td>
              <td width="10" height="23" background="img/contopc.gif">&nbsp;</td>
            </tr>
            <tr>
              <td background="img/conmid1.gif">&nbsp;</td>
              <td align="left"><form action="moneyalllist.asp" method="get" name="form1">
                  <input name="op" type="hidden" value="search">
                  <br>
                  <p>　选择类型：
                      <select name="selecttype" id="selecttype">
                        <option value="全部" selected>全部</option>
                        <option value="非手工操作">非手工操作</option>
                        <option value="手工操作">手工操作</option>
                        <option value="入款">入款</option>
                        <option value="退款">退款</option>
                        <option value="优惠虚增">优惠虚增</option>
                        <option value="所有实收记录">所有实收记录</option>
                        <option value="直接扣款">直接扣款</option>
                        <option value="消费扣款">消费扣款</option>
                      </select>
                      <br>
                      <br>
                  　用户名或代理名：
                  <input name="username" type="text" size="10">
                  或凭证：
                  <input name="pingzheng" type="text" id="pingzheng" size="10">
                  或关键词：
                  <input name="key" type="text" id="key" size="10">
                  <br>
                  　或开始时间：
                  <input name="starttime" type="text" id="starttime" size="19" maxlength="19">
                  (2005-2-11)结束：
                  <input name="endtime" type="text" id="endtime" size="19" maxlength="19">
                  <input type="submit" name="Submit" value="执行">
                  <br>
                  <br>
                  <br>
                  　<a href="moneyalllist.asp?op=all" target="_blank"><font color="#000000">所有财务记录</font></a>　<a href="moneyalllist.asp?op=notget" target="_blank"><font color="#000000">所有未到帐记录</font></a>　<a href="moneyalllist.asp?op=get" target="_blank"><font color="#000000">所有已到帐记录</font></a>　<a href="moneyalllist.asp?op=notcheck" target="_blank"><font color="#000000">所有未审核记录</font></a><br>
                  <br>
                  　<a href="moneycount.asp?type=add&d=0&dend=1" target="_blank"><font color="#000000">今天的资金变动统计(正)</font></a> <a href="moneycount.asp?type=dec&d=0&dend=1" target="_blank"><font color="#000000">(负)</font></a>　<a href="moneycount.asp?type=add&d=-1&dend=0" target="_blank"><font color="#000000">昨天的变动(正)</font></a> <a href="moneycount.asp?type=dec&d=-1&dend=0" target="_blank"><font color="#000000">(负)</font></a>　<a href="moneycount.asp?type=add&d=-30&dend=1" target="_blank"><font color="#000000">近三十天的变动(正)</font></a> <a href="moneycount.asp?type=dec&d=-30&dend=1" target="_blank"><font color="#000000">(负)</font></a><br>
                </form></td>
              <td width="10" background="img/conmid2.gif">&nbsp;</td>
            </tr>
            <tr>
              <td width="10" height="10"><img src="img/conend1.gif" width="10" height="10"></td>
              <td height="10" background="img/conend2.gif"></td>
              <td width="10" height="10"><img src="img/conend3.gif" width="10" height="10"></td>
            </tr>
        </table></TD>
      <TD width=18 background="img/midri.gif">&nbsp;</TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
    <TR>
      <TD width=30><IMG height=19 
                  src="img/rb1.jpg" 
                  width=30></TD>
      <TD 
                background=img/rb2.jpg>&nbsp;</TD>
      <TD width=30><IMG height=19 
                  src="img/rb3.jpg" 
                  width=30></TD>
    </TR>
  </TBODY>
</TABLE>
<%=htmlwrite("html10")%>	
<script>
var partable=parent.document.getElementById("table0");
if (partable!=null)
partable.style.display='';

partable=parent.document.getElementById("outconM");
if (partable!=null)
{partable.innerHTML = truecon.innerHTML;
document.body.innerHTML=partable.innerHTML;}
</script>
<%end if


if ef then%>
<%=ec%>
<%end if%>
  
