home *** CD-ROM | disk | FTP | other *** search
/ 221.214.14.186 / 221.214.14.186.tar / 221.214.14.186 / dy / gr / schq / data / price.asp < prev    next >
Text File  |  2003-08-22  |  3KB  |  81 lines

  1. <%option explicit%>
  2. <!--#include file="include/sqldb.inc.asp"-->
  3. <%
  4. dim conn,sql,rs
  5. dim currentPage,counts
  6. dim cityid,cityids
  7.     cityid=trim(request("cityid"))
  8.     cityids=split(cityid,",")
  9.     currentPage=trim(request("currentPage"))
  10.     if currentPage="" then currentPage=1
  11.  
  12. set conn=server.createobject("ADODB.connection")
  13. set rs=server.createobject("ADODB.recordSet")
  14.  
  15. conn.open(constr)
  16. sql="select * from SCXX_price"
  17. if cityid<>"" then
  18.     sql=sql & " where 1=0 "
  19.     for counts=0 to ubound(cityids)
  20.         sql=sql & " or cityid=" & cityids(counts)
  21.     next
  22. end if
  23. sql=sql & " order by dates desc,name"
  24. rs.PageSize=20
  25. rs.CursorType=adOpenStatic
  26. rs.Open sql,conn
  27. if cint(currentPage)<1 then currentPage=1
  28. if cint(currentPage)>rs.pageCount then currentPage=rs.PageCount
  29. if rs.eof then currentPage=0
  30. rs.AbsolutePage=cint(currentPage)
  31. %>
  32. <html>
  33. <head>
  34. <title>║╩╘≤╨╦┼⌐═°</title>
  35. </head>
  36. <body  leftMargin=0 topMargin=0>
  37. <form name="form_log" method="post" action="price.asp">
  38. <table>
  39. <tr><td>
  40. <table border=1 bordercolor="white">
  41. <tr >
  42.     <td align=center>├√│╞</td>
  43.     <td align=center>╝█╕±</td>
  44.     <td align=center width=40>╡Ñ╬╗</td>
  45.     <td align=center width=120>╩╨│í</td>
  46.     <td align=center>╩▒╝Σ</td>
  47. </tr>
  48. <%
  49. counts=0
  50. while not rs.eof and counts<rs.PageSize%>
  51.     <tr>
  52.         <td><%=rs("name")%></td>
  53.         <td><%=rs("price")%></td>
  54.         <td><%=rs("units")%></td>
  55.         <td><%=rs("lxfs")%></td>
  56.         <td><%=rs("dates")%></td>
  57.         </tr>
  58. <%
  59. counts=counts+1
  60. rs.movenext
  61. wend%>
  62. </table>
  63. </td></tr>
  64. <tr><td>              <%=currentPage%>/<%=rs.PageCount%>
  65.                    ╝═┬╝╩²:<%=rs.RecordCount%>                 
  66.                                   
  67.               <input type="hidden" name="currentPage" value="<%=currentPage%>">
  68.               <input type="hidden" name="cityid" value="<%=cityid%>">
  69.               <span style="cursor:hand;" onclick="form_log.currentPage.value=1;form_log.submit();">|<</span>
  70.                 
  71.               <span style="cursor:hand;" onclick="form_log.currentPage.value=eval(form_log.currentPage.value)-1;form_log.submit();"><<</span>
  72.                 
  73.               <span style="cursor:hand;" onclick="form_log.currentPage.value=eval(form_log.currentPage.value)+1;form_log.submit();">>></span>
  74.                 
  75.               <span style="cursor:hand;" onclick="form_log.currentPage.value=<%=rs.PageCount%>;form_log.submit();">>|</span>
  76. </TD></TR>
  77. </table>
  78. </form>
  79. </body>
  80. </html>
  81.