/beta/AR/dialog_FindInvItem.asp

http://github.com/khaneh/Orders · ASP · 104 lines · 91 code · 9 blank · 4 comment · 8 complexity · 43b8c65b6621c77d632ab2162f3233d3 MD5 · raw file

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="1256"%><%
  2. Response.CacheControl="no-cache"
  3. Response.AddHeader "pragma", "no-cache"
  4. Server.ScriptTimeout = 600
  5. Response.Expires= -1
  6. if (session("ID")="") then
  7. session.abandon
  8. response.redirect "../login.asp?err= "
  9. end if
  10. 'conStr="DRIVER={SQL Server};SERVER=(local);DATABASE=sefareshat;UID=sefadmin; PWD=5tgb;"
  11. 'conStr = "Provider=SQLNCLI10.1;Persist Security Info=False;User ID=sefadmin;Initial Catalog=jame;Data Source=.\sqlexpress;PWD=5tgb;"
  12. 'Set conn = Server.CreateObject("ADODB.Connection")
  13. 'conn.open conStr
  14. %>
  15. <!--#include File="../config.asp"-->
  16. <HTML>
  17. <HEAD>
  18. <meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
  19. <meta http-equiv="Content-Language" content="fa">
  20. <style>
  21. Table { font-size: 9pt;}
  22. Input { font-family:tahoma; font-size: 9pt;}
  23. </style>
  24. <TITLE> </TITLE>
  25. <script language="JavaScript">
  26. <!--
  27. var Arguments = new Array(2)
  28. function documentKeyDown() {
  29. var theKey = event.keyCode;
  30. if (theKey == 27) {
  31. window.close();
  32. }
  33. else if (theKey == 13) {
  34. if (document.getElementById('dlgSearchBox').value != ""){
  35. window.dialogArguments.value=document.getElementById('dlgSearchBox').value;
  36. window.close();
  37. }
  38. }
  39. }
  40. document.onkeydown = documentKeyDown;
  41. function onMyLoad(){
  42. document.getElementById('dlgDispTxt').innerText=window.dialogArguments.value
  43. window.dialogArguments.value=""
  44. document.getElementById('dlgSearchBox').focus();
  45. document.getElementById('dlgSearchBox').select();
  46. }
  47. //-->
  48. </script>
  49. <style>
  50. .myDiv {float:left;padding-left: 5px;}
  51. </style>
  52. </HEAD>
  53. <BODY leftmargin=0 topmargin=0 bgcolor='#DDDDFF' onload="onMyLoad()">
  54. <font face="tahoma">
  55. <TABLE border="0" width="100%" height="100%" cellspacing="0" cellpadding="0">
  56. <TR><TD valign="middle">
  57. <table border="2" cellspacing="0" cellpadding="10" align="center" valign="middle" dir="RTL" bordercolor='#224488' bgcolor='#C3C3FF'>
  58. <tr><td><TABLE>
  59. <TR>
  60. <TD Height='30'><b><span id='dlgDispTxt'> </span><b></TD>
  61. </TR>
  62. <TR>
  63. <TD><input type="text" id="dlgSearchBox" style="font-family:tahoma;font-size:9pt;width:100%;" value=""></TD>
  64. </TR>
  65. </TABLE>
  66. <!--- Iz inja By Alix - 82-07-16 -->
  67. <%
  68. mySQL="select * from InvoiceItemCategories where ID in (select distinct InvoiceItemCategoryRelations.InvoiceItemCategory from InvoiceItemCategoryRelations inner join InvoiceItems on InvoiceItemCategoryRelations.InvoiceItem=invoiceItems.ID where InvoiceItems.Enabled=1)"
  69. set rs=Conn.Execute(mySQL)
  70. while not rs.eof
  71. %>
  72. <span style="direction:rtl;"><a onclick="setSearchString('<%=rs("id")%>')"><%="[" & rs("Name") & "]"%></a></span>
  73. <%
  74. rs.moveNext
  75. wend
  76. %>
  77. <SCRIPT LANGUAGE="JavaScript">
  78. <!--
  79. function setSearchString(st)
  80. {
  81. document.getElementById('dlgSearchBox').value = st;
  82. window.dialogArguments.value= st;
  83. window.close();
  84. }
  85. //-->
  86. </SCRIPT>
  87. <!----- Ta inja -------------------->
  88. </td></tr>
  89. </table>
  90. </TD></TR>
  91. </TABLE>
  92. </font>
  93. </SCRIPT>
  94. </BODY>
  95. </HTML>