/beta/order/ManagerReports.asp

http://github.com/khaneh/Orders · ASP · 579 lines · 523 code · 49 blank · 7 comment · 55 complexity · 2c27129914d312d7a9ddd94cacd600ba MD5 · raw file

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="1256"%><%
  2. 'Order (2)
  3. PageTitle=" "
  4. SubmenuItem=6
  5. if not Auth(2 , 7) then NotAllowdToViewThisPage()
  6. %>
  7. <!--#include file="top.asp" -->
  8. <!--#include File="../include_farsiDateHandling.asp"-->
  9. <!--#include File="../include_JS_InputMasks.asp"-->
  10. <STYLE>
  11. .GetCustTbl {font-family:tahoma; background-color: #DDDDDD; width:630; direction: RTL; }
  12. .GetCustTbl td {padding:2; font-size: 9pt; height:25;}
  13. .GetCustInp { font-family:tahoma; font-size: 9pt;}
  14. .CusTableHeader {background-color: #33AACC; text-align: center; font-weight:bold;}
  15. .CustContactTable {font-family:tahoma; width:100%; border:1 solid black; direction: RTL; background-color:#CCCCCC;}
  16. .CustContactTable td {padding:5;}
  17. .CustTable {font-family:tahoma; width:80%; border:1 solid black; direction: RTL; background-color:black;}
  18. .CustTable td {padding:5;}
  19. .CustTable a {text-decoration:none;color:#000088}
  20. .CustTable a:hover {text-decoration:underline;}
  21. .CusTD1 {background-color: #CCCC66; text-align: left; font-weight:bold;}
  22. .CusTD2 {background-color: #DDDDDD; direction: LTR; text-align: right; font-size:9pt;}
  23. .CusTD3 {background-color: #DDDDDD; text-align: center; font-size:9pt;}
  24. .CusTD4 {background-color: #CCCC66; direction: LTR; text-align: center; font-size:9pt;}
  25. .CustTable4 {font-family:tahoma; direction: RTL; width:100%; height:100%; background-color:#C3DBEB;}
  26. .GenInput { border: 1 solid black; font-family:tahoma; font-size: 9pt;}
  27. .searchTable {background-color: #330099; border: 2 dashed #330099}
  28. .searchTable th {background-color: #BBBBBB; font-weight:normal; font-size:9pt;}
  29. .searchTable td {background-color: #EEEEEE;}
  30. </STYLE>
  31. <%
  32. ResultsInPage = request("ResultsInPage")
  33. FromDate = request("FromDate")
  34. ToDate = request("ToDate")
  35. AllowedPercent= request("AllowedPercent")
  36. Ord = request("Ord")
  37. CurrentPage = request("p")
  38. if FromDate = "" then FromDate = shamsiToday()
  39. if ToDate = "" then ToDate = shamsiToday()
  40. if request("checkDate")="on" OR request("act")="" then checkDate=True
  41. if request("CopyShop")="" then
  42. CopyShop= -1
  43. else
  44. CopyShop= cint(request("CopyShop"))
  45. end if
  46. if request("approve")="" then
  47. approve= -1
  48. else
  49. approve = cint(request("approve"))
  50. end if
  51. if request("issue")="" then
  52. issue= 0
  53. else
  54. issue = cint(request("issue"))
  55. end if
  56. if request("void")="" then
  57. void= 0
  58. else
  59. void = cint(request("void"))
  60. end if
  61. if request("creator")="" then
  62. creator= 0
  63. else
  64. creator = cint(request("creator"))
  65. end if
  66. if ResultsInPage="" then
  67. ResultsInPage= 50
  68. else
  69. ResultsInPage = cint(ResultsInPage)
  70. end if
  71. if AllowedPercent="" then
  72. AllowedPercent= 10
  73. else
  74. AllowedPercent = cint(AllowedPercent)
  75. end if
  76. %>
  77. <br>
  78. <FORM METHOD=POST ACTION="?act=show">
  79. <INPUT TYPE="hidden" Name="p" Value="<%=CurrentPage%>">
  80. <INPUT TYPE="hidden" Name="ord" Value="<%=Ord%>">
  81. <TABLE align=center border=0 bgcolor=#0 cellspacing=1 cellpadding=2 class="searchTable">
  82. <TR>
  83. <TH colspan=3 height=25 align=center bgcolor=#CCCCCC></TD>
  84. </TR>
  85. <TR>
  86. <TD title=" "><INPUT <%if checkDate then response.write "checked"%> TYPE="checkbox" NAME="checkDate"></TD>
  87. <TD> <INPUT class="GenInput" TYPE="text" NAME="FromDate" dir="LTR" value="<%=FromDate%>" size="10" onKeyPress="return maskDate(this);" onBlur="acceptDate(this);" maxlength="10"></TD>
  88. <TD> <INPUT class="GenInput" TYPE="text" NAME="ToDate" dir="LTR" value="<%=ToDate%>" size="10" onKeyPress="return maskDate(this);" onBlur="acceptDate(this);" maxlength="10"></TD>
  89. </TR>
  90. <TR>
  91. <TD> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;</TD>
  92. <TD colspan=2>
  93. <INPUT class="GenInput" TYPE="text" NAME="AllowedPercent" dir="LTR" value="<%=AllowedPercent%>" size="2" onKeyPress="return maskNumber(this);" maxlength="2">
  94. %
  95. </TD>
  96. </TR>
  97. <%
  98. if Auth(2 , 8) then ' Can Change the conditions
  99. checked1 = ""
  100. checked2 = ""
  101. checked3 = ""
  102. if CopyShop = 1 then
  103. checked1 = " checked"
  104. elseif CopyShop = 0 then
  105. checked2 = " checked"
  106. else
  107. checked3 = " checked"
  108. end if
  109. %>
  110. <TR>
  111. <TD><INPUT TYPE="radio" NAME="CopyShop" Value="1" <%=checked1%>>߁ ǁ</TD>
  112. <TD><INPUT TYPE="radio" NAME="CopyShop" Value="0" <%=checked2%>> ߁ ǁ</TD>
  113. <TD><INPUT TYPE="radio" NAME="CopyShop" Value="-1"<%=checked3%>></TD>
  114. </TR>
  115. <%
  116. checked1 = ""
  117. checked2 = ""
  118. checked3 = ""
  119. if approve = 0 then
  120. checked1 = " checked"
  121. elseif approve = 1 then
  122. checked2 = " checked"
  123. else
  124. checked3 = " checked"
  125. end if
  126. %>
  127. <TR>
  128. <TD><INPUT TYPE="radio" NAME="approve" Value="0" <%=checked1%>> </TD>
  129. <TD><INPUT TYPE="radio" NAME="approve" Value="1" <%=checked2%>> </TD>
  130. <TD><INPUT TYPE="radio" NAME="approve" Value="-1"<%=checked3%>></TD>
  131. </TR>
  132. <%
  133. checked1 = ""
  134. checked2 = ""
  135. checked3 = ""
  136. if issue = 0 then
  137. checked1 = " checked"
  138. elseif issue = 1 then
  139. checked2 = " checked"
  140. else
  141. checked3 = " checked"
  142. end if
  143. %>
  144. <TR>
  145. <TD><INPUT TYPE="radio" NAME="issue" Value="0" <%=checked1%>> </TD>
  146. <TD><INPUT TYPE="radio" NAME="issue" Value="1" <%=checked2%>> </TD>
  147. <TD><INPUT TYPE="radio" NAME="issue" Value="-1"<%=checked3%>></TD>
  148. </TR>
  149. <%
  150. checked1 = ""
  151. checked2 = ""
  152. checked3 = ""
  153. if void = 0 then
  154. checked1 = " checked"
  155. elseif void = 1 then
  156. checked2 = " checked"
  157. else
  158. checked3 = " checked"
  159. end if
  160. %>
  161. <TR>
  162. <TD><INPUT TYPE="radio" NAME="void" Value="0" <%=checked1%>> </TD>
  163. <TD><INPUT TYPE="radio" NAME="void" Value="1" <%=checked2%>> </TD>
  164. <TD><INPUT TYPE="radio" NAME="void" Value="-1"<%=checked3%>></TD>
  165. </TR>
  166. <%
  167. checked1 = ""
  168. checked2 = ""
  169. checked3 = ""
  170. if void = 0 then
  171. checked1 = " checked"
  172. elseif void = 1 then
  173. checked2 = " checked"
  174. else
  175. checked3 = " checked"
  176. end if
  177. %>
  178. <TR>
  179. <TD> </TD>
  180. <TD colspan="2">
  181. <SELECT NAME="creator" style='font-family: tahoma,arial ; font-size: 8pt; width: 140px'>
  182. <option value="0" style="color:blue;">**</option>
  183. <% set RS_TEMP=Conn.Execute ("SELECT ID, RealName FROM Users WHERE Display=1 ORDER BY RealName")
  184. Do while not RS_TEMP.eof
  185. %>
  186. <option value="<%=RS_TEMP("ID")%>" <%if RS_TEMP("ID")=creator then response.write " selected "%> ><%=RS_TEMP("RealName")%></option>
  187. <%
  188. RS_TEMP.moveNext
  189. Loop
  190. RS_TEMP.close
  191. %>
  192. </SELECT></TD>
  193. </TR>
  194. <%
  195. end if
  196. %>
  197. <TR>
  198. <TD> </TD>
  199. <TD colspan=2>
  200. <INPUT class="GenInput" TYPE="text" NAME="ResultsInPage" dir="LTR" value="<%=ResultsInPage%>" size="2" onKeyPress="return maskNumber(this);" maxlength="4">
  201. </TD>
  202. </TR>
  203. <TR>
  204. <TD colspan=3 align=center><INPUT class="genButton" TYPE="submit" value=""></TD>
  205. </TR>
  206. </TABLE>
  207. </FORM>
  208. <%
  209. 'if request("act")="show" then
  210. select case Ord
  211. case "1":
  212. order="Invoices.ID"
  213. case "-1":
  214. order="Invoices.ID DESC"
  215. case "2":
  216. order="Users.RealName"
  217. case "-2":
  218. order="Users.RealName DESC"
  219. case "3":
  220. order="Invoices.CreatedDate"
  221. case "-3":
  222. order="Invoices.CreatedDate DESC"
  223. case "4":
  224. order="InvoiceOrderRelations.[Order]"
  225. case "-4":
  226. order="InvoiceOrderRelations.[Order] DESC"
  227. case "5":
  228. order="InvStatus"
  229. case "-5":
  230. order="InvStatus DESC"
  231. case "6":
  232. order="TotalDiscount"
  233. case "-6":
  234. order="TotalDiscount DESC"
  235. case "7":
  236. order="TotalReverse"
  237. case "-7":
  238. order="TotalReverse DESC"
  239. case "8":
  240. order="TotalReceivable"
  241. case "-8":
  242. order="TotalReceivable DESC"
  243. case else:
  244. order="Invoices.CreatedDate DESC"
  245. Ord=-3
  246. end select
  247. criteria=""
  248. writeAND=""
  249. if checkDate then
  250. criteria = "(Invoices.CreatedDate >= '"& FromDate & "') AND (Invoices.CreatedDate <= '"& ToDate & "') "
  251. writeAND=" AND "
  252. end if
  253. if CopyShop <> -1 then
  254. if CopyShop = 1 then
  255. tmp="(InvoiceOrderRelations.[Order] IS NULL) "
  256. else
  257. tmp="(InvoiceOrderRelations.[Order] IS NOT NULL) "
  258. end if
  259. criteria = criteria & writeAND & tmp
  260. writeAND=" AND "
  261. end if
  262. if approve <> -1 then
  263. criteria = criteria & writeAND & "(Invoices.Approved = '"& approve & "') "
  264. writeAND=" AND "
  265. end if
  266. if issue <> -1 then
  267. criteria = criteria & writeAND & "(Invoices.Issued = '"& issue & "') "
  268. writeAND=" AND "
  269. end if
  270. if void <> -1 then
  271. criteria = criteria & writeAND & "(Invoices.Voided = '"& void & "') "
  272. writeAND=" AND "
  273. end if
  274. if creator <> 0 then
  275. criteria = criteria & writeAND & "(Invoices.CreatedBy = '"& creator & "') "
  276. writeAND=" AND "
  277. end if
  278. if writeAND="" then
  279. criteria = "(1=1) "
  280. end if
  281. %>
  282. <TaBlE class="CustTable4" cellspacing="2" cellspacing="2">
  283. <Tr>
  284. <Td colspan="2" valign="top" align="center">
  285. <table class="CustTable" cellspacing='1' style='width:90%;'>
  286. <tr>
  287. <td colspan="9" class="CusTableHeader" style="text-align:right;"> </td>
  288. </tr>
  289. <%
  290. mySQL="SELECT Invoices.*, Users.RealName AS Creator, InvoiceOrderRelations.[Order], orderStatus.name as vazyat, " &_
  291. "orderSteps.name as marhale, CONVERT(int, Invoices.Approved) + CONVERT(int, Invoices.Issued) * 2 AS InvStatus " &_
  292. "FROM orders inner join orderStatus on orders.status = orderStatus.id "&_
  293. "inner join orderSteps on orders.step = orderSteps.id RIGHT OUTER JOIN " &_
  294. " InvoiceOrderRelations ON orders.id = InvoiceOrderRelations.[Order] RIGHT OUTER JOIN " &_
  295. " Invoices INNER JOIN " &_
  296. " Users ON Invoices.CreatedBy = Users.ID ON InvoiceOrderRelations.Invoice = Invoices.ID " &_
  297. "WHERE " & criteria &_
  298. "ORDER BY " & order
  299. 'response.write mySQL
  300. if ord<0 then
  301. style="background-color: #33CC99;"
  302. arrow="<br><span style='font-family:webdings'>6 6 6</span>"
  303. else
  304. style="background-color: #33CC99;"
  305. arrow="<br><span style='font-family:webdings'>5 5 5</span>"
  306. end if
  307. Set RS1 = Server.CreateObject("ADODB.Recordset")
  308. PageSize = ResultsInPage
  309. RS1.PageSize = PageSize
  310. RS1.CursorLocation=3 'in ADOVBS_INC adUseClient=3
  311. RS1.Open mySQL ,Conn,3
  312. TotalPages = RS1.PageCount
  313. if isnumeric(CurrentPage) then
  314. CurrentPage=clng(CurrentPage)
  315. if CurrentPage > TotalPages OR CurrentPage <= 0 then
  316. CurrentPage = 1
  317. end if
  318. else
  319. CurrentPage=1
  320. end if
  321. if not RS1.eof then
  322. RS1.AbsolutePage=CurrentPage
  323. end if
  324. if RS1.eof then
  325. %>
  326. <tr>
  327. <td colspan="9" class="CusTD3"></td>
  328. </tr>
  329. <%
  330. else
  331. %> <tr class="CusTD3" style="cursor:hand;" title=" ">
  332. <td >#</td>
  333. <TD onclick='go2Page(1,1);' style="<%if abs(ord)=1 then response.write style%>"># <%if abs(ord)=1 then response.write arrow%></TD>
  334. <TD onclick='go2Page(1,2);' style="<%if abs(ord)=2 then response.write style%>"> <%if abs(ord)=2 then response.write arrow%></TD>
  335. <TD onclick='go2Page(1,3);' style="<%if abs(ord)=3 then response.write style%>"> <%if abs(ord)=3 then response.write arrow%></TD>
  336. <TD onclick='go2Page(1,4);' style="<%if abs(ord)=4 then response.write style%>"># <%if abs(ord)=4 then response.write arrow%></TD>
  337. <TD onclick='go2Page(1,5);' style="<%if abs(ord)=5 then response.write style%>"> <%if abs(ord)=5 then response.write arrow%></TD>
  338. <TD onclick='go2Page(1,-6);' style="<%if abs(ord)=6 then response.write style%>"> <%if abs(ord)=6 then response.write arrow%></TD>
  339. <TD onclick='go2Page(1,-7);' style="<%if abs(ord)=7 then response.write style%>">ѐ <%if abs(ord)=7 then response.write arrow%></TD>
  340. <TD onclick='go2Page(1,-8);' style="<%if abs(ord)=8 then response.write style%>"> <%if abs(ord)=8 then response.write arrow%></TD>
  341. </tr>
  342. <% tmpCounter = 0
  343. SumDiscount = 0
  344. SumReverse = 0
  345. SumReceivable = 0
  346. AlertColor="bgcolor=#FFAAAA"
  347. Do while NOT RS1.eof AND RS1.AbsolutePage = CurrentPage
  348. tmpCounter = tmpCounter + 1
  349. if tmpCounter mod 2 = 1 then
  350. tmpColor="#FFFFFF"
  351. tmpColor2="#FFFFBB"
  352. Else
  353. tmpColor="#DDDDDD"
  354. tmpColor2="#EEEEBB"
  355. End if
  356. TotalPrice = cdbl(RS1("TotalPrice"))
  357. TotalDiscount = cdbl(RS1("TotalDiscount"))
  358. TotalReverse = cdbl(RS1("TotalReverse"))
  359. TotalReceivable = cdbl(RS1("TotalReceivable"))
  360. if TotalPrice<>0 then
  361. DiscountPercent = cint(TotalDiscount * 100/TotalPrice)
  362. ReversePercent = cint(TotalReverse * 100/TotalPrice)
  363. ReceivablePercent= 100 - cint(TotalReceivable * 100/TotalPrice)
  364. else
  365. DiscountPercent = 0
  366. ReversePercent = 0
  367. ReceivablePercent=0
  368. end if
  369. if DiscountPercent > AllowedPercent then
  370. DiscountAlert=AlertColor
  371. else
  372. DiscountAlert=""
  373. end if
  374. if ReversePercent > AllowedPercent then
  375. ReverseAlert=AlertColor
  376. else
  377. ReverseAlert=""
  378. end if
  379. if ReceivablePercent > AllowedPercent then
  380. ReceivableAlert=AlertColor
  381. else
  382. ReceivableAlert=""
  383. end if
  384. if RS1("IsReverse") then
  385. tmpColor="#FF9966"
  386. SumDiscount = SumDiscount - TotalDiscount
  387. SumReverse = SumReverse - TotalReverse
  388. SumReceivable = SumReceivable - TotalReceivable
  389. else
  390. SumDiscount = SumDiscount + TotalDiscount
  391. SumReverse = SumReverse + TotalReverse
  392. SumReceivable = SumReceivable + TotalReceivable
  393. end if
  394. OrderNo= RS1("Order")
  395. OrderTxt= RS1("vazyat") & " - " & RS1("Marhale")
  396. if isnull(OrderNo) then
  397. OrderNo= "<FONT COLOR='gray'> </FONT>"
  398. OrderTxt= " "
  399. end if
  400. InvStatus= cint(RS1("InvStatus"))
  401. InvStatusTxt=""
  402. '--
  403. if InvStatus Mod 2 = 1 then
  404. InvStatusTxt="<FONT COLOR='Green'> </FONT> - "
  405. else
  406. InvStatusTxt="<FONT COLOR='red'> </FONT> - "
  407. end if
  408. InvStatus=InvStatus \2
  409. if InvStatus Mod 2 = 1 then
  410. InvStatusTxt=InvStatusTxt & "<FONT COLOR='Green'> </FONT> "
  411. else
  412. InvStatusTxt=InvStatusTxt & "<FONT COLOR='red'> </FONT> "
  413. end if
  414. '--
  415. %>
  416. <TR bgcolor="<%=tmpColor%>" style="cursor: hand;" onMouseOver="this.style.backgroundColor='<%=tmpColor2%>'" onMouseOut="this.style.backgroundColor='<%=tmpColor%>'" onclick="window.open('../AR/AccountReport.asp?act=showInvoice&invoice=<%=RS1("ID")%>');">
  417. <TD style="height:30px;"><%=tmpCounter%></TD>
  418. <TD style="height:30px;"><%=RS1("ID")%></TD>
  419. <TD><%=RS1("Creator")%>&nbsp;</TD>
  420. <TD dir="LTR" align='right'><%=RS1("CreatedDate")%>&nbsp;</TD>
  421. <TD dir="LTR" align='right' title="<%=OrderTxt%>"><%=OrderNo%>&nbsp;</TD>
  422. <TD dir="LTR" align='right'><%=InvStatusTxt%>&nbsp;</TD>
  423. <TD dir="LTR" align='right' title="<%=DiscountPercent%>% " <%=DiscountAlert%>><%=Separate(TotalDiscount)%>&nbsp;</TD>
  424. <TD dir="LTR" align='right' title="<%=ReversePercent%>% ѐ" <%=ReverseAlert%>><%=Separate(TotalReverse)%>&nbsp;</TD>
  425. <TD dir="LTR" align='right' title="<%=ReceivablePercent%>% " <%=ReceivableAlert%>><%=Separate(TotalReceivable)%>&nbsp;</TD>
  426. </TR>
  427. <% RS1.moveNext
  428. Loop
  429. if TotalPages = 1 then
  430. if SumPrice<>0 then
  431. DiscountPercent = cint(SumDiscount * 100/SumPrice)
  432. ReversePercent = cint(SumReverse * 100/SumPrice)
  433. ReceivablePercent= 100 - cint(SumReceivable * 100/SumPrice)
  434. else
  435. DiscountPercent = 0
  436. ReversePercent = 0
  437. ReceivablePercent=0
  438. end if
  439. if DiscountPercent > AllowedPercent then
  440. DiscountAlert=AlertColor
  441. else
  442. DiscountAlert=""
  443. end if
  444. if ReversePercent > AllowedPercent then
  445. ReverseAlert=AlertColor
  446. else
  447. ReverseAlert=""
  448. end if
  449. if ReceivablePercent > AllowedPercent then
  450. ReceivableAlert=AlertColor
  451. else
  452. ReceivableAlert=""
  453. end if
  454. %>
  455. <TR bgcolor="#BBBBBB">
  456. <TD style="height:30px;" colspan="6" align="left">:</TD>
  457. <TD dir="LTR" align='right' title="<%=DiscountPercent%>% " <%=DiscountAlert%>><%=Separate(SumDiscount)%>&nbsp;</TD>
  458. <TD dir="LTR" align='right' title="<%=ReversePercent%>% ѐ" <%=ReverseAlert%>><%=Separate(SumReverse)%>&nbsp;</TD>
  459. <TD dir="LTR" align='right' title="<%=ReceivablePercent%>% " <%=ReceivableAlert%>><%=Separate(SumReceivable)%>&nbsp;</TD>
  460. </TR>
  461. <%
  462. else
  463. pageCols=20
  464. '----------------------------------------SAM----------------------------------
  465. if SumPrice<>0 then
  466. DiscountPercent = cint(SumDiscount * 100/SumPrice)
  467. ReversePercent = cint(SumReverse * 100/SumPrice)
  468. ReceivablePercent= 100 - cint(SumReceivable * 100/SumPrice)
  469. else
  470. DiscountPercent = 0
  471. ReversePercent = 0
  472. ReceivablePercent=0
  473. end if
  474. %> <TR bgcolor='#BBBBBB'>
  475. <TD style="height:30px;" colspan="6" align="left"> :</TD>
  476. <TD dir="LTR" align='right' title="<%=DiscountPercent%>% "><%=Separate(SumDiscount)%>&nbsp;</TD>
  477. <TD dir="LTR" align='right' title="<%=ReversePercent%>% ѐ" ><%=Separate(SumReverse)%>&nbsp;</TD>
  478. <TD dir="LTR" align='right' title="<%=ReceivablePercent%>% " ><%=Separate(SumReceivable)%>&nbsp;</TD>
  479. </TR>
  480. <TR class="RepTableTitle">
  481. <TD bgcolor='#33AACC' height="30" colspan="9">
  482. <table width=100% cellspacing=0 style="cursor:hand;color:#444444">
  483. <tr>
  484. <td style="height:25;border-bottom:1 solid black;" colspan=<%=pagecols%>>
  485. <b> <%=CurrentPage%> <%=TotalPages%></b>
  486. &nbsp;&nbsp;<a href="javascript:go2Page(<%=CurrentPage+1%>,0);"> &gt;</a>
  487. </td>
  488. </tr>
  489. <tr>
  490. <% for i=1 to TotalPages
  491. if i = CurrentPage then
  492. %> <td style="color:black;"><b>[<%=i%>]</b></td>
  493. <% else
  494. %> <td onclick="go2Page(<%=i%>,0);"><%=i%></td>
  495. <% end if
  496. if i mod pageCols = 0 then response.write "</tr><tr>"
  497. next
  498. %> </tr>
  499. </table>
  500. </TD>
  501. </TR>
  502. <% end if
  503. end if
  504. %>
  505. </table>
  506. <SCRIPT LANGUAGE="JavaScript">
  507. <!--
  508. function go2Page(p,ord) {
  509. if(ord==0){
  510. ord=<%=Ord%>;
  511. }
  512. else if(ord==<%=Ord%>){
  513. ord= 0-ord;
  514. }
  515. // str='?act=show&FromDate='+escape('<%=FromDate%>')+'&ToDate='+escape('<%=ToDate%>')+'&Ord='+escape(ord)+'&p='+escape(p)
  516. // window.location=str;
  517. document.all.ord.value=ord;
  518. document.all.p.value=p;
  519. document.forms[0].submit();
  520. }
  521. //-->
  522. </SCRIPT>
  523. </Td>
  524. </Tr>
  525. </TaBlE>
  526. <br>
  527. <%
  528. 'end if
  529. %>
  530. <!--#include file="tah.asp" -->