PageRenderTime 51ms CodeModel.GetById 41ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

/beta/CRM/INCLUDE_CRM_PRIMDATA.ASP

http://github.com/khaneh/Orders
ASP | 246 lines | 239 code | 7 blank | 0 comment | 10 complexity | 613c54b1e4bd1ae09c5fdf77616fd3d9 MD5 | raw file
  1	  <Tr><Td colspan="2" height="10px">
  2<STYLE>
  3	.GetCustTbl {font-family:tahoma; background-color: #DDDDDD; width:630; direction: RTL; }
  4	.GetCustTbl td {padding:2; font-size: 9pt; height:25;}
  5	.GetCustInp { font-family:tahoma; font-size: 9pt;}
  6	.CusTableHeader {background-color: #33AACC; text-align: center; font-weight:bold;}
  7	.CustContactTable {font-family:tahoma; width:100%; border:1 solid black; direction: RTL; background-color:#CCCCCC;}
  8	.CustContactTable td {padding:5;}
  9	.CustTable {font-family:tahoma; width:80%; border:1 solid black; direction: RTL; background-color:black;}
 10	.CustTable td {padding:5;}
 11	.CustTable a {text-decoration:none;color:#000088}
 12	.CustTable a:hover {text-decoration:underline;}
 13	.CusTD1 {background-color: #CCCC66; text-align: left; font-weight:bold;}
 14	.CusTD2 {background-color: #DDDDDD; direction: LTR; text-align: right; font-size:9pt;}
 15	.CusTD3 {background-color: #DDDDDD; direction: LTR; text-align: center; font-size:9pt;}
 16	.CusTD4 {background-color: #CCCC66; direction: LTR; text-align: center; font-size:9pt;}
 17	.CusTD5 {background-color: yellow; direction: LTR; text-align: center; font-size:9pt;}
 18	.from {color: blue;}
 19	.to {color: red;}
 20</STYLE>
 21
 22
 23	  &nbsp;</Td></Tr>
 24	  <Tr>
 25		<Td colspan="2" valign="top" align="center">
 26				<% if Auth(1 , 3) then %><input class="GenButton" type="button" value="������" onclick="window.location='../CRM/AccountEdit.asp?act=editaccount&selectedCustomer=<%=cusID%>';"><% end if %>
 27				<input class="GenButton" type="button" value="����� �������"onclick="window.location = '../home/message.asp?sendTo=<%=RS1("CSR")%>&RelatedTable=accounts&RelatedID=<%=cusID%>&retURL=<%=Server.URLEncode("../CRM/AccountInfo.asp?act=show&selectedCustomer="&RS1("ID"))%>';">
 28				<BR><BR>
 29		</Td>
 30	  </Tr>
 31
 32	  <Tr><Td valign="top" align="left">
 33		<table class="CustTable3" cellspacing='1' cellspacing='1'>
 34<!-- 		<tr>
 35			<td class="CusTD1" width="80">����� ���� : </td>
 36			<td class="CusTD2"><span dir="RTL"><%=RS1("AccountTitle")%></span></td>
 37		</tr> -->
 38		<tr>
 39			<td class="CusTD1">����� ���� :</td>
 40			<td class="CusTD2"><%=RS1("ID")%></td>
 41		</tr>
 42<%		if not RS1("IsPersonal") then %>
 43			<tr>
 44				<td class="CusTD1">��� ���� : </td>
 45					<td class="CusTD2"><%=RS1("CompanyName")%></td>
 46			</tr>
 47<%		end if%>
 48		<tr>
 49			<td class="CusTD1">����� ����� : </td>
 50			<td class="CusTD2"><%=RS1("CreatedDate")%></td>
 51		</tr>
 52		<tr>
 53			<td class="CusTD1">����� ������ : </td>
 54			<td class="CusTD2"><%=RS1("CSRName")%></td>
 55		</tr>
 56		<tr>
 57			<td class="CusTD1">����� ���� : </td>
 58			<td class="CusTD2"><%=Separate(RS1("ARBalance"))%></td>
 59		</tr>
 60		<tr>
 61			<td class="CusTD1">����� ����: </td>
 62			<td class="CusTD2"><%=Separate(RS1("APBalance"))%></td>
 63		</tr>
 64		<%if Auth("B" , 0) then %>
 65		<tr>
 66			<td class="CusTD1">����� ����:</td>
 67			<td class="CusTD2"><%=Separate(RS1("AOBalance"))%></td>
 68		</tr>
 69		<%end if %>
 70		<tr>
 71			<td class="CusTD1">��� ������ : </td>
 72			<td class="CusTD2"><%=separate(RS1("CreditLimit"))%></td>
 73		</tr>
 74		<tr>
 75			<td class="CusTD1">��� ������(���) : </td>
 76			<td class="CusTD2"><%=separate(RS1("maxCreditDay"))%></td>
 77		</tr>
 78		<tr>
 79			<td class="CusTD1">��� ������(��) : </td>
 80			<td class="CusTD2"><%=separate(RS1("maxChequeAmount"))%></td>
 81		</tr>
 82		<tr>
 83		<td class="CusTD1">��� ������(��/���) : </td>
 84			<td class="CusTD2"><%=separate(RS1("maxChequeDay"))%></td>
 85		</tr>
 86		<tr>
 87			<td class="CusTD1"><%If CBool(RS1("IsPersonal")) Then response.write "����� ���:" Else response.write "����� ���:" End if%></td>
 88			<td class="CusTD2"><%=RS1("NorRCode")%></td>
 89		</tr>
 90		<tr>
 91			<td class="CusTD1">�� �������: </td>
 92			<td class="CusTD2"><%=RS1("EconomicalCode")%></td>
 93		</tr>
 94		<%
 95		dim typeColor(4)
 96		typeColor(1)="blue"
 97		typeColor(2)="fuchsia"
 98		typeColor(3)="red"
 99		typeColor(4)="lime"
100		set rs2= conn.Execute("select * from accountGroupRelations inner join AccountGroups on accountGroupRelations.AccountGroup=AccountGroups.id where account="&RS1("ID"))
101		if not rs2.eof then 
102
103		%>
104		<tr>
105			<td class="CusTD1"><%If CBool(rs2("isPartner")) Then response.write "�����" Else response.write "�����" End if%></td>
106			<td class="CusTD2"><%=rs2("Name")%></td>			
107		</tr>
108		<%
109		end if
110		rs2.close
111		set rs2=nothing
112		%>
113		</table>
114	  </Td>
115	  <Td valign="top" align="center">
116		<table class="CustTable3" cellspacing='1'>
117		<tr>
118			<td class="CusTD1" valign="top">���� ���� : 
119			
120			<BR><BR><BR><BR>
121			��� <INPUT TYPE="checkbox" NAME="postable1" disabled <% if RS1("postable1") then response.write "checked" %> >
122			</td>
123			<td style="background-color: <%=typeColor(cint(rs1("type")))%>;">
124				<TABLE class="CustContactTable">
125					<TR>
126						<TD><%=RS1("Dear1")%> - <%=RS1("FirstName1")%> - <%=RS1("LastName1")%></TD>
127						<TD width="140" style="border-right:1 solid black;">���� : <%=echoTels(RS1("Tel1"))%></TD>
128					</TR>
129					<TR>
130						<TD rowspan="2" valign="top">���� : <%=RS1("City1")%> - <%=RS1("Address1")%></TD>
131						<TD style="border-right:1 solid black;">���� : <%=echoTels(RS1("Fax1"))%></TD>
132					</TR>
133					<TR>
134						<TD style="border-right:1 solid black;">����� : 
135							<span><%=RS1("Email1")%></span>
136							<%if RS1("email1")<>"" then %>
137							<span title="�� ���� ��� ��� ���� �� ���� ������ �� ����� �� ����� ����� ����� �� �� ���� ����� ����� �� ����� ���">
138								<form method="post" action="http://my.pdhco.com/sendMail.php">
139									<input type="hidden" name="id" value="<%=RS1("ID")%>">
140									<input type="hidden" name="Email" value="<%=RS1("Email1")%>">
141									<input type="hidden" name="AccountTitle" value="<%=RS1("AccountTitle")%>">
142									<input type="hidden" name="Dear" value="<%=RS1("Dear1")%>">
143									<input type="hidden" name="FirstName" value="<%=RS1("FirstName1")%>">
144									<input type="hidden" name="LastName" value="<%=RS1("LastName1")%>">
145									<input type="submit" name="jameSend" value="����� ����� ����� ���">
146								</form>
147							</span>
148							<%end if%>
149						</TD>
150					</TR>
151					<TR>
152						<TD>��: <%=RS1("PostCode1")%></TD>
153						<TD style="border-right:1 solid black;">������: <span  Dir="LTR"><%=echoTels(RS1("Mobile1"))%></span></TD>
154					</TR>
155				</TABLE>
156			</td>
157		</tr>
158		<tr>
159			<td class="CusTD1" valign="top">���� ��� : 
160			
161			<BR><BR><BR><BR>
162			��� <INPUT TYPE="checkbox" NAME="postable2" disabled <% if RS1("postable2") then response.write "checked" %> >
163			
164			</td>
165			<td style="background-color: <%=typeColor(cint(rs1("type")))%>;">
166				<TABLE class="CustContactTable">
167					<TR>
168						<TD><%=RS1("Dear2")%> - <%=RS1("FirstName2")%> - <%=RS1("LastName2")%></TD>
169						<TD width="140">���� : <%=echoTels(RS1("Tel2"))%></TD>
170					</TR>
171					<TR>
172						<TD rowspan="2" valign="top">���� : <%=RS1("City2")%> - <%=RS1("Address2")%></TD>
173						<TD>���� : <%=echoTels(RS1("Fax2"))%></TD>
174					</TR>
175					<TR>
176						<TD>����� : 
177							<span><%=RS1("Email2")%></span>
178							<%if RS1("email2")<>"" then %>
179							<span title="�� ���� ��� ��� ���� �� ���� ������ �� ����� �� ����� ����� ����� �� �� ���� ����� ����� �� ����� ���">
180								<form method="post" action="http://my.pdhco.com/sendMail.php">
181									<input type="hidden" name="id" value="<%=RS1("ID")%>">
182									<input type="hidden" name="Email" value="<%=RS1("Email2")%>">
183									<input type="hidden" name="AccountTitle" value="<%=RS1("AccountTitle")%>">
184									<input type="hidden" name="Dear" value="<%=RS1("Dear2")%>">
185									<input type="hidden" name="FirstName" value="<%=RS1("FirstName2")%>">
186									<input type="hidden" name="LastName" value="<%=RS1("LastName2")%>">
187									<input type="submit" name="jameSend" value="����� ����� ����� ���">
188								</form>
189							</span>
190							<%end if%>
191						</TD>
192					</TR>
193					<TR>
194						<TD>��: <%=RS1("PostCode2")%></TD>
195						<TD>������: <span  Dir="LTR"><%=RS1("Mobile2")%></span></TD>
196					</TR>
197				</TABLE>
198			</td>
199		</tr>
200		</table>
201	  </Td></Tr>
202	  <Tr>
203	  	<Td colspan="2"><BR><BR>
204			<div id="orderMessages"></div>
205			<input id="customerID" type="hidden" value="<%=RS1("ID")%>"/>
206			<script type="text/javascript">
207				$(document).ready(function(){
208					TransformXmlURL("/service/xml_getMessage.asp?act=related&table=accounts&id=" + $("#customerID").val(),"/xsl.<%=version%>/showRelatedMessage.xsl", function(result){
209						$("#orderMessages").html(result);
210						$("td.msgBody").each(function(i){
211							$(this).html($(this).html().replace(/\n/gi,"<br/>"));
212							});
213							$("input[name=addNewMessage]").click(function(){
214								document.location="../home/message.asp?RelatedTable=accounts&RelatedID=" + $("#customerID").val() + "&retURL=" + escape("../CRM/AccountInfo.asp?act=show&selectedCustomer=" + $("#customerID").val());
215						});
216					});
217				});
218			</script>	  	
219<BR><BR>
220			<%
221			mySQL="SELECT AccountsEditLog.EditOn, AccountsEditLog.AutoKey, Users.RealName FROM AccountsEditLog INNER JOIN Users ON AccountsEditLog.EditBy = Users.ID where AccountsEditLog.id=" & cusID & " ORDER BY AccountsEditLog.AutoKey"
222			Set RS1 = conn.execute(mySQL)
223			if not RS1.eof then
224			%>
225			<table class="CustTable" cellspacing='1'>
226				<tr>
227					<td colspan="2" class="CusTableHeader">����΍� ������  ������� ��� ����</td>
228				</tr>
229				<%
230				tmpCounter=0
231				while not RS1.eof 
232					tmpCounter=tmpCounter+1
233				%>
234					<tr class="<%if (tmpCounter MOD 2) = 1 then response.write "CusTD3" else response.write "CusTD4" %>">
235						<td dir=ltr><%=RS1("EditOn")%></td>
236						<td dir=rtl>
237						<span style="cursor:hand" onclick="window.open('AccountsEditLogViewer.asp?AutoKey=<%=RS1("AutoKey")%>','AccLog','menubar=no, width=500')">���� <%=RS1("RealName")%></span>
238						</td>
239					</tr>
240				<%
241					RS1.moveNext
242				wend
243				%>
244			</table><BR><BR>
245			<% end if %>
246	  </Td></Tr>