PageRenderTime 24ms CodeModel.GetById 12ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 1ms

/beta/home/default_old.asp

http://github.com/khaneh/Orders
ASP | 273 lines | 253 code | 9 blank | 11 comment | 23 complexity | 71e7c844b979a69b8b5c36beff2219f9 MD5 | raw file
  1<%@LANGUAGE="VBSCRIPT" CODEPAGE="1256"%><% 
  2'Home (0)
  3session("id")=6
  4PageTitle= "������ ������"
  5SubmenuItem=1
  6if not Auth(0 , 1) then NotAllowdToViewThisPage()
  7
  8captionFGColor = "#C6C6D7"
  9captionBGColor = "#F4F4FE"
 10MsgBodyColor = "#F4F4FE" '"#FFFFEE"
 11UrgentMsgBodyColor = "#FFDDDD"
 12VeryUrgentMsgBodyColor = "yellow"
 13OrderReadyMsgBodyColor = "#33FF99" '#00CCFF
 14VeryUrgentMsgScrlColor = "#FFFFCC"
 15MsgMainColor = "#FFFFFF"
 16%>
 17<!--#include file="top.asp" -->
 18<!--#include File="../include_farsiDateHandling.asp"-->
 19<!--#include File="../include_JS_InputMasks.asp"-->
 20<style>
 21.scrollOrderReady {
 22	scrollbar-3dlight-color:	<%=captionFGColor%>; 
 23	scrollbar-arrow-color:		<%=captionFGColor%>;
 24	scrollbar-base-color:		<%=captionFGColor%>;
 25	scrollbar-darkshadow-color:	<%=captionFGColor%>;
 26	scrollbar-face-color:		<%=OrderReadyMsgBodyColor%>;
 27	scrollbar-highlight-color:	<%=OrderReadyMsgBodyColor%>;
 28	scrollbar-shadow-color:		<%=captionFGColor%> 
 29	width:170; height:160; overflow:auto;
 30	}
 31.scrollNorm {
 32	scrollbar-3dlight-color:	<%=captionFGColor%>; 
 33	scrollbar-arrow-color:		<%=captionFGColor%>;
 34	scrollbar-base-color:		<%=captionFGColor%>;
 35	scrollbar-darkshadow-color:	<%=captionFGColor%>;
 36	scrollbar-face-color:		<%=MsgMainColor%>;
 37	scrollbar-highlight-color:	<%=MsgMainColor%>;
 38	scrollbar-shadow-color:		<%=captionFGColor%> 
 39	width:170; height:160; overflow:auto;
 40	}
 41.scrollUrg {
 42	scrollbar-3dlight-color:	<%=MsgMainColor%>; 
 43	scrollbar-arrow-color:		<%=MsgMainColor%>;
 44	scrollbar-base-color:		<%=MsgMainColor%>;
 45	scrollbar-darkshadow-color:	<%=MsgMainColor%>;
 46	scrollbar-face-color:		<%=UrgentMsgBodyColor%>;
 47	scrollbar-highlight-color:	<%=UrgentMsgBodyColor%>;
 48	scrollbar-shadow-color:		<%=MsgMainColor%> 
 49	width:170; height:160; overflow:auto;
 50	}
 51.scrollSpec {
 52	scrollbar-3dlight-color:	<%=MsgMainColor%>; 
 53	scrollbar-arrow-color:		<%=MsgMainColor%>;
 54	scrollbar-base-color:		<%=MsgMainColor%>;
 55	scrollbar-darkshadow-color:	<%=MsgMainColor%>;
 56	scrollbar-face-color:		<%=VeryUrgentMsgScrlColor%>;
 57	scrollbar-highlight-color:	<%=VeryUrgentMsgScrlColor%>;
 58	scrollbar-shadow-color:		<%=MsgMainColor%> 
 59	width:170; height:160; overflow:auto;
 60	}
 61.ArchiveDiv {
 62	scrollbar-3dlight-color:	<%=captionBGColor%>; 
 63	scrollbar-arrow-color:		<%=captionBGColor%>;
 64	scrollbar-base-color:		<%=captionBGColor%>;
 65	scrollbar-darkshadow-color:	<%=captionBGColor%>;
 66	scrollbar-face-color:		<%=captionFGColor%>;
 67	scrollbar-highlight-color:	<%=captionBGColor%>;
 68	scrollbar-shadow-color:		<%=captionBGColor%> 
 69	width:180; height:400; overflow:auto;
 70	}
 71.captionBut {
 72	border: solid 1pt white; 
 73	cursor:hand; 
 74	background-color: <%=captionFGColor%>; 
 75	width:10
 76	}
 77.captionBut a {	text-decoration:none; color: black;}
 78</style>
 79<center>
 80<BR><BR>
 81<TABLE>
 82<TR>
 83	<TD  valign=top>
 84		<TABLE width=530 border=0 align=center cellpadding=0 cellspacing=6>
 85		<TR>
 86			<TD colspan='3' height='1'></TD>
 87		</TR>
 88		<TR>
 89		<%
 90		if request("act") = "close" then
 91			MySQL = "UPDATE Messages SET IsRead = 1 WHERE (id = "& request("id") & ")"
 92			conn.Execute (MySQL)
 93		end if
 94
 95		if request("act") = "minimize" then
 96			MySQL = "UPDATE Messages SET IsSmall = 1 WHERE (id = "& request("id") & ")"
 97			conn.Execute (MySQL)
 98		end if
 99
100		if request("act") = "mazimize" then
101			MySQL = "UPDATE Messages SET IsSmall = 0 WHERE (id = "& request("id") & ")"
102			conn.Execute (MySQL)
103		end if
104		'--------------------------------------------------------------------------------
105		'--------------------------------------------------------------------------------
106		'--------------------------------------------------------------------------------
107		'--------------------------------------------------------------------------------
108		MySQL = "SELECT * FROM Messages WHERE (MsgTo = "& session("id") & ") and  (IsRead = 0) and (IsSmall = 0) order by id DESC"
109		set RSM = conn.Execute (MySQL)
110		cnt = 0 
111		Do While Not (RSM.eof) 
112			set RSV=Conn.Execute ("SELECT RealName FROM Users where ID=" & RSM("MsgFrom")) 
113			%>
114			<TD valign=top bgcolor=<% if RSM("Urgent")=0 then %><%=MsgMainColor%><% elseif RSM("Urgent")=2 then %><%=VeryUrgentMsgBodyColor%><% elseif RSM("Urgent")=3 then %><%=OrderReadyMsgBodyColor%><% else %><%=UrgentMsgBodyColor%><% end if %> width=170 height=170 bgcolor=white style='border: solid 1pt black '>
115				<div>
116				<div  style=" height:10;position: relative; top:0; left:0">
117				<TABLE cellpadding=0 cellspacing=0 width=100% >
118				<TR height=5 bgcolor=<%=captionBGColor%>>
119					<TD title="���" class="captionBut"><A class="" onclick="return confirm('��� ������ �� ������ ��� �� ��� ���Ͽ')" HREF="default.asp?act=close&id=<%=RSM("id")%>"> X </A></TD>
120					<TD title="�����" class="captionBut"><A HREF="default.asp?act=minimize&id=<%=RSM("id")%>">&nbsp;v </A></TD>
121					<TD align=left  valign=top width=15><FONT COLOR="<%=SelectedMenuColor%>">��: </FONT></TD>
122					<TD align=right valign=top width=75><div style="width:75px; text-overflow : ellipsis; overflow : hidden;"><NOBR>&nbsp; <%=RSV("RealName")%></NOBR></div></TD>
123					<TD class="captionBut"><A HREF="message.asp?act=reply&id=<%=RSM("id")%>&retURL=<%=Server.URLEncode("default.asp")%>">����</a></TD>
124					<TD class="captionBut"><A HREF="message.asp?act=forward&id=<%=RSM("id")%>&retURL=<%=Server.URLEncode("default.asp")%>">�����</a></TD>
125				</TR>
126				<TR height=1 bgcolor=black>
127					<td colspan=6></td>
128				</TR>
129				</TABLE>
130				</div>
131				<div  <% if RSM("Urgent")=0 then %>class="scrollNorm"<% elseif RSM("Urgent")=1 then  %>class="scrollUrg"<% elseif RSM("Urgent")=2 then  %>class="scrollSpec"<% elseif RSM("Urgent")=3 then  %>class="scrollOrderReady"<% end if %>">
132				
133				<TABLE cellpadding=0 cellspacing=0 width=100% border=0>
134				<TR>
135				</TR>
136				<% if RSM("Urgent")=2 then %>
137				<TR>
138					<TD align=center colspan=2> <FONT size=5 COLOR="<%=SelectedMenuColor%>">���� ����</FONT>
139					<hr noshade style="height:1"></TD>
140				</TR>
141				<% end if %>
142				<TR>
143					<TD align=left  valign=top width=45> <FONT COLOR="<%=SelectedMenuColor%>">�����: </FONT></TD>
144					<TD align=right valign=top width=125>&nbsp; <span dir=ltr><%=RSM("MsgDate")%></span></TD>
145				</TR>
146				<TR>
147					<TD align=left  valign=top width=45> <FONT COLOR="<%=SelectedMenuColor%>">����: </FONT></TD>
148					<TD align=right valign=top width=125>&nbsp; <%=RSM("MsgTime")%></TD>
149				</TR>
150				<% if NOT RSM("IsReply")=0 and not RSM("replyTo")=0 then %>
151				<TR>
152					<TD align=left class="" valign=top width=45> <FONT COLOR="<%=SelectedMenuColor%>">����:</FONT></TD>
153<% 
154					MySQL = "SELECT MsgBody FROM Messages WHERE  (id = "& RSM("replyTo") & ")"
155
156					set RSO = conn.Execute (MySQL)
157					if not RSO.eof then
158%>
159					<TD align=right valign=top width=125>
160					<TEXTAREA NAME="" ROWS="1" readonly COLS="25" style="font-family: tahoma; font-size: 7pt; border: none; background: transparent" title="<%=RSO("MsgBody")%>"><%=RSO("MsgBody")%></TEXTAREA>
161					</TD>
162				</TR>
163<% 
164					end if
165					RSO.close
166				end if 
167				if RSM("RelatedTable")<>"NaN" and RSM("RelatedID")<>"0"  then %>
168				<TR>
169					<TD align=left  valign=top width=45> <FONT COLOR="<%=SelectedMenuColor%>">����: </FONT> </TD>
170					<TD align=right valign=top width=125><%
171							RelatedTable = "NaN"
172							if trim(RSM("RelatedTable")) = "orders" then 
173								RelatedTable="����� ����� "
174								RelatedLink = "../order/TraceOrder.asp?act=show&order=" & RSM("RelatedID")
175							elseif trim(RSM("RelatedTable")) = "accounts" then 
176								RelatedTable="����� ���� "
177								RelatedLink = "../CRM/AccountInfo.asp?act=show&SelectedCustomer="& RSM("RelatedID")
178							elseif trim(RSM("RelatedTable")) = "invoices" then 
179								RelatedTable="������ ����� "
180								RelatedLink = "../AR/AccountReport.asp?act=showInvoice&invoice="  & RSM("RelatedID")
181							end if
182					%> <A HREF="<%=RelatedLink%>" target="_blank"><%=RelatedTable%> <%=RSM("RelatedID")%></A> </TD>
183				</TR>
184				<% end if %>
185				<TR height=3>
186					<TD align=right colspan=2> 
187					<hr noshade style="height:1">
188					</TD>
189				</TR>
190				<TR>
191					<TD align=right colspan=2> 
192					<%=replace(RSM("MsgBody"),chr(13),"<br>")%>
193					</TD>
194				</TR>
195				</TABLE>
196				</div>
197				</div>
198			</TD>
199<%
200			cnt = cnt + 1
201			if cnt mod 3 = 0 then
202				response.write "</tr><tr>"
203			end if
204			RSM.MoveNext
205		Loop
206		RSM.close
207%>
208		<td  valign=top>
209		</td>
210		</TR>
211		</TABLE>
212	</TD>
213	<TD valign=top>
214		<TABLE width=170 border=0 align=center cellpadding=0 cellspacing=6 >
215		<TR height=100% >
216			<TD width=170 valign=top height=100% style="border-right: 2pt dashed; border-top: 2pt dashed; border-color: white" >
217		<CENTER style="background-color:<%=captionFGColor%>">����� ������</CENTER>
218		<div class="ArchiveDiv">
219		<table  cellpadding=0 cellspacing=4 >
220		<%
221
222		'--------------------------------------------------------------------------------
223		'--------------------------------------------------------------------------------
224		'--------------------------------------------------------------------------------
225		'--------------------------------------------------------------------------------
226		MySQL = "SELECT * FROM Messages WHERE (MsgTo = "& session("id") & ") and  (IsRead = 0) and (IsSmall = 1) order by id DESC"
227		set RSM = conn.Execute (MySQL)
228		cnt2 = 0 
229		Do While Not (RSM.eof) 
230			set RSV=Conn.Execute ("SELECT RealName FROM Users where ID=" & RSM("MsgFrom")) 
231			%>
232			<tr  valign=top><TD valign=top bgcolor=<% if RSM("Urgent")=0 then %><%=MsgMainColor%><% elseif RSM("Urgent")=2 then %><%=VeryUrgentMsgBodyColor%><% elseif RSM("Urgent")=3 then %><%=OrderReadyMsgBodyColor%><% else %><%=UrgentMsgBodyColor%><% end if %> width=170 height=40 bgcolor=white style='border: solid 1pt black '>
233				<TABLE cellpadding=0 cellspacing=0 width=100%  title="<%=replace(RSM("MsgBody"),"""","`")%>" >
234				<TR height=5 bgcolor=<%=captionBGColor%>>
235					<A onclick="return confirm('��� ������ �� ������ ��� �� ��� ���Ͽ')" HREF="default.asp?act=close&id=<%=RSM("id")%>"><TD class="captionBut"> X</TD></A>
236					<A HREF="default.asp?act=mazimize&id=<%=RSM("id")%>"><TD class="captionBut">^</TD></A>
237					<TD align=right valign=top width=200> &nbsp;<%=RSV("RealName")%> </TD>
238					<TD align=left valign=top width=60><span dir=ltr><%=RSM("msgDate")%></span></TD>
239				</TR>
240				<TR height=1 bgcolor=black>
241					<td colspan=5></td>
242				</TR>
243				<TR >
244					<td colspan=5 ><INPUT readonly TYPE="text"   size=35 style="font-family:tahoma; font-size:10; background: transparent; border: solid 0pt	" value="<%=replace(left(RSM("MsgBody"),50),"""","`")%>"></td>
245				</TR>
246				</TABLE>
247			</TD></tr>
248			<%
249			cnt2 = cnt2 + 1
250			if cnt2 mod 4 = 0 then
251				'response.write "</table></td><td  valign=top><table  cellpadding=0 cellspacing=4>"
252				cnt = cnt + 1
253			if cnt mod 4 = 0 then
254				'response.write "</table></td></tr><tr><td  valign=top><table cellpadding=0 cellspacing=4>"
255			end if
256			end if
257			RSM.MoveNext
258		Loop
259
260		RSM.close
261		%>
262		</table>
263		</div>
264			</TD>
265
266		</td>
267		</TR>
268		</TABLE>
269	
270	</TD>
271</TR>
272</TABLE>
273<!--#include file="tah.asp" -->