/ltd/ccs/ccs_gz/cx/CF_TEST/CWXS1/cwrpt_company1.asp

http://github.com/zhaowe/bc · ASP · 167 lines · 118 code · 45 blank · 4 comment · 7 complexity · dac892bd773a655ba7a93cb8f89e60c2 MD5 · raw file

  1. <%@ Language=VBScript %>
  2. <%
  3. ' OledbStr_cf = "provider=sqloledb;server=10.254.0.102;database=szxcw;uid=sa;pwd=123456;"
  4. OledbStr_cf = "provider=sqloledb;server=10.254.0.102;database=cwszx;uid=sa;pwd=123456;"
  5. Set objConn_cf = Server.CreateObject("ADODB.Connection")
  6. objConn_cf.Open OledbStr_cf
  7. Set objRst=server.CreateObject ("ADODB.Recordset")
  8. objRst.LockType=3
  9. objRst.CursorType=3
  10. set objRst.activeConnection=objConn_cf
  11. 'Á¬½ÓÊý¾Ý¿â
  12. bdate=Request.QueryString("bdate")
  13. edate=Request.QueryString("edate")
  14. agentname=trim(Request.QueryString("ag"))
  15. company=Request.QueryString("com")
  16. depcity=Request.QueryString("dep")
  17. arrcity=Request.QueryString("arr")
  18. if trim(agentname)="ËùÓдúÀíÈË" then
  19. sqlag=""
  20. else
  21. sqlag=" and agentname='"& trim(agentname) &"'"
  22. end if
  23. if trim(company)="ËùÓй«Ë¾" then
  24. sqlco=""
  25. elseif trim(company)="Í⹫˾" then
  26. sqlco=" and company<>'SZX' "
  27. else
  28. sqlco=" and company='"& trim(company) &"'"
  29. end if
  30. if trim(depcity)="ËùÓк½Õ¾" then
  31. sqldep=""
  32. else
  33. sqldep=" and depcity='"& trim(depcity) &"'"
  34. end if
  35. if trim(arrcity)="ËùÓк½Õ¾" then
  36. sqlarr=""
  37. else
  38. sqlarr=" and arrcity='"& trim(arrcity) &"'"
  39. end if
  40. sqldate=" flightdate>='"& bdate &"' and flightdate<='"& edate &"' "
  41. sqlwhere=sqldate+sqlco+sqlag+sqldep+sqlarr
  42. 'Response.Write sqlwhere
  43. %>
  44. <HTML>
  45. <HEAD>
  46. <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
  47. <meta http-equiv="Content-Language" content="zh-cn">
  48. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  49. <title><%=bdate%>ÖÁ<%=edate%>´úÀíÈËÏúÊÛÓн±Àø¿ÍƱÇé¿ö</title>
  50. <style type="text/css">
  51. A {
  52. FONT-FAMILY: ËÎÌå; FONT-SIZE: 15px; TEXT-DECORATION: none;color:#0000FF
  53. }
  54. A:hover {
  55. FONT-FAMILY: ËÎÌå; FONT-SIZE: 15px; TEXT-DECORATION: underline; color:#FF0000
  56. }
  57. TD {
  58. FONT-FAMILY: ËÎÌå; FONT-SIZE: 14px
  59. }
  60. </style>
  61. </HEAD>
  62. <body>
  63. <p align="center"><b><font size="5" color="#000099"><font color=red> <%=agentname%></font>ÏúÊÛ<font color=red><%=company%></font>Óн±Àø¿ÍƱÇé¿ö</b>(³ÐÔËÈÕÆÚ£º<font color=red><%=bdate%></font>ÖÁ<font color=red><%=edate%></font>)</font></p>
  64. <div align="center">
  65. <p align="left">
  66. <center>
  67. <%
  68. 'SqlIns ="exec cf_proc_temp '"& cstr(bdate) &"', '"& cstr(edate) &"'"
  69. SqlIns ="select ³ÐÔ˹«Ë¾=company,º½°àºÅ=flightno, "
  70. SqlIns =SqlIns+"¿ÍƱÕÅÊý=count(price),½ð¶î=sum(price), "
  71. SqlIns =SqlIns+"½±Àø·ÑÂÊ1=ar1,½±Àø·ÑÂÊ2=ar2,½±Àø·ÑÂÊ3=ar3,½±Àø·Ñ=sum(agentfee) "
  72. SqlIns =SqlIns+" from ticketinfo "
  73. SqlIns =SqlIns+" where "
  74. SqlIns =SqlIns+sqlwhere
  75. SqlIns =SqlIns+" and (ar1<>0 or ar2<>0 or ar3<>0) "
  76. SqlIns =SqlIns+" group by flightno,company,ar1,ar2,ar3 "
  77. SqlIns =SqlIns+"order by company,flightno "
  78. objrst.Source =sqlins
  79. objrst.Open
  80. if not (objrst.EOF and objrst.BOF) then
  81. %>
  82. <table border="0" cellspacing="1" width="96%" height="1" bgcolor="#0000FF" bordercolor="#0000FF">
  83. <tr>
  84. <td height="1" bgcolor="#99CCFF"><b><font color="#990099">³ÐÔ˹«Ë¾</font></b></td>
  85. <td height="1" bgcolor="#99CCFF"><b><font color="#990099">º½°àºÅ</font></b></td>
  86. <td height="1" bgcolor="#99CCFF"><b><font color="#990099">¿ÍƱÕÅÊý</font></b></td>
  87. <td height="1" bgcolor="#99CCFF"><b><font color="#990099">ÏúÊÛ¶î</font></b></td>
  88. <td height="1" bgcolor="#99CCFF"><b><font color="#990099">½±Àø·ÑÂÊ1</font></b></td>
  89. <td height="1" bgcolor="#99CCFF"><b><font color="#990099">½±Àø·ÑÂÊ2</font></b></td>
  90. <td height="1" bgcolor="#99CCFF"><b><font color="#990099">½±Àø·ÑÂÊ3</font></b></td>
  91. <td height="1" bgcolor="#99CCFF"><b><font color="#990099">´ÙÏú·Ñ</font></b></td>
  92. </tr>
  93. <%
  94. objrst.MoveFirst
  95. while not objrst.EOF
  96. %>
  97. <tr>
  98. <td height="1" bgcolor="#FFFFFF"><font color="#0000FF"><%=trim(objrst(0))%></font></td>
  99. <td height="1" bgcolor="#FFFFFF"><font color="#0000FF"><%=objrst(1)%></font></td>
  100. <td height="1" bgcolor="#FFFFFF"><font color="#0000FF"><%=objrst(2)%></font></td>
  101. <td height="1" bgcolor="#FFFFFF"><font color="#0000FF"><%=objrst(3)%></font></td>
  102. <td height="1" bgcolor="#FFFFFF"><font color="#0000FF"><%=objrst(4)%></font></td>
  103. <td height="1" bgcolor="#FFFFFF"><font color="#0000FF"><%=objrst(5)%></font></td>
  104. <td height="1" bgcolor="#FFFFFF"><font color="#0000FF"><%=objrst(6)%></font></td>
  105. <td height="1" bgcolor="#FFFFFF"><font color="#0000FF"><%=objrst(7)%></font></td>
  106. </tr>
  107. <%
  108. objrst.MoveNext
  109. wend
  110. %>
  111. </table>
  112. <% else %>
  113. <p align="center"><b><font size="6" color="red">ÎÞ·ûºÏÌõ¼þµÄÊý¾Ý£¡</font></b></p>
  114. <p align="center">¡¡</p>
  115. <p align="center"><b><a href="./cwxs_index.asp"><font size="4" color="#0000CC">·µ »Ø</font></a></b></p>
  116. <%
  117. end if
  118. objrst.Close %>
  119. </center>
  120. </div>
  121. </body>
  122. </HTML>