PageRenderTime 22ms CodeModel.GetById 17ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

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