<%@ Language=VBScript %>
<%If session("agentusername")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
ElseIf Request("id")<>"" and not IsNumeric(Request("id")) Then
	ef=True
	ec="编号必须是数字"
end if
if not ef then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
	Set dsmoney = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_moneylog where id='"&Request("id")&"' and (username='"&session("agentusername")&"' or opusername='"&session("agentusername")&"' or agnusername='"&session("agentusername")&"' or agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') order by id desc"
	dsmoney.Open Sql,conn,1,1
if dsmoney.Eof then
	ef=True
	ec="不存在的ID！"
end if
end if
if not ef then
%>
<!--#include virtual="/inc-freehost-function/htmlwrite.asp"--><%=htmlwrite("html5")%>　　具体财务信息
  <%=htmlwrite("html6")%><br>

<br>

<table width="100%" border=0 cellpadding=4 cellspacing=1 bgcolor="#CCCCCC">
  <tbody>
    <tr bgcolor="#EFEFEF">
      <td width="20%">编号：</td>
      <td width="80%"><%=dsmoney("id")%></td>
    </tr>
    <tr bgcolor="#EFEFEF">
      <td>时间：</td>
      <td width="80%"><%=dsmoney("attime")%></td>
    </tr>
    <tr bgcolor="#EFEFEF">
      <td>金额</td>
      <td><%if dsmoney("isadd")="y" then%>
        增加
	<%else%>
	扣除
      <%end if%><%=replace(formatCurrency(dsmoney("usermoney"),2,-1),".00","")%> 元</td>
    </tr>
<%if dsmoney("norusername")<>"" then%>
    <tr bgcolor="#EFEFEF">
      <td>用户名：</td>
      <td><a href="searchuser.asp?username=<%=dsmoney("norusername")%>"><font color="black"><%=dsmoney("norusername")%></font></a></td>
    </tr>
<%if not isnull(dsmoney("norStmoney")) then'2009-6-8%>	
    <tr bgcolor="#EFEFEF">
      <td>用户操作前余额：</td>
      <td><%=dsmoney("norStmoney")%> 元</td>
    </tr>
    <tr bgcolor="#EFEFEF">
      <td>用户操作后余额：</td>
      <td><%=dsmoney("norEndmoney")%> 元</td>
    </tr>
<%end if%>
<%end if%>
<%if dsmoney("agnusername")<>"" then%>
    <tr bgcolor="#EFEFEF">
      <td>代理名：</td>
      <td><a href="searchagent.asp?username=<%=dsmoney("agnusername")%>"><font color="black"><%=dsmoney("agnusername")%></font></a></td>
    </tr>
    <tr bgcolor="#EFEFEF">
      <td>操作前余额：</td>
      <td><%=dsmoney("agnStmoney")%> 元</td>
    </tr>
    <tr bgcolor="#EFEFEF">
      <td>操作后余额：</td>
      <td><%=dsmoney("agnEndmoney")%> 元</td>
    </tr>
<%end if%>
    <tr bgcolor="#EFEFEF">
      <td>原因：</td>
      <td><%=dsmoney("forwhat")%></td>
    </tr>
    <tr bgcolor="#EFEFEF">
      <td>操作区/人：</td>
      <td><%if session("agenttype")="子代理" and dsmoney("agent1")<>session("agentusername") then%>UP<%else%><%=dsmoney("atspace")%><%end if%>　<%if session("agenttype")="子代理" and dsmoney("agent1")<>session("agentusername") then%>UP<%else%><%if dsmoney("atspace")<>"管理区" then%><a href="search<%if dsmoney("atspace")="代理区" then%>agent<%else%>user<%end if%>.asp?username=<%=dsmoney("agnusername")%>"><font color="black"><%=dsmoney("opusername")%></font></a><%end if%><%end if%> <%if dsmoney("ishand")="y" then%>　手工<%end if%></td>
    </tr>
<%if dsmoney("isAgnHostSer")=true then%>
    <tr bgcolor="#EFEFEF">
      <td>独立模式：</td>
      <td><font color=red>是</font></td>
    </tr>
<%end if%>
<%if dsmoney("AgnRunasUser")=true then%>
    <tr bgcolor="#EFEFEF">
      <td>代理在用户区：</td>
      <td>以成本价格消费</td>
    </tr>
<%end if%>
    <tr bgcolor="#EFEFEF">
      <td>产品分类：</td>
      <td><%=dsmoney("whichProduct")%></td>
    </tr>
    <tr bgcolor="#EFEFEF">
      <td>产品类型：</td>
      <td><%=dsmoney("pdtype")%></td>
    </tr>
    <tr bgcolor="#EFEFEF">
      <td>相关产品编号：</td>
      <td><%if dsmoney("pdid")>0 then%><a href="<%if dsmoney("whichProduct")="虚拟主机" then%>admsql<%elseif dsmoney("whichProduct")="邮箱产品" then%>admemail<%elseif dsmoney("whichProduct")="数据库产品" then%>admsql<%elseif dsmoney("whichProduct")="域名产品" then%>listmydomain<%elseif dsmoney("whichProduct")="其他产品" then%>handother<%end if%>.asp?id=<%=dsmoney("pdid")%>"><font color=black><%=dsmoney("pdid")%></font></a><%end if%></td>
    </tr>	
    <tr bgcolor="#EFEFEF">
      <td>产品开通时间：</td>
      <td><%=dsmoney("pdsttime")%>　如果是延期/升级操作，这儿代表延期/升级前到期时间</td>
    </tr>
    <tr bgcolor="#EFEFEF">
      <td>产品到期时间：</td>
      <td><%=dsmoney("pdendtime")%></td>
    </tr>
<%if dsmoney("isfortest")=true then%>
    <tr bgcolor="#EFEFEF">
      <td>状态：</td>
      <td><font color=red>试用开通。</font></td>
    </tr>
<%end if%>
  </tbody>
</table>
<p>&nbsp;</p>
<p>    
  <%=htmlwrite("html7")%>
  <%end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>
</p>
