/beta/AR/rep_CustomerNoCredit.asp
ASP | 188 lines | 171 code | 15 blank | 2 comment | 16 complexity | 8ebb1e67444c0ac0aec02158d81c3289 MD5 | raw file
1<%@LANGUAGE="VBSCRIPT" CODEPAGE="1256"%><% 2'Order (2) 3PageTitle="����� �������� �� ������ ���� ��� ����" 4SubmenuItem=11 5if not Auth("C" , 9) then NotAllowdToViewThisPage() 6%> 7<!--#include file="top.asp" --> 8<!--#include File="../include_farsiDateHandling.asp"--> 9<!--#include File="../include_JS_InputMasks.asp"--> 10<!--#include File="../include_UtilFunctions.asp"--> 11<STYLE> 12 .GetCustTbl {font-family:tahoma; background-color: #DDDDDD; width:630; direction: RTL; } 13 .GetCustTbl td {padding:2; font-size: 9pt; height:25;} 14 .GetCustInp { font-family:tahoma; font-size: 9pt;} 15 .CusTableHeader {background-color: #33AACC; text-align: center; font-weight:bold;} 16 .CustContactTable {font-family:tahoma; width:100%; border:1 solid black; direction: RTL; background-color:#CCCCCC;} 17 .CustContactTable td {padding:5;} 18 .CustTable {font-family:tahoma; width:80%; border:1 solid black; direction: RTL; background-color:black;} 19 .CustTable td {padding:5;} 20 .CustTable a {text-decoration:none;color:#000088} 21 .CustTable a:hover {text-decoration:underline;} 22 .CusTD1 {background-color: #CCCC66; text-align: left; font-weight:bold;} 23 .CusTD2 {background-color: #DDDDDD; direction: LTR; text-align: right; font-size:9pt;} 24 .CusTD3 {background-color: #DDDDDD; direction: LTR; text-align: center; font-size:9pt;} 25 .CusTD4 {background-color: #CCCC66; direction: LTR; text-align: center; font-size:9pt;} 26 .CustTable4 {font-family:tahoma; direction: RTL; width:100%; height:100%; background-color:#C3DBEB;} 27</STYLE> 28<% 29if request("act")="show" then 30 31 'ON ERROR RESUME Next 32 Ord = request("Ord") 33 If Ord="" Then Ord = 0 34 select case Ord 35 case "1": 36 order="accounts.id" 37 case "-1": 38 order="accounts.id DESC" 39 case "2": 40 order="AccountTitle" 41 case "-2": 42 order="AccountTitle DESC" 43 case "3": 44 order="creditLimit" 45 case "-3": 46 order="creditLimit DESC" 47 case "4": 48 order="arBalance" 49 case "-4": 50 order="arBalance DESC" 51 case "5": 52 order="apBalance" 53 case "-5": 54 order="apBalance DESC" 55 case "6": 56 order="aoBalance" 57 case "-6": 58 order="aoBalance DESC" 59 case "7": 60 order="realName" 61 case "-7": 62 order="realName DESC" 63 64 case else: 65 order="accounts.id" 66 Ord=1 67 end select 68%> 69 <TABLE dir=rtl align=center width=640 cellspacing=2 cellpadding=2 style="border:2 solid #330066;"> 70 <TR bgcolor="eeeeee" style="cursor:hand;" title="����� �����"> 71 <TD width=50 onclick='go2Page(1,1);' style="<%if abs(ord)=1 then response.write style%>">����� ����� <%if abs(ord)=1 then response.write arrow%></TD> 72 <td onclick='go2Page(1,2);' style="<%if abs(ord)=2 then response.write style%>">��� <%if abs(ord)=2 then response.write arrow%></td> 73 <td onclick='go2Page(1,3);' style="<%if abs(ord)=3 then response.write style%>">������ <%if abs(ord)=3 then response.write arrow%></td> 74 <td onclick='go2Page(1,4);' style="<%if abs(ord)=4 then response.write style%>">����� ���� <%if abs(ord)=4 then response.write arrow%></td> 75 <td onclick='go2Page(1,5);' style="<%if abs(ord)=5 then response.write style%>">����� ���� <%if abs(ord)=5 then response.write arrow%></td> 76 <td onclick='go2Page(1,6);' style="<%if abs(ord)=6 then response.write style%>">����� ���� <%if abs(ord)=6 then response.write arrow%></td> 77 <td onclick='go2Page(1,7);' style="<%if abs(ord)=7 then response.write style%>">����� ������ <%if abs(ord)=7 then response.write arrow%></td> 78 </TR> 79 <TR bgcolor="eeeeee" > 80 <TD colspan=7 height=2 bgcolor=0></TD> 81 </TR> 82 83<% 84 mySQL="select accounts.*,users.realName from accounts left outer join users on accounts.csr=users.id where creditLimit>0 ORDER BY " & order 85 86 Set rs=Server.CreateObject("ADODB.Recordset")'Conn.Execute(mySQL) 87 88 PageSize = 50 89 rs.PageSize = PageSize 90 91 rs.CursorLocation=3 'in ADOVBS_INC adUseClient=3 92 rs.Open mySQL ,Conn,3 93 TotalPages = rs.PageCount 94 95 CurrentPage=1 96 97 if isnumeric(Request.QueryString("p")) then 98 pp=clng(Request.QueryString("p")) 99 if pp <= TotalPages AND pp > 0 then 100 CurrentPage = pp 101 end if 102 end if 103 104 if not rs.eof then 105 rs.AbsolutePage=CurrentPage 106 end if 107 108 if rs.eof then 109%> <tr> 110 <td bgcolor="#BBBBBB" height="30" colspan="7" align=center><b>��� .</b></td> 111 </tr> 112<% else 113 Do While NOT rs.eof AND (rs.AbsolutePage = CurrentPage) 114 tmpCounter = tmpCounter + 1 115 if tmpCounter mod 2 = 1 then 116 tmpColor="#FFFFFF" 117 tmpColor2="#FFFFBB" 118 Else 119 tmpColor="#DDDDDD" 120 tmpColor2="#EEEEBB" 121 End if 122 %> 123 <TR bgcolor="<%=tmpColor%>" > 124 <TD dir=ltr align=right><A href="../CRM/AccountInfo.asp?act=show&selectedCustomer=<%=rs("ID")%>"><%=rs("id")%></A></TD> 125 <TD><%=rs("accountTitle")%></TD> 126 <TD style='direction:LTR;text-align:right;'><%=Separate(rs("creditLimit"))%></TD> 127 <TD style='direction:LTR;text-align:right;'><%=Separate(rs("arBalance"))%></TD> 128 <TD style='direction:LTR;text-align:right;'><%=Separate(rs("apBalance"))%></TD> 129 <TD style='direction:LTR;text-align:right;'><%=Separate(rs("aoBalance"))%></TD> 130 <TD><%=rs("realName")%></TD> 131 </TR> 132 133 <% 134 rs.moveNext 135 Loop 136 137 if TotalPages > 1 then 138 pageCols=20 139%> 140 <TR bgcolor="eeeeee" > 141 <TD colspan=7 height=2 bgcolor=0></TD> 142 </TR> 143 <TR class="RepTableTitle"> 144 <TD bgcolor="#CCCCEE" height="30" colspan="7"> 145 <table width=100% cellspacing=0 style="cursor:hand;color:gray;"> 146 <tr> 147 <td style="height:25;border-bottom:1 solid black;" colspan=<%=pagecols%>> 148 <b>���� <%=CurrentPage%> �� <%=TotalPages%></b> 149 <a href="javascript:go2Page(<%=CurrentPage+1%>,0);">���� ��� ></a> 150 </td> 151 </tr> 152 <tr> 153<% for i=1 to TotalPages 154 if i = CurrentPage then 155%> <td style="color:black;"><b>[<%=i%>]</b></td> 156<% else 157%> <td onclick="go2Page(<%=i%>,0);"><%=i%></td> 158<% end if 159 if i mod pageCols = 0 then response.write "</tr><tr>" 160 next 161 162%> </tr> 163 </table> 164 </TD> 165 </TR> 166<% end if 167%> 168 </TABLE> 169 <br> 170 171 <SCRIPT LANGUAGE="JavaScript"> 172 function go2Page(p,ord) { 173 if(ord==0){ 174 ord=<%=Ord%>; 175 } 176 else if(ord==<%=Ord%>){ 177 ord= 0-ord; 178 } 179 str = '?act=show&FromDate=' + escape('<%=FromDate%>') + '&ToDate=' + escape('<%=ToDate%>') + '&Ord=' + escape(ord) + '&p=' + escape(p); 180 window.location = str; 181 } 182 </SCRIPT> 183<% 184 End if 185End If 186 187%> 188<!--#include file="tah.asp" -->