⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index_lishi.asp

📁 没有什么
💻 ASP
字号:
<html>
<%
if session("username") = "" then
response.write "<script language=JavaScript>{window.alert('对不起,你尚未登陆或者闲置时间过长,请重新登陆系统!');window.location='index.asp'}</script>"
response.end
end if    
time1=replace(trim(request.Form("time1")),"'","")
time2=replace(trim(request.Form("time2")),"'","")
%>
<!--#include file="clconn.asp"-->
<head>
<link href="Images/css.Css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="calendar.js"></script>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border" bgcolor="#6699FF">

  <tr class="title"> 
    <td height="30" align="center" bgcolor="#FFFFFF" width="100%" colspan="5"><b>历史数据查看</b></td>  
  </tr>
    <tr class="title"> 
    <td  bgcolor="#FFFFFF" width="100%" colspan="2"><b>&nbsp;&nbsp;&nbsp;用户名:<%=session("username")%></b></td>  
	 <td bgcolor="#FFFFFF" width="100%" colspan="3"><form method="POST" action="">开始时间:<input type="text" name="time1" size="14" onFocus="calendar()" value="<%=time1%>">&nbsp; 结束时间:<input type="text" name="time2" size="15" onFocus="calendar()" value="<%=time2%>"><input type=hidden name="subok" value="ok" >
	<input type="submit" value="查询" name="B1"></form></td>  
  </tr>
  <tr>
    <td height="25" align="center" bgcolor="#FFFFFF" width="20%">日期</td>  
    <td height="25" align="center" bgcolor="#FFFFFF" width="20%">安装数</td>  
    <td height="25" align="center" bgcolor="#FFFFFF" width="20%">单价(元)</td>  
    <td height="25" align="center" bgcolor="#FFFFFF" width="20%">佣金(元)</td>  
    <td height="25" align="center" bgcolor="#FFFFFF" width="20%">结算</td>  
  </tr>
  <%
   dim MaxPerPage
   dim sql 
   dim rs
   dim gstBookID
   dim totalPut   
   dim CurrentPage
   dim TotalPages
    if not isempty(request("page")) then
      currentPage=cint(request("page"))
   else
      currentPage=1
   end if
%> 
<%   
set rs=server.createobject("adodb.recordset")  
if time1<>"" and  time2<>"" then
	sql="select * from [shuju] where baohao='"&session("username")&"' and DateDiff('d', riqi, '" & time1 & "')<=0 and DateDiff('d', riqi, '" & time2 & "')>=0 order by id desc"
elseif time1<>"" then
	sql="select * from [shuju] where baohao='"&session("username")&"' and DateDiff('d', riqi, '" & time1 & "')<=0 order by id desc"
elseif time2<>"" then  
	sql="select * from [shuju] where baohao='"&session("username")&"' and DateDiff('d', riqi, '" & time2 & "')>=0 order by id desc"
else
	sql="select * from [shuju] where baohao='"&session("username")&"' order by id desc"
end if
'response.Write(sql)
rs.open sql,conn,1,1   
if rs.eof and rs.bof then %>
  <tr>
    <td height="25" align="center" bgcolor="#FFFFFF" width="100%" colspan="5">尚无数据</td>  
  </tr>
 <% else    
   rs.pagesize=31
   totalPut=rs.recordcount '记录总数    
   totalPage=rs.pagecount    
   MaxPerPage=rs.pagesize    
      if currentpage<1 then    
          currentpage=1    
      end if    
      if currentpage>totalPage then    
          currentpage=totalPage    
      end if    
   if currentPage=1 then    
      showpages    
      showContent    
      showpages1    
    else    
         if (currentPage-1)*MaxPerPage<totalPut then    
         rs.move  (currentPage-1)*MaxPerPage    
         dim bookmark    
         bookmark=rs.bookmark '移动到开始显示的记录位置    
         showpages    
         showContent    
         showpages1    
      else     
               
      end if    
   end if    
      rs.close    
end if    
set rs=nothing      
conn.close    
set conn=nothing      
    
sub showContent    
     dim i,j   
   
%> 
<% i=1             
              do while not (rs.eof or err)
            %> 
<tr>
    <td height="20" align="center" bgcolor="#FFFFFF" width="20%"><%=rs("riqi")%></td>  
    <td height="20" align="center" bgcolor="#FFFFFF" width="20%"><%=rs("shuju")%></td>  
    <td height="20" align="center" bgcolor="#FFFFFF" width="20%"><%=rs("djj")%></td>  
    <td height="20" align="center" bgcolor="#FFFFFF" width="20%"><%=rs("jine")%></td>  
    <td height="20" align="center" bgcolor="#FFFFFF" width="20%"><%if rs("jies")=0 then%><font color="#0000FF">未结算</font><%end if%><%if rs("jies")=1 then%><font color="#FF0000">已结算</font><%end if%></td>  
  </tr>
<%     
                                    if i>=MaxPerPage then exit do '循环时如果到尾部则先退出,如果记录达到页最大显示数,也退出     
                                    i=i+1     
                                    rs.movenext     
                                    loop     
                                   %> 
                                   <%end sub %> <%sub showpages() %>

   <%     
end sub     
sub showpages1()     
dim n     
n=totalPage     
%> 
</table>
<form action="index_lishi.asp" method="GET" align="right">

        <table width="100%">

        <td width="100%" colspan="5">
        <div align="left"> 
            <table width="100%" height="20" border="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
              <tr> 
                <td width="100%" height="20" colspan="5" bgcolor="#D8D8D8"> <div align="left">
                    <p align="center">                    
                    <% If currentPage <> 1 Then %>                                                         
                    <A href=index_lishi.asp?type=<%=request("type")%>><font color="#FF6600">[首页]</font></A>                                                                                                     
                    
                    <% End If %>                                                                                                    
                    <% If currentPage <> rs.PageCount Then %>                                                                                               
                    <A href=index_lishi.asp?type=<%=request("type")%>&Page=<%= (currentPage-1) %> ><font color="#FF6600">[上一页]</font></A>                                                                                                   
                    <A href=index_lishi.asp?type=<%=request("type")%>&Page=<%= (currentPage+1) %> ><font color="#FF6600">[下一页]</font></A>                                                                                                     
                    <A href=index_lishi.asp?type=<%=request("type")%>&Page=<%= totalPage %>><font color="#FF6600">[尾页]</font></A>                                                                                                     
                    <% End If %>                                                                                                    
                    <span style="font-size:10pt">第<font color="#FF0000"><%=currentPage%></font>页/共<font color="#FF0000"><%=totalPage%></font>页                                                                          
                    <%   response.write " 转到:<select name='page' size=1 class=smallselsect style='font-family: 宋体; font-size: 10pt;'>"     
                       for i=1 to n     
                       response.write "<option value="& i      
                       if currentpage=i then      
                       response.write " selected"     
                       end if     
                       response.write ">"& i &"</option>"     
                       next     
                       response.write "</select>"     
                       response.write "<input type='hidden' name='type' value="&request("type")&">"    
                       response.write "&nbsp;<input class=buttonface type='submit'  value='go'  style='font-family: 宋体; font-size: 10pt;'>"  
                      %>
                   </span> </div></td>
              </tr>
            </table>
        </div>
                            <center>
      </form>
      <%end sub%>

          </table>
</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -