/beta/home/default_new.asp
ASP | 203 lines | 186 code | 14 blank | 3 comment | 18 complexity | b7e567816099f5bae8a7eec3e965def6 MD5 | raw file
1<%@LANGUAGE="VBSCRIPT" CODEPAGE="1256"%><% 2'Home (0) 3PageTitle= "������ ������" 4SubmenuItem=1 5if not Auth(0 , 1) then NotAllowdToViewThisPage() 6 7captionFGColor = "#C6C6D7" 8captionBGColor = "#F4F4FE" 9MsgBodyColor = "#F4F4FE" '"#FFFFEE" 10UrgentMsgBodyColor = "#FFDDDD" 11VeryUrgentMsgBodyColor = "yellow" 12OrderReadyMsgBodyColor = "#33FF99" '#00CCFF 13VeryUrgentMsgScrlColor = "#FFFFCC" 14MsgMainColor = "#FFFFFF" 15 16activeTabColor="#336699" 17disableTabColor="#CCCCCC" 18 19%> 20<!--#include file="top.asp" --> 21<!--#include File="../include_farsiDateHandling.asp"--> 22<!--#include File="../include_JS_InputMasks.asp"--> 23<% 24 25panel = request("panel") 26if panel="" then 27 panel=1 28else 29 panel=cint(panel) 30end if 31 32if request("act")="showItems" then 33 response.buffer = false 34end if 35 36%> 37<style> 38 .MsgTable {font-family:tahoma; direction: RTL; background-color:gray; width:100%; border:none;} 39 .MsgTable td {vertical-align:top;border-bottom:1px solid black;} 40 .MsgTable a {text-decoration:none;color:#000088} 41 .MsgTable a:hover {text-decoration:underline;} 42 .CusTableHeader {background-color: #33AACC; text-align: center; font-weight:bold;} 43 .CusTD3 {background-color: #DDDDDD; text-align: center; font-size:9pt;} 44 .CusTD4 {background-color: #CCCC66; direction: LTR; text-align: center; font-size:9pt;} 45 .CustTable4 {font-family:tahoma; direction: RTL; width:100%; background-color:#C3DBEB; border:4 solid <%=activeTabColor%>;} 46 47 .CusTD1 {background-color: <%=activeTabColor%>; text-align: center; } 48 .CusTD1 a {color:#FFFF00; font-size:9pt;} 49 .CusTD2 {background-color: <%=disableTabColor%>; text-align: center; } 50 .CusTD2 a {color:#888888; font-size:9pt;} 51 .MsgBodyClass {width:100%;height:60px;overflow:auto;} 52</style> 53<SCRIPT LANGUAGE="JavaScript"> 54<!-- 55function selectAll(src){ 56 totalMsgIDs=document.getElementsByName("MsgIDs").length 57 checked=src.checked 58 for (i=0;i<totalMsgIDs;i++) 59 document.getElementsByName("MsgIDs")[i].checked=checked; 60} 61 62//--> 63</SCRIPT> 64<table cellspacing=0 cellpadding=0 width="100%" style="border:4 solid <%=AppFgColor%>;"> 65<tr><td> 66 <TABLE cellspacing=0 cellpadding=0 width="100%"> 67 <TR height='15'> 68 <TD></TD> 69 </TR> 70 71 <TR class='alak' height='25'> 72 <TD width=15 > </TD> 73<% 74 if panel=1 then styleClass="CusTD1" else styleClass="CusTD2" 75%> 76 <TD align=center class='<%=styleClass%>'><A HREF='?panel=1'>���� ��� ����</A></TD> 77 78 <TD width=5 > </TD> 79<% 80 if panel=2 then styleClass="CusTD1" else styleClass="CusTD2" 81%> 82 <TD align=center class='<%=styleClass%>'><A HREF='?panel=2'>���� ��� ������� ���</A></TD> 83 <TD width=400 > </TD> 84 <TD width=* align=left> </TD> 85 </TR> 86</td></tr> 87</table> 88<TaBlE class="CustTable4" cellspacing="2" cellspacing="0" > 89 <Tr> 90 <Td valign="top" align="center"> 91 <FORM METHOD=POST ACTION="default.asp?act=changeStatus"> 92 <table class="MsgTable" cellspacing='1'> 93<% 94 selectTop="" 95' selectTop="TOP 20" 96' session("id") = 6 97 98 if panel=1 then '���� ��� ���� 99 isSmall=0 100 elseif panel=2 then '���� ��� ������� ��� 101 isSmall=1 102 else 103 response.end 104 end if 105 MySQL = "SELECT " & selectTop & " Messages.*, Messages_1.MsgBody AS OrigMsgBody, Messages_1.MsgDate AS OrigMsgDate, Messages_1.MsgTime AS OrigMsgTime, Users.RealName AS Sender FROM Messages INNER JOIN Users ON Messages.MsgFrom = Users.ID LEFT OUTER JOIN Messages Messages_1 ON Messages.replyTo = Messages_1.id WHERE (Messages.MsgTo = '" & session("id") & "') AND (Messages.IsRead = 0) AND (Messages.IsSmall = " & IsSmall & ") ORDER BY Messages.id DESC" 106 Set RS1 = conn.execute(mySQL) 107 if not RS1.eof then 108%> 109 <tr> 110 <td class="CusTD3"></td> 111 <td class="CusTD3" rowspan=2><INPUT TYPE="checkbox" NAME="SelectAll" onclick="selectAll(this);"></td> 112 <td class="CusTD3" colspan=4 style="text-align:right;"> 113 <SELECT NAME="MsgAct" style="font-family:tahoma;font-size:9pt;width:200px;"> 114 <option value="1">������� ���</option> 115 <option value="2">��� ���</option> 116 <option value="3">���� ���� ���</option> 117 </SELECT> 118 <INPUT TYPE="submit" Value="����� �����"class="genButton"> 119 </td> 120 </tr> 121 <tr> 122 <td class="CusTD3">#</td> 123 <td class="CusTD3">��</td> 124 <td class="CusTD3">�����</td> 125 <td class="CusTD3">����</td> 126 <td class="CusTD3">����� ��</td> 127 </tr> 128<% 129 tmpCounter=0 130 Do while not RS1.eof 131 tmpCounter = tmpCounter + 1 132 if tmpCounter mod 2 = 1 then 133 tmpColor="#FFFFFF" 134 tmpColor2="#FFFFBB" 135 Else 136 tmpColor="#DDDDDD" 137 tmpColor2="#EEEEBB" 138 End if 139 if RS1("Urgent")=0 then 140 tmpColor=MsgMainColor 141 elseif RS1("Urgent")=2 then 142 tmpColor=VeryUrgentMsgBodyColor 143 elseif RS1("Urgent")=3 then 144 tmpColor=OrderReadyMsgBodyColor 145 else 146 tmpColor=UrgentMsgBodyColor 147 end if 148 149 RelatedTable = "NaN" 150 151 if trim(RS1("RelatedTable")) = "orders" then 152 RelatedTable="����� " 153 RelatedLink = "../order/TraceOrder.asp?act=show&order=" & RS1("RelatedID") 154 elseif trim(RS1("RelatedTable")) = "accounts" then 155 RelatedTable="����� " 156 RelatedLink = "../CRM/AccountInfo.asp?act=show&SelectedCustomer="& RS1("RelatedID") 157 elseif trim(RS1("RelatedTable")) = "invoices" then 158 RelatedTable="������ " 159 RelatedLink = "../AR/AccountReport.asp?act=showInvoice&invoice=" & RS1("RelatedID") 160 end if 161%> 162 <TR bgcolor="<%=tmpColor%>" onclick="javascript:void(0);"> 163 <TD dir="LTR" align='right'><%=tmpCounter%> </TD> 164 <TD><INPUT TYPE="checkbox" NAME="MsgIDs" Value="<%=RS1("id")%>"></TD> 165 <TD dir="LTR" align='right'><%=RS1("Sender")%> </TD> 166 <TD dir="LTR" align='right'><%=RS1("MsgDate")%><br><%=RS1("MsgTime")%></TD> 167 <TD> 168 <div class="MsgBodyClass"><%=replace(RS1("MsgBody"),chr(13),"<br>")%> </div> 169 <%if RS1("isReply") <> 0 then%> 170 <div class="MsgBodyClass" style="border-top:1px solid gray;">�� ���� ���� ���� ��� (<%=RS1("OrigMsgTime")%> - <%=replace(RS1("OrigMsgDate"),"/",".")%>) �� ��� ���:<BR> <%=replace(RS1("OrigMsgBody"),chr(13),"<br>")%> </div> 171 <%end if%> 172 </TD> 173 <TD><%if RelatedTable <> "NaN" then%> 174 <A HREF="<%=RelatedLink%>" target="_blank"><%=RelatedTable%> <%=RS1("RelatedID")%></A> 175 <%end if%> 176 </TD> 177 </TR> 178<% 179 RS1.moveNext 180 Loop 181 RS1.Close 182 183 if selectTop<>"" and tmpCounter = briefQtty then 184%> 185 <tr> 186 <td colspan="9" class="CusTableHeader" style="text-align:right;"><A HREF="?userID=<%=userID%>&showAll=on&panel=1">����� ���� ...</A></td> 187 </tr> 188<% 189 end if 190 else 191%> 192 <tr> 193 <td colspan="9" class="CusTD3">���</td> 194 </tr> 195<% 196 end if 197%> 198 </table> 199 </FORM> 200 </Td> 201 </Tr> 202</TaBlE> 203<!--#include file="tah.asp" -->