<!--#include virtual="/incs/config.asp"-->
<% chk_log()
chk_newpwr 1,10,1
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
perpage=SafeRequest("perpage")
if chk_int(perpage)=false then
perpage=20
end if 
perpage=clng(perpage)
if perpage>=100 then
perpage=100
end if
ThePage=0
page=0
rcount=0
thepage=0
'''''''''''''''''''''''''''''''''
dim colors(25)
colors(0)="#000000"
colors(1)="#ff0000"
colors(2)="#008200"
colors(3)="#ff00ff"
colors(4)="#"
colors(5)="#"
colors(6)="#"
colors(7)="#"
colors(8)="#"
colors(9)="#"
''''''''''''''''''''''''''''''''''
k_wrds=trim(SafeRequest("k_wrds"))
k_tpe=trim(SafeRequest("k_tpe"))
k_mod=trim(SafeRequest("k_mod"))
if  k_wrds<>"" and instr(k_wrds,"'")<=0 then
if k_mod="moda" then
keywords=" and "&k_tpe&"='"&k_wrds&"'"
else
keywords=" and "&k_tpe&" like '%"&k_wrds&"%'"
end if

end if
''''''''''''''''''''''''''''''''''
t_str1=trim(SafeRequest("t_str1"))
t_str2=trim(SafeRequest("t_str2"))
if t_str1<>"" and t_str2<>"" then
if ((not chk_tme(t_str1)) and (not chk_tme(t_str2))) or instr(t_str1,"-")<=0 or instr(t_str2,"-")<=0 then
call errorpage(-2,"对不起，时间格式不正确!")
end if
timestrings=" and (addtime>='"&t_str1&"' and addtime<='"&t_str2&"')"
end if
''''''''''''''''''''''''''''''''''''''
odr1=trim(SafeRequest("odr1"))
odr2=trim(SafeRequest("odr2"))
if odr1="" or odr2="" then
odr1="a_addtime_d"
odr2="b_v_rname_a"
end if
order1=right(odr1,len(odr1)-2)
aff_a=left(order1,len(order1)-2)
if right(order1,1)="a" then
order1=left(order1,len(order1)-2)
else
order1=left(order1,len(order1)-2)&" desc"
end if
order2=right(odr2,len(odr2)-2)
aff_b=left(order2,len(order2)-2)
if right(order2,1)="a" then
order2=left(order2,len(order2)-2)
else
order2=left(order2,len(order2)-2)&" desc"
end if


if aff_a=aff_b then
orderstring=order1
else
orderstring=order1&","&order2
end if

''''''''''''''''''''''
if chk_int(SafeRequest("payid")) then
keywords=" and payid="&SafeRequest("payid")
end if
t_usr=SafeRequest("t_usr")
if session("sysclass")<4 then
t_usr=session("usrname")
end if
if t_usr<>"" then
keywords=keywords&" and v_rname='"&t_usr&"'"
end if

   if session("sysclass")>=5 then
   query="select * from v_onlpay where  1=1  "&keywords&timestrings&pdtfncstring&" order by "&orderstring
   else
   query="select * from v_onlpay where  (u_rotnme='"&session("usrname")&"' or (u_rotnme='' and ("&session("sysarestr")&"  or u_myare=0)))   "&keywords&timestrings&pdtfncstring&"  order by "&orderstring
   end if
conn.open constr
rs.open query,conn,1,1
if rs.RecordCount<=0 then
          ErrMsg="<font color=#ff0000>对不起</font>，没有搜索到符合条件的记录！..."
		
	   else
	      rcount=rs.recordcount
	      rs.pagesize=perpage
		  ThePage=rs.pagecount
		  if Chk_Int(SafeRequest("page"))=false then
		  page=1
		  else
		   page=cint(SafeRequest("page"))
		    if page<=0  then
		       page=1
		    elseif page>ThePage then
		       page=ThePage
		    end if	  
		  end if
		    rs.absolutepage=page
       end if   

%>
<!--#include virtual="/incs/top.asp"-->
<script language="javascript">
<!--

function tofirst()
{searchform.page.value=1;
searchform.submit();
 }
  function toprev()
{searchform.page.value-=1;
searchform.submit();
 }
  function tonext()
{
searchform.page.value=<%=page%>-1+2;
searchform.submit();
 }
  function tolast()
{searchform.page.value=<%=ThePage%>;
searchform.submit();
 }
 function toorder(ordn)
{searchform.odr1.value=ordn;
searchform.page.value=1;
searchform.submit();
 }
 function toorder2()
 {
 frm_qry.k_tpe.value="tpe";
 frm_qry.k_wrds.value=form_sss.odrsss.value;
 frm_qry.submit();
 }
function ifdel(fid)
{
if(confirm("是否确认删除该在线支付记录?"))
location.href="fnc_mng.asp?module=onl_del&payid="+fid;
}

function delall()
{
if(confirm("是否确认删除?"))
document.aff_frm.submit();
}

function checkAll()
  {
    for (var i=0;i<document.aff_frm.elements.length;i++)
    {
      var e = document.aff_frm.elements[i];
      var boolValue = document.aff_frm.selectAll.checked;
      if (e.name != 'selectAll')
	  {
        e.checked = boolValue;
	  }
    }
  }

 //-->
 </script>
<table cellspacing=2 cellpadding=0 width="100%" border=0>
  <tbody> 
  <tr> 
    <td  colspan=2 valign="middle"> 
      <table class=line cellspacing=0 cellpadding=0 width="100%" 
                  border=0 align="center">
        <tbody> 
        <tr> 
          <td valign=bottom width="25%" height=20><font color="#000000" class=ddropshadow><b><span class=enbold><strong>在线支付列表</strong></span></b></font></td>
          <td valign=bottom noWrap align=right 
                        width="75%">&nbsp; </td>
        </tr>
        <tr> 
          <td align=middle width="100%" colspan=2 height=5></td>
        </tr>
        <tr> 
          <td align=middle width="100%" colspan=2 height=2 class=menuline></td>
        </tr>
        </tbody> 
      </table>
    </td>
  </tr>
  <tr> 
    <td  colspan=2 valign="middle" > <br>
      <table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tbody> 
        <form action=onl_lst.asp method=post name=searchform2>
          <tr> 
            <td height=20 width="119">&nbsp;共计 <b> <%=rcount%> </b>条记录 </td>
            <td height=20> 
              <div align="center"> 
                <input type=hidden name=k_tpe value="<%=k_tpe%>">
                <input type=hidden name=k_mod value="<%=k_mod%>">
                <input type=hidden name=k_wrds value="<%=k_wrds%>">
                <input type=hidden name=t_str1 value="<%=t_str1%>">
                <input type=hidden name=t_str2 value="<%=t_str2%>">
                <input type=hidden name=odr1 value="<%=odr1%>">
                <input type=hidden name=t_usr value="<%=t_usr%>">
                <input type=hidden name=odr2 value="<%=odr2%>">
                <input type=hidden name=perpage value="<%=perpage%>"><%=page_turn%><input type=button name=deldall value="删除" class=btxx onclick="javascript: delall();">
              </div>
            </td>
            <td height=20 width="120"> 
              <div align="right">转第 
                <select name="page" onChange="javascript:document.searchform2.submit();">
                  <option selected value=<%=page%>><%=page%></option>
                  <%
				   for i=1 to thepage
				   response.write "<option value="&i&">"&i&"</option>"
				   next
				   %>
                </select>
                页</div>
            </td>
          </tr>
        </form>
        </tbody> 
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height=8></td>
        </tr>
      </table>
      <%
				  if right(odr1,2)="_d" then
				  odr1_1="a_v_amount_a"
				  odr1_2="a_v_pstring_a"
				  odr1_3="a_v_pmode_a"
				  odr1_5="a_addtime_a"

				  odr1_7="a_fathercon_a"
				  odr1_8="a_v_rname_a"
				  else
				  odr1_1="a_v_amount_d"
				  odr1_2="a_v_pstring_d"
				  odr1_3="a_v_pmode_d"
				  odr1_5="a_addtime_d"

				  odr1_7="a_fathercon_d"
				  odr1_8="a_v_rname_d"
				  end if
				  %>
      <br>
      <table border=0 cellpadding=0 
                        cellspacing=0 width="100%" bordercolordark="#FFFFFF" align="center" class=datalist>
        <tbody> 
        <form action=onl_mng.asp method=post name=aff_frm>
          <tr> 
            <th width="6%" height="20" class=datalistheader > 
              <div align="center"><u>序</u></div>
            </th>
            <th width="13%" class=datalistheader > 
              <div align="center"><a href="javascript:toorder('<%=odr1_1%>');" class=commonface ><u><b>金额</b></u></a></div>
            </th>
            <th width="12%" align="center" class=datalistheader ><a  class=commonface href="javascript:toorder('<%=odr1_2%>');"><u><b>支付结果</b></u></a></th>
            <th width="15%" class=datalistheader > 
              <div align="center"><a href="javascript:toorder('<%=odr1_3%>');" class=commonface ><u><b>支付银行</b></u></a></div>
            </th>
            <th width="15%" class=datalistheader > 
              <div align="center"><a href="javascript:toorder('<%=odr1_5%>');" class=commonface ><u><b>支付时间</b></u></a></div>
            </th>
            <th width="8%" class=datalistheader > 
              <div align="center"><u> 
                <input type="checkbox" NAME="selectAll" onClick="return checkAll();" value="ON">
                <input type="hidden" NAME="module"  value="onl_delall">
                </u></div>
            </th>
            <th width="15%" class=datalistheader > 
              <div align="center"><a href="javascript:toorder('<%=odr1_7%>');" class=commonface ><u><b>审核</b></u></a></div>
            </th>
            <th class=datalistheader > 
              <div align="center"><a href="javascript:toorder('<%=odr1_8%>');" class=commonface ><u><b>用户</b></u></a></div>
            </th>
          </tr>
          <%
  i=1
   do while not rs.eof 
   if i mod 2=1 then
   classstl="datalistgrida"
   else
   classstl="datalistgridb"   
   end if
   %>
          <tr > 
            <td height="25" align=center class=<%=classstl%> ><%=i+perpage*(page-1)%></td>
            <td  align=center class=<%=classstl%> > 
              <div align="right"><font color="#000000"><b> <%=getfnc(rs("v_amount"))%></b>&nbsp;</font></div>
            </td>
            <td  align=center class=<%=classstl%> ><font color="#000000"><%=rs("v_pstring")%></font>&nbsp;</td>
            <td  align=center class=<%=classstl%> ><font color="#000000"><%=rs("v_pmode")%></font>&nbsp;</td>
            <td  align=center class=<%=classstl%> ><%=right(left(replace(rs("addtime")," ","   "),10),8)%> 
            </td>
            <td  align=center class=<%=classstl%> > 
              <input type="checkbox" name="delid" value="<%=rs("payid")%>">
            </td>
            <td  align=center class=<%=classstl%> > 
              <%
		  if trim(rs("fathercon"))="" or isnull(rs("fathercon")) then
		  response.write "<a href='onl_mng.asp?module=onl_cfm&payid="&rs("payid")&"'><font color=#ff0000>审核</font></a>"
		  else
		  response.write "<font color=#000000>"&rs("fathercon")&"</font>"
		  end if %>
            </td>
            <td  align=center class=<%=classstl%> > <%=rs("v_rname")%> </td>
          </tr>
          <%
  rs.movenext
i=i+1
if i>perpage then
exit do
end if

  loop 
  %>
        </form>
        </tbody> 
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height=8></td>
        </tr>
      </table>
      <table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tbody> 
        <form action=onl_lst.asp method=post name=searchform>
          <tr> 
            <td height=20 width="120">&nbsp;共计 <b> <%=rcount%> </b>条记录 </td>
            <td height=20> 
              <div align="center"> 
                <input type=hidden name=k_tpe value="<%=k_tpe%>">
                <input type=hidden name=k_mod value="<%=k_mod%>">
                <input type=hidden name=k_wrds value="<%=k_wrds%>">
                <input type=hidden name=t_str1 value="<%=t_str1%>">
                <input type=hidden name=t_str2 value="<%=t_str2%>">
                <input type=hidden name=t_usr value="<%=t_usr%>">
                <input type=hidden name=odr1 value="<%=odr1%>">
                <input type=hidden name=odr2 value="<%=odr2%>">
                <input type=hidden name=perpage value="<%=perpage%>"><%=page_turn%><input type=button name=deldall value="删 除" class=btxx onclick="javascript: delall();">
              </div>
            </td>
            <td height=20 width="120"> 
              <div align="right">转第 
                <select name="page" onChange="javascript:document.searchform.submit();">
                  <option selected value=<%=page%>><%=page%></option>
                  <%
				   for i=1 to thepage
				   response.write "<option value="&i&">"&i&"</option>"
				   next
				   %>
                </select>
                页</div>
            </td>
          </tr>
        </form>
        </tbody> 
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height=8></td>
        </tr>
      </table>
      <br>
      <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class=datalist>
        <form action="onl_lst.asp" method=post name="frm_qry">
          <tr align="center"> 
            <th height="20" class=datalistheader >关键字</th>
            <th  class=datalistheader >用户</th>
            <th class=datalistheader >时间(yyyy-mm-dd)</th>
            <th class=datalistheader >排序</th>
            <th class=datalistheader >条/页</th>
            <th class=datalistheader >查询</th>
          </tr>
          <tr align="center"> 
            <td height="25" class=datalistgridb > 
              <select name="k_tpe" class=normalform >
                <option value="v_rname"  <% if k_tpe="v_rname" then
						  response.write " selected"
						  end if %>>用户</option>
                <option value="v_remail"  <% if k_tpe="v_remail" then
						  response.write " selected"
						  end if %>>邮箱</option>
                <option value="v_pmode"  <% if k_tpe="v_pmode" then
						  response.write " selected"
						  end if %>>银行</option>
              </select>
              <select name="k_mod" class=normalform >
                <option value="moda" <% if k_mod="moda" then
						  response.write " selected"
						  end if %>>等于</option>
                <option value="modb"  <% if k_mod="modb" then
						  response.write " selected"
						  end if %>>类似</option>
              </select>
              <input name="k_wrds" type="text" size="8" maxlength="50" value="<%=k_wrds%>" class=normalform >
            </td>
            <td  class=datalistgridb > 
              <input name="t_usr" type="text" size="10" maxlength="20" value="<%=t_usr%>" class=normalform >
            </td>
            <td class=datalistgridb > 
              <input name="t_str1" type="text" size="6" maxlength="10" value="<%=t_str1%>" class=normalform >
              到 
              <input name="t_str2" type="text" size="6" maxlength="10" value="<%=t_str2%>" class=normalform >
            </td>
            <td class=datalistgridb > 
              <select name="odr1" class=normalform >
                <option value="a_addtime_a" style="color:#ff0000;" <% if odr1="a_addtime_a" then
						  response.write " selected"
						  end if %> >时间顺</option>
                <option style="color:#ff0000" value="a_addtime_d" <% if odr1="a_addtime_d" then
						  response.write " selected"
						  end if %> >时间倒</option>
                <option style="color:#ff00ff" value="a_v_rname_a" <% if odr1="a_v_rname_a" then
						  response.write " selected"
						  end if %> >用户顺</option>
                <option style="color:#ff00ff" value="a_v_rname_d" <% if odr1="a_v_rname_d" then
						  response.write " selected"
						  end if %> >用户倒</option>
                <option style="color:#0000ff" value="a_v_pmode_a" <% if odr1="a_v_pmode_a" then
						  response.write " selected"
							  end if %> >银行顺</option>
                <option style="color:#0000ff" value="a_v_pmode_d" <% if odr1="a_v_pmode_d" then
						  response.write " selected"
						  end if %> >银行倒</option>
                <option style="color:#0000ff" value="a_v_amount_a" <% if odr1="a_v_amount_a" then
						  response.write " selected"
							  end if %> >金额顺</option>
                <option style="color:#0000ff" value="a_v_amount_d" <% if odr1="a_v_amount_d" then
						  response.write " selected"
						  end if %> >金额倒</option>
              </select>
              <select name="odr2" class=normalform >
                <option value="b_addtime_a" style="color:#ff0000;" <% if odr1="b_addtime_a" then
						  response.write " selected"
						  end if %> >时间顺</option>
                <option style="color:#ff0000" value="b_addtime_d" <% if odr1="b_addtime_d" then
						  response.write " selected"
						  end if %> >时间倒</option>
                <option style="color:#ff00ff" value="b_v_rname_a" <% if odr1="b_v_rname_a" then
						  response.write " selected"
						  end if %> >用户顺</option>
                <option style="color:#ff00ff" value="b_v_rname_d" <% if odr1="b_v_rname_d" then
						  response.write " selected"
						  end if %> >用户倒</option>
                <option style="color:#0000ff" value="b_v_pmode_a" <% if odr1="b_v_pmode_a" then
						  response.write " selected"
							  end if %> >银行顺</option>
                <option style="color:#0000ff" value="b_v_pmode_d" <% if odr1="b_v_pmode_d" then
						  response.write " selected"
						  end if %> >银行倒</option>
                <option style="color:#0000ff" value="b_v_amount_a" <% if odr1="b_v_amount_a" then
						  response.write " selected"
							  end if %> >金额顺</option>
                <option style="color:#0000ff" value="b_v_amount_d" <% if odr1="b_v_amount_d" then
						  response.write " selected"
						  end if %> >金额倒</option>
              </select>
            </td>
            <td class=datalistgridb > 
              <input name="perpage" class=normalform  type="text" size="2" maxlength="3" value="<%=perpage%>">
            </td>
            <td class=datalistgridb > 
              <input type="submit"   name="Submit" value="查 询" class=btxx>
            </td>
          </tr>
        </form>
      </table>
    </td>
  </tr>
  </tbody> 
</table>
<!--#include virtual="/incs/bottom.asp"-->

