日期:2010-08-18  浏览次数:20846 次

<!--#include virtual="/share/config.asp"-->
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
td {
 font-size: 12px;
}
-->
</style>
</head>
<center>
<body>
 
    <table width="400" border="0" cellspacing="0" cellpadding="0">
 <form name="form1" method="post" action="showpage_test.asp">
      <tr>
        <td width="112" height="20"><div align="center">起始日期</div></td>
        <td width="288" height="20"><input name="startTime" type="text" id="startTime" size="20" readonly></td>
      </tr>
      <tr>
        <td height="20"><div align="center">结束日期</div></td>
        <td height="20"><input name="endTime" type="text" id="endTime" size="20" readonly></td>
      </tr>
      <tr>
        <td height="20" colspan="2"><div align="center">
            <input type="submit" name="Submit" value="查询">
            <input type="submit" name="Submit2" value="我要投诉">
          </div></td>
      </tr>
   </form>
    </table>
 
  <br>
  <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td><div align="center">
          <%
const MaxPerPage=1
dim totalPut  
dim CurrentPage
dim TotalPages
dim i,j
if request("page")="" then
 currentPage=1
else
 currentPage=cint(request("page"))'在表单中先强制只能输入数字
 'if IsNumeric(request("page")) then
  'currentPage=cint(request("page"))
 'else
 'Response.write "这里提示只能输入数字"
 'end if   
end if
%>
<%
Set Conn=Server.CreateObject("adodb.Connection")
 Conn.Open Application("connStr")
 Set Rs=server.createobject("adodb.recordset")
 startTime=request("startTime")
 endTime=request("endTime") 
 if startTime<>"" and endTime<>"" then
  endTime=dateadd("d",1,endTime)
  sql="select * from d_leave_word where ly_Date between '"&startTime&"' and '"&endTime&"'"
  endTime=dateadd("d",-1,endTime)
  else
  sql="select * from d_leave_word"  
 end if 
 GoPage="showpage_test.asp"
 Condition="&startTime="&startTime&"&endTime="&endTime&""
rs.open sql,conn,1,1
if rs.eof and rs.bof then
 response.write "<p align='center'><font color='#000066'>还没任何信息!</font></p>"
else
 totalPut=rs.recordcount
 if currentpage<1 then
  currentpage=1
 end if
 if (currentpage-1)*MaxPerPage>totalput then
  if (totalPut mod MaxPerPage)=0 then
   currentpage= totalPut \ MaxPerPage
  else
   currentpage= totalPut \ MaxPerPage + 1
  end if
 end if