<%@ Language=VBScript %>
<%If session("admau")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
elseIf session("cancheckmoney")="" 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 isnew='y' and isdel is null order by id desc"
'if Request.QueryString ("op") ="all" then Sql="Select * from FreeHost.FreeHost_Product_Host order by id desc"
'if Request.QueryString ("op") ="pause" then Sql="Select * from FreeHost.FreeHost_Product_Host where endtime<'"&now&"' order by endtime desc"
'if Request.QueryString ("op") ="del" then Sql="Select * from FreeHost.FreeHost_Product_Host where endtime<'"&dateadd("d",-30,now)&"' order by endtime desc"
	dsmoney.PageSize = 25
	dsmoney.Open Sql,conn,1,1
%>
<!--#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" ><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"  onClick="ShowDtable(1,4)"  id="tableTop1"><font color="#FFFFFF"> 财务管理</font><br></td>
            <td width="5" background="img/midtop2.gif">&nbsp;</td>
          </tr>
      </table></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"  onClick="ShowDtable(3,4)" id="tableTop3" style="Cursor:hand"><font color="#FFFFFF">查询统计<br>
          </font> </td>
          <td width="5" background="img/midtop2.gif">&nbsp;</td>
        </tr>
      </table></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"  id="tableTop4" style="Cursor:hand"><a href="moneydeep.asp"><b><font color="#FFFFFF">财务分析</font></b></a></td>
          <td width="5" background="img/midtop2.gif">&nbsp;</td>
        </tr>
      </table></TD>
      <TD width="83" align="left" id="tableTop2">&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="center" vAlign=top background="contopa.gif" bgcolor="#FFFFFF">


        <table width="98%"  border="0" cellspacing="0" cellpadding="0" id="table1">
          <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>财务操作　　　　　　　<a href="#"  onClick="table2.style.display='';"><font color="#FFFFFF">显示财务流水</font></a></strong></font></td>
                  <td width="10"><a href="#"  onClick="table1.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>
			
			
			
<form action="moneyall-sub.asp" method="post" name="moneyform" target="iframeFreeHost" id="Form1">
<table width="100%" height="7"  border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td></td>
  </tr>
</table>

<table width="100%" height="108"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
  <tr bgcolor="#eeeeee">
    <td height="67" valign="middle" bgcolor="#FFFFFF"> <br>　
      <select name="usertype" id="usertype">
        <option value="用户或代理名">用户或代理名</option>
        <option value="用户名">用户名</option>
        <option value="代理名">代理名</option>
      </select>      
      <input name="username" type="text" id="username" size="14" value="<%=Request.QueryString("username")%>">
  　金额
  <input name="usermoney" type="text" id="usermoney" size="4" maxlength="7" value="<%=Request.QueryString("usermoney")%>">
  元
  凭证
<input name="pingzheng" type="text" id="pingzheng" size="14">
<br>
  　
  [加]
  <input name="add" type="radio" value="入款" onClick="linkex.style.visibility='visible';">
  入款
  <input type="radio" name="add" value="退款" onClick="linkex.style.visibility='hidden';">
退款
<input type="radio" name="add" value="优惠虚增" onClick="linkex.style.visibility='hidden';">
优惠虚增
　
<span class="style1">   　　　
[减]
<input type="radio" name="add" value="直接扣款" onClick="linkex.style.visibility='hidden';">
直接扣款  
<input type="radio" name="add" value="消费扣款" onClick="linkex.style.visibility='hidden';">
  消费扣款</span><br>
  <Div id="linkex" style="visibility: hidden;background:#CCFFCC">
    　相关银行：
      <input name="bank" type="radio" value="中行">  
     中行
     <input name="bank" type="radio" value="工行">
  工行
  <input name="bank" type="radio" value="建行">
  建行 
  <input name="bank" type="radio" value="农行">
  农行
  <input name="bank" type="radio" value="招行">
  招行
  <input name="bank" type="radio" value="交行">
交行
<input name="bank" type="radio" value="邮政">
  邮政
  <input name="bank" type="radio" value="现金">
  现金<br>
  　　　　　　
  <input name="bank" type="radio" value="公司帐号">
  公司帐号
  <input name="bank" type="radio" value="在线支付">
  在线支付
  <input name="bank" type="radio" value="其他"> 
  其他
  　　
  <input name="bank" type="radio" value="实收" onClick="document.moneyform.haveget[0].checked=true;"> 
  实收(自动设置为到帐)<br>
  　是否到帐：
  <input name="haveget" type="radio" value="是" id=havegetop>
  已到帐
  <input name="haveget" type="radio" value="否">
  未到帐　　是否计入业务提成
  <input name="kefuget" type="radio" id=havegetop value="是" checked>
是  
<input name="kefuget" type="radio" value="否"> 
否
<br>
  </Div>
  　公开原因：
  <input name="forwhat" type="text" id="forwhat" size="60" maxlength="200" value="<%=Request.QueryString("forwhat")%>">
  <br>    
  　内部记录：
  <input name="corewhat" type="text" id="corewhat" size="60" maxlength="100" value="<%=Request.QueryString("forwhat")%>">
  <br>
  　
  <input type="submit" name="Submit" value="执行" onClick="actionbut(1)">
</td>
    </tr>
</table> 
</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>


<iframe name="iframeFreeHost" width="0" height="0" scrolling="no" id="iframeFreeHost" frameborder="0"></iframe>
<table width="98%"  border="0" cellspacing="0" cellpadding="0" id="table0"  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 width="649" align="left" valign="top"><font color="#FFFFFF"><strong>执行结果</strong></font></td>
          <td width="19" align="right"><a href="#"  onClick="table0.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><table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="10" colspan="3"></td>
        </tr>
        <tr>
          <td width="25" height="50">&nbsp;</td>
          <td height="50" align="left" id=outconM>正在提交数据中.........</td>
          <td width="10" height="50">&nbsp;</td>
        </tr>
        <tr>
          <td colspan="3">&nbsp;</td>
        </tr>
    </table></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="table2">
<%
If session("canmoneyNew")="" Then
response.Write "您没有查看财务记录的权限。"
else
%>
          <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';"><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>
			
			

<%
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
%><br>

<%if clng(pn)<=10 then%>最新 <%for i=begini to endini
    if clng(pn)=i then%><font color=red>[<%=i%>]</font><%else%><a href="?<%=ask(0)%>&pn=<%=i%>"><font color="#000000">[<%=i%>]</font></a><%end if%>　<%next%> 
        <%else%>　<a href="?<%=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="?<%=ask(0)%>&pn=<%=pn-1%>"><font color="#000000">上一页</font></a>
        <%End If%>|<%If Clng(pn)<dsmoney.PageCount Then%><a href="?<%=ask(0)%>&pn=<%=pn+1%>"><font color="#000000">下一页</font></a>
        <%End If%>
<br>
<br>
<table width="100%"  border="0" cellspacing="1" bgcolor="#CCCCCC">
  <tr valign="middle" bgcolor="#EEEEEE">
    <td width="8%" height="29" align="center"><font color="#000000">编号</font></td>
    <td width="8%" align="center"><font color="#000000">增加</font></td>
	<td width="8%" align="center"><font color="#000000">减少</font></td>
    <td width="13%" align="center"><font color="#000000">用户/代理</font></td>
    <td width="13%" align="center"><font color="#000000">类别/操作人</font></td>
    
    <td align="center"><font color="#000000">原因</font></td>
	<td width="70" align="center"><font color="#000000">时间</font></td>
  </tr>
<%
For N=1 To dsmoney.PageSize 
					If dsmoney.RecordCount=0 Then Exit For
%>

  <tr bgcolor="#FFFFFF" onmouseover=this.bgColor='#E4EAF2'; onmouseout=this.bgColor='#FFFFFF';>
    <td width="8%" align="center"><%=dsmoney("id")%></td>
    <td width="8%" align="center"><%if dsmoney("isadd")="y" then%><a href="moneyshow.asp?id=<%=dsmoney("id")%>"><font color="black"><%=replace(replace(formatCurrency(dsmoney("usermoney"),2,-1),".00",""),"￥","")%></font></a><%end if%></td>
	<td width="8%" align="center"><%if not dsmoney("isadd")="y" then%><a href="moneyshow.asp?id=<%=dsmoney("id")%>"><font color="black"><%=replace(replace(formatCurrency(dsmoney("usermoney"),2,-1),".00",""),"￥","")%></font></a><%end if%></td>
    <td width="13%" align="center"><a href="searchuser.asp?username=<%=dsmoney("norusername")%>"><font color="black"><%=dsmoney("norusername")%></font></a><%if dsmoney("isagn")="y" then%><a href="searchagent.asp?username=<%=dsmoney("agnusername")%>"><font color="black">(<%=dsmoney("agnusername")%>)</font></a><%end if%></td>
    <td width="13%" align="center"><%=dsmoney("atspace")%><%if dsmoney("ishand")="y" then%>手工<%end if%><%=dsmoney("opusername")%></td>
    <td align="center"><a href="moneyshow.asp?id=<%=dsmoney("id")%>"><font color="black"><%=dsmoney("corewhat")%></font></a></td>
	<td width="70" align="center"><%=dsmoney("attime")%></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%>
<%
end if
dsmoney.close
set dsmoney=nothing



%>
</table>			
			
			
			
			
			
			</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>
<%end if%>

        </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" target=_blank>
      <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>
            <option value="消费扣款">消费扣款</option>
          </select>
          <br>
          <br>
    　
    <select name="usertype" id="usertype">
      <option value="用户或代理名">用户或代理名</option>
      <option value="用户名">用户名</option>
      <option value="代理名">代理名</option>
      <option value="操作人">操作人</option>
    </select>
    ：
    <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">
	    或[产品编号]：
    <input name="pdid" type="text" id="pdid" 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"><br>

    　<input type="submit" name="Submit" value="执行">　不分页：<input name="showinone" type="checkbox" value="y">
    <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>
　<a href="moneyalllist.asp?op=repay" 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><table width="98%"  border="0" cellspacing="0" cellpadding="0" id="table4" 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><font color="#FF0000">旧版</font>记录查询 查询财务记录(3.5以前的版本)</strong></font></td>
          <td width="10"><a href="#"  onClick="table4.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"><br>
<form action="oldmoneyalllist.asp" method="get" name="form1" target="_blank">
        <input name="op" type="hidden" value="search">
        <br>
        <p>　<font color="#000000"><a href="oldmoney.asp" target="_blank">旧版财务记录&gt;&gt;&gt;</a></font>　        
        <p>　用户名或代理名：
            <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="执行">
            </form>
      <br>
      <br></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")%>
<%end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>
