PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/SQL/scripts/conn/dsn.asp

http://github.com/khaneh/Orders
ASP | 70 lines | 62 code | 6 blank | 2 comment | 1 complexity | c4683332cd0cefeda8c95c4c537844b4 MD5 | raw file
 1<!-- #INCLUDE FILE="../inc/mla_sql_include.asp" -->
 2<%
 3	Dim myStrTree, myConnStr
 4	myStrTree = getTreeStr("1_2", Array())
 5
 6	If Request.Form("mla_conn_submit") <> "" Then
 7		' saves connection info into a cookie
 8		If Request.Form("mla_conn_cookie") <> "" Then
 9			Response.Cookies("ConnStrDsn")("Dsn") = Request.Form("mla_conn_dsn")
10			Response.Cookies("ConnStrDsn")("User") = Request.Form("mla_conn_user")
11			Response.Cookies("ConnStrDsn")("Password") = Request.Form("mla_conn_password")
12			Response.Cookies("ConnStrDsn")("Level") = Request.Form("mla_user_level")
13			Response.Cookies("ConnStrDsn").Expires = #1/1/2020#
14		End If
15		' creates connection string
16		myConnStr = mla_getConnStr_dsn(Request.Form("mla_conn_dsn"), Request.Form("mla_conn_user"), Request.Form("mla_conn_password"))
17		Session("isConnected") = True
18		Session("ConnStr") = myConnStr
19		Response.Redirect "../hlp/connected.asp?refresh=1"
20		Response.End
21	End If
22%>
23
24<!-- #INCLUDE FILE="../inc/metaheader.asp" -->
25<BODY>
26<P CLASS="treeinfo"><% = myStrTree %></P>
27
28<FORM NAME="mla_conn" METHOD=POST ACTION="dsn.asp">
29	<TABLE BORDER=0 CELLPADDING=2 CELLSPACING=0 CLASS="hcontent" SUMMARY="Connection Form">
30		<TR><TD CLASS="caption" COLSPAN=4><IMG SRC="../../themes/<% = mla_cfg_theme %>/images/mylittletree/server.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALIGN="MIDDLE" ALT="Connection"> <% = myTObj.getTerm(2) %></TD></TR>
31		<TR>
32			<TD CLASS="formlabel"><% = myTObj.getTerm(4) %> :</TD>
33			<TD><INPUT TYPE="text" NAME="mla_conn_dsn" CLASS="alphanumeric" TITLE="<% = myTObj.getTerm(4) %>"></TD>
34			<TD COLSPAN=2>&nbsp;</TD>
35		</TR>
36		<TR>
37			<TD CLASS="formlabel"><% = myTObj.getTerm(106) %> :</TD>
38			<TD COLSPAN=3><INPUT TYPE="text" NAME="mla_conn_user" CLASS="alphanumeric" TITLE="<% = myTObj.getTerm(106) %>"></TD>
39		</TR>
40		<TR>
41			<TD CLASS="formlabel"><% = myTObj.getTerm(107) %> :</TD>
42			<TD COLSPAN=3><INPUT TYPE="password" NAME="mla_conn_password" CLASS="alphanumeric" TITLE="<% = myTObj.getTerm(107) %>"></TD>
43		</TR>
44		<TR><TD COLSPAN=4>&nbsp;</TD></TR>
45		<TR>
46			<TD COLSPAN=3 CLASS="formlabel"><% = myTObj.getTerm(108) %> :</TD><TD><INPUT TYPE="checkbox" NAME="mla_conn_cookie"></TD>
47		</TR>
48		<TR><TD COLSPAN=4>&nbsp;</TD></TR>
49		<TR>
50			<TD COLSPAN=4 ALIGN=CENTER>
51				<INPUT TYPE="reset" VALUE="<% = myTObj.getTerm(50) %>" NAME="mla_conn_reset"> &nbsp;
52				<INPUT TYPE="submit" VALUE="<% = myTObj.getTerm(109) %>" NAME="mla_conn_submit">
53			</TD>
54		</TR>
55	</TABLE>
56</FORM>
57
58<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
59<!--
60	document.mla_conn.mla_conn_dsn.value = "<% = remdquote(Request.Cookies("ConnStrDsn")("Dsn")) %>";
61	document.mla_conn.mla_conn_user.value = "<% = remdquote(Request.Cookies("ConnStrDsn")("User")) %>";
62	document.mla_conn.mla_conn_password.value = "<% = remdquote(Request.Cookies("ConnStrDsn")("Password")) %>";
63
64	if (window.parent.frames['Tree']) window.parent.frames['Tree'].oTree.expandNode('M1'); 
65//-->
66</SCRIPT>
67
68</BODY>
69</HTML>
70<!-- #INCLUDE FILE="../inc/mla_sql_end.asp" -->