statforms.asp
上传用户:btntkt
上传日期:2021-04-16
资源大小:5296k
文件大小:3k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

DOS

  1. <!--#include file="conn.asp"-->
  2. <%if session("admin")="" then
  3. response.Write "<script language='javascript'>alert('网络超时或您还没有登陆!');window.location.href='login.asp';</script>"
  4. response.End
  5. end if
  6. 'day1=trim(Request.Form("year1"))&"-"&trim(Request.Form("month1"))&"-"&trim(Request.Form("day1"))
  7. 'day2=trim(Request.Form("year2"))&"-"&trim(Request.Form("month2"))&"-"&trim(Request.Form("day2"))
  8. day1="#"&trim(Request.Form("month1"))&"-"&trim(Request.Form("day1"))&"-"&trim(Request.Form("year1"))&"#"
  9. day2="#"&trim(Request.Form("month2"))&"-"&trim(Request.Form("day2"))&"-"&trim(Request.Form("year2"))&"#"
  10. %>
  11. <html><head><title>Untitled Document</title>
  12. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  13. <link href="../images/css.css" rel="stylesheet" type="text/css">
  14. </head>
  15. <body>
  16. <table class="tableBorder" width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
  17. <tr> 
  18. <td colspan="4" align="center" height="24" bgcolor="#cccccc"><b><font color="#ffffff">统计报表查看</font></b></td>
  19. </tr>
  20. <tr>
  21. <%
  22. set rs=server.createobject("adodb.recordset")
  23. rs.open "select * from products order by bookid",conn,1,1
  24. %>
  25. <td height="107"> 
  26. <table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
  27. <tr align="center" > 
  28. <td width="11%">商品ID</td>
  29. <td width="41%">商品名称</td>
  30. <td width="17%">商品单位</td>
  31. <td width="14%">销售数量</td>
  32. <td width="17%">销售额</td>
  33. </tr>
  34.                                 <%
  35. z_xs_sl=0
  36. z_xs_je=0
  37. while not rs.eof
  38. set rs2=server.createobject("adodb.recordset")
  39. rs2.open "select * from orders where (datediff('d',fhsj,"&day2&")>=0)  and (datediff('d',"&day1&",fhsj)>=0)  and (bookid="&rs("bookid")&")",conn,1,1
  40. 'rs2.open "select * from orders where (datediff('d',fhsj,"&day2&")>=0)  and (bookid="&rs("bookid")&")",conn,1,1
  41. 'response.write "select * from orders where  datediff('d',fhsj,"&day2&")>=0 and  datediff('d',"&day1&",fhsj)<=0 and bookid="&rs("bookid")
  42. 'response.end
  43. xs_sl=0
  44. xs_je=0
  45. while not rs2.eof
  46. xs_sl=xs_sl+rs2("bookcount")
  47. xs_je=xs_je+rs2("zonger")
  48. rs2.movenext
  49. wend
  50. rs2.close
  51. set rs2=nothing
  52. %>
  53. <tr > 
  54. <td align="center" width="11%"><%=rs("bookid")%></td>
  55. <td width="41%" STYLE='PADDING-LEFT: 10px'><%=rs("bookname")%></td>
  56. <td align="center" width="17%"><%=rs("bookchuban")%></td>
  57. <td align="center" width="14%" ><%=xs_sl%></td>
  58. <td align="center" width="17%"><%=xs_je%></td>
  59. </tr>
  60.                                 <%
  61. z_xs_sl=z_xs_sl+xs_sl
  62. z_xs_je=z_xs_je+xs_je
  63. rs.movenext
  64. wend
  65. rs.close
  66. set rs=nothing
  67. %>
  68. <tr > 
  69. <td colspan="5" align="center"> 
  70. <input type="button" name="Submit" value="返回" onClick="javascript:history.go(-1)">
  71. </td>
  72. </tr>
  73. </table>
  74. </td>
  75. </tr>
  76. </table>
  77. <!--#include file="foot.asp"-->
  78. </body>
  79. </html>