/beta/Inquiry/dialog_inquiryItems.asp
ASP | 106 lines | 100 code | 6 blank | 0 comment | 9 complexity | 4de4866b2b5d131c2fe5443b7a3295f5 MD5 | raw file
1<%@LANGUAGE="VBSCRIPT" CODEPAGE="1256"%> 2<!--#include file="../config.asp" --> 3<HTML> 4<HEAD> 5<meta http-equiv="Content-Type" content="text/html; charset=windows-1256"> 6<meta http-equiv="Content-Language" content="fa"> 7<style> 8 Table { font-size: 9pt;} 9 Input { font-family:tahoma; font-size: 9pt;} 10</style> 11<TITLE>���� �� � �����</TITLE> 12</HEAD> 13 14<BODY> 15<font face="tahoma"> 16<% 17 name=request("name")&"" 18 mySQL="SELECT * From InvoiceItems WHERE ((REPLACE([Name], ' ', '') LIKE REPLACE(N'%"& sqlSafe(name) & "%', ' ', ''))) AND (Enabled=1) ORDER BY [id]" 19 Set RS1 = conn.Execute(mySQL) 20 21 if (RS1.eof) then %> 22 <br><br><br><hr> 23 <table align='center'> 24 <tr><td bgcolor='#FFCCCC' dir='rtl' align='center'> ����� �� ��� ������ ���� ���</td> 25 </tr> 26 </table> 27 <hr> 28<% else 29%> 30 <TABLE ID="InvoiceItems" border="1" width="100%" cellspacing="1" cellpadding="5" dir="RTL"> 31 <tr bgcolor='#C3C3FF'> 32 <td align='center' width="5%"> <input type="radio" disabled> </td> 33 <td align='center' width="15%"> �� ���� </td> 34 <td align='center'> ����� </td> 35 <td align='center'>-</td> 36 <td align='center'>��</td> 37 <td align='center'>������</td> 38 </tr> 39<% tempCounter=0 40 while Not (RS1.EOF) 41 tempCounter=tempCounter+1 42 if (tempCounter Mod 2 = 1)then 43 tempColor="#FFFFFF" 44 else 45 tempColor="#DDDDEE" 46 end if 47%> <tr bgcolor='<%=tempColor%>'> 48 <td align='center'><input type="radio" name="selectedItem" value="<%=RS1("ID")%>" onclick="selectItem(this)"> </td> 49 <td dir='ltr'><%=RS1("ID") %> </td> 50 <td><%=RS1("Name")%> </td> 51 <td><%=RS1("type")%></td> 52 <td><%=RS1("fee")%></td> 53 <td><%if RS1("hasVat") then response.write "����" else response.write "�����"%></td> 54 </tr> 55<% RS1.movenext 56 wend 57%> 58 <tr bgcolor='#C3C3FF'> 59 <td align='center' colspan="3"><input type="submit" style="font-family:Tahoma" value="������" onclick="selectAndClose();"> </td> 60 </tr> 61 </TABLE> 62 <BR> 63 <HR> 64 <BR> 65<% end if 66conn.Close 67%> 68</font> 69</BODY> 70</HTML> 71<script language="JavaScript"> 72<!-- 73var Arguments = new Array(4) 74 75function selectItem(src){ 76 rowNo=src.parentNode.parentNode.rowIndex; 77// thePrice=document.getElementsByName("selectedItem")[rowNo-1].value 78 myRow=document.getElementById("InvoiceItems").getElementsByTagName("tr")[rowNo]; 79 Arguments[0]=myRow.getElementsByTagName("td")[1].innerText;// ID 80 Arguments[1]=myRow.getElementsByTagName("td")[2].innerText;// Name 81 Arguments[2]=myRow.getElementsByTagName("td")[3].innerText;// type 82 Arguments[3]=myRow.getElementsByTagName("td")[4].innerText;// fee 83 Arguments[4]=myRow.getElementsByTagName("td")[5].innerText;// hasVat 84} 85function selectAndClose(){ 86myString=Arguments.join("#"); 87window.dialogArguments.value=myString 88window.close(); 89} 90 91function documentKeyDown() { 92 var theKey = event.keyCode; 93 if (theKey == 27) { 94 window.close(); 95 } 96} 97 98document.onkeydown = documentKeyDown; 99 100radio1=document.getElementsByName("selectedItem")[0]; 101if (radio1){ 102 radio1.checked=true; 103 selectItem(radio1); 104} 105//--> 106</script>