PageRenderTime 22ms CodeModel.GetById 11ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/beta/admin/top.asp

http://github.com/khaneh/Orders
ASP | 218 lines | 186 code | 21 blank | 11 comment | 19 complexity | 0d627ea51ea7a2840f95541bf5d69456 MD5 | raw file
  1<%
  2'menuItem = request ("menuItem")
  3
  4'Response.CacheControl="no-cache"
  5Response.AddHeader "pragma", "no-cache"
  6Response.Expires= -1
  7
  8if (session("AID")="") then
  9'	session.abandon
 10	response.redirect "login.asp?err=���� ���� ��� ���� ���� ���� ����� ����"
 11end if
 12'conStr="DRIVER={SQL Server};SERVER=(local);DATABASE=sefareshat;UID=sefadmin; PWD=5tgb;"
 13conStr = "Provider=SQLNCLI10.1;Persist Security Info=False;User ID=sefadmin;Initial Catalog=jame;Data Source=.\sqlexpress;PWD=5tgb;"
 14
 15Set conn = Server.CreateObject("ADODB.Connection")
 16conn.ConnectionTimeout = 6000
 17conn.open conStr
 18
 19AppBgColor = "#BBBBBB"  'Bala:"#99AACC"
 20AppFgColor =  "#C3DBEB" '"#DEEBD9"
 21SelectedMenuColor = "#0E5499"
 22UnSelectedMenuColor = "#309261"
 23SelectedSubMenuColor = "#DEEBD9" '"#C3DBEB" 
 24UnSelectedSubMenuColor = "#0E5499" ' "#609250"
 25TabWidth=66
 26ImgTabSelected="/images/tab-1.gif"
 27ImgTabNotSelected="/images/tab-2.gif"
 28
 29const CONST_MSG_NONE	= -1
 30const CONST_MSG_INFORM	= 0
 31const CONST_MSG_ALERT	= 1
 32const CONST_MSG_ERROR	= 2
 33
 34'---------------------------------------------
 35'-------------------------- SHOW ALERT MESSAGE
 36'---------------------------------------------
 37sub showAlert( alertMsg , msgStatus )
 38	select case msgStatus
 39	case -1:
 40		response.write "<TABLE width=45% align='center' bgcolor=ffffff style='border: dashed 1px Black'>"
 41	case 0:
 42		response.write "<TABLE width=45% align='center' bgcolor=ffffff style='border: dashed 1px Blue'>"
 43	case 1:
 44		response.write "<TABLE width=45% align='center' bgcolor=ffffdd style='border: dashed 1px Red'>"
 45	case 2:
 46		response.write "<TABLE width=45% align='center' bgcolor=ffeeee style='border: dashed 1px Red'>"
 47	case else:
 48		response.write "<TABLE width=45% align='center' bgcolor=ffffff style='border: dashed 1px Black'>"
 49	end select
 50	response.write "<TR>"
 51	response.write "<td align=center width='10%'>"
 52	response.write "<IMG SRC='../images/alertIcon"& trim(msgStatus) & ".gif' >"
 53	response.write "</td>"
 54	response.write "<TD align=center><BR>"
 55	response.write alertMsg
 56	response.write "<BR><BR></TD>"
 57	response.write "</TR>"
 58	response.write "</TABLE>"
 59end sub
 60function sqlSafe (inpStr)
 61  tmpStr=inpStr
 62  tmpStr=replace(tmpStr,"'","`")
 63  tmpStr=replace(tmpStr,"""","`")
 64  sqlsafe=tmpStr
 65end function
 66'---------------------------------------------
 67'---------------------------- Check GL Routine
 68'---------------------------------------------
 69dim OpenGL
 70
 71if Session("OpenGL")="" then
 72	response.write "���! ��� ���� ���� ����."
 73	response.end
 74
 75else
 76	OpenGL = Session("OpenGL")
 77	OpenGLName = Session("OpenGLName")
 78	FiscalYear = Session("FiscalYear")
 79end if
 80'Session.Timeout = 300
 81%>
 82<HTML>
 83<HEAD>
 84<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
 85<meta http-equiv="Content-Language" content="fa">
 86<TITLE> <%=PageTitle%> </TITLE>
 87<style>
 88	body { font-family: tahoma; font-size: 8pt;}
 89	Input { font-family: tahoma; font-size: 9pt;}
 90	td { font-family: tahoma; font-size: 8pt;}
 91	.tt { font-family: tahoma; font-size: 8pt; color:yellow;}
 92	.tt2 { font-family: tahoma; font-size: 8pt; color:yellow;}
 93	.inputBut { font-family: tahoma; font-size: 8pt; richness: 10}
 94	.t7pt { font-size: 8pt;}
 95	.t8pt { font-size: 10pt;}
 96	.alak a { color: #cccccc; text-decoration: none;  font-size: 8pt;}
 97	.alak2 a { color: black; text-decoration: none;  font-size: 8pt; }
 98	.GenButton { font-family:tahoma; font-size: 9pt; border: 1px solid black; }
 99</style>
100</HEAD>
101<%
102
103CSRName = session("CSRName")
104
105%>
106<BODY bgcolor=<%=AppBgColor%>  topmargin=0 leftmargin=0><!<% if onunload<>"" then %> onunload="<%=onunload%>"<% end if %> >
107<BR>
108<TABLE cellspacing=0 cellpadding=0 width=760 border=0 dir=rtl align=center>
109<TR >
110	<TD>
111	<TABLE cellspacing=0 cellpadding=0>
112	<TR height=30 class="alak">
113	<%if SubmenuItem=0 then %> 
114		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabSelected%>'>������� ���</TD>
115	<%else %>  
116		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabNotSelected%>' ><A HREF='default.asp'>������� ���</A></TD>
117	<%end if %>
118
119	<%if SubmenuItem=1 then %> 
120		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabSelected%>'><A HREF='userManager.asp' style="color:yellow;">������ <BR>�������</A></TD>
121	<%else %>  
122		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabNotSelected%>' ><A HREF='userManager.asp'>������ <BR>�������</A></TD>
123	<%end if %>
124		<!--
125	<%if SubmenuItem=2 then %> 
126		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabSelected%>'>������� <br>��� ���</TD>
127	<%else %>  
128		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabNotSelected%>' ><A HREF='#'>������� <br>��� ���</A></TD>
129	<%end if %>
130
131	<%if SubmenuItem=3 then %> 
132		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabSelected%>'>����� <BR>�����</TD>
133	<%else %>  
134		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabNotSelected%>' ><A HREF='#'>����� <BR>�����</A></TD>
135	<%end if %>
136
137	<%if SubmenuItem=4 then %> 
138		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabSelected%>'>����� �����</TD>
139	<%else %>  
140		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabNotSelected%>' ><A style='font-size:8pt;' HREF='#'>����� �����</A></TD>
141	<%end if %>
142	-->
143	<%if SubmenuItem=5 then %> 
144		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabSelected%>'>��� �����</TD>
145	<%else %>  
146		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabNotSelected%>' ><A style='font-size:8pt;' HREF='sysLock.asp'>��� �����</A></TD>
147	<%end if %>
148
149	<%if SubmenuItem=6 then %> 
150		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabSelected%>'>���� ��� ����</TD>
151	<%else %>  
152		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabNotSelected%>' ><A style='font-size:8pt;' HREF='InvItemMng.asp'>���� ��� ����</A></TD>
153	<%end if %>
154
155	<%if SubmenuItem=7 then %> 
156		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabSelected%>'>������ �������</TD>
157	<%else %>  
158		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabNotSelected%>' ><A style='font-size:8pt;' HREF='BankerMng.asp'>������ �������</A></TD>
159	<%end if %>
160
161	<%if SubmenuItem=8 then %> 
162		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabSelected%>'>����� ��� ���</TD>
163	<%else %>  
164		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabNotSelected%>' ><A style='font-size:8pt;' HREF='Reports.asp'>����� ��� ���</A></TD>
165	<%end if %>
166
167	<%if SubmenuItem=9 then %> 
168		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabSelected%>'>������ ���� ��</TD>
169	<%else %>  
170		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabNotSelected%>' ><A style='font-size:8pt;' HREF='AccountInfo.asp'>������ ���� ��</A></TD>
171	<%end if %>
172
173	<%if SubmenuItem=10 then %> 
174		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabSelected%>'>���ϐ� �� �����</TD>
175	<%else %>  
176		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabNotSelected%>' ><A style='font-size:8pt;' HREF='errorHandler.asp'>���ϐ� �� �����</A></TD>
177	<%end if %>
178	<%if SubmenuItem=11 then %> 
179		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabSelected%>'>����� �����</TD>
180	<%else %>  
181		<TD class=tt2 width="<%=TabWidth%>" align=center background='<%=ImgTabNotSelected%>' ><A style='font-size:8pt;' HREF='costs.asp'>����� �����</A></TD>
182	<%end if %>
183
184	</TR>
185	</TABLE>
186	</TD>
187</TR>
188<TR BGCOLOR="<%=SelectedMenuColor%>">
189	<TD height=20 align=left  class=alak>
190<%
191set tmpRS=Conn.Execute ("SELECT Users.RealName FROM Messages INNER JOIN Users ON Messages.MsgFrom = Users.ID WHERE     (Messages.MsgTo = "& session("AID") & ") AND (Messages.Urgent = 2) AND (Messages.IsSmall = 0) AND (Messages.IsRead = 0)")	
192if not tmpRS.EOF then%>
193	<span style='font-size:12pt;font-weight:bold;align:center;color:yellow;'><marquee dir=rtl width=100%>������ ! ��� �� ���� ���� ���� �� <%=tmpRS("RealName")%> �����! </marquee></span>
194<%else%>
195	&nbsp;
196<%end if%>
197
198<A HREF="logout.asp">���� </A>&nbsp;&nbsp;&nbsp;
199</TD>
200</TR>
201<TR >
202	<TD >
203<TABLE cellspacing=0 cellpadding=0 width=100% height=450 style='border:4px solid <%=SelectedMenuColor%>;' dir=rtl align=center>
204<TR>
205	<TD colspan=2 valign=top bgcolor=<%=AppFgColor%>>
206	<%
207	if request.queryString("errmsg")<>"" then
208		response.write "<br>" 
209		call showAlert (request.queryString("errmsg"),CONST_MSG_ERROR) 
210		response.write "<br>" 
211	end if
212	if request.queryString("msg")<>"" then
213		response.write "<br>" 
214		call showAlert (request.queryString("msg"),CONST_MSG_INFORM) 
215		response.write "<br>" 
216	end if
217	%>
218