PageRenderTime 21ms CodeModel.GetById 10ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/SQL/scripts/pref/display.asp

http://github.com/khaneh/Orders
ASP | 163 lines | 154 code | 9 blank | 0 comment | 10 complexity | bcbbbccb28ad8a5d22400852a80d9409 MD5 | raw file
  1<!-- #INCLUDE FILE="../inc/mla_sql_include.asp" -->
  2<%
  3	Dim myStrTree, myArrDay, i
  4
  5	If Request.Form("mla_cfg_cancel") <> "" Then
  6		Response.Redirect "default.asp"
  7		Response.End
  8	End If
  9
 10	If Request.Form("mla_cfg_submit") <> "" Then
 11		Response.Cookies("Option")("ShowSysDatabase") = (Request.Form("mla_cfg_showsysdatabases") <> "")
 12		Response.Cookies("Option")("ShowSysTable") = (Request.Form("mla_cfg_showsystables") <> "")
 13		Response.Cookies("Option")("ShowSysView") = (Request.Form("mla_cfg_showsysviews") <> "")
 14		Response.Cookies("Option")("ShowSysProcedure") = (Request.Form("mla_cfg_showsysprocedures") <> "")
 15		Response.Cookies("Option")("ShowSysFunction") = (Request.Form("mla_cfg_showsysfunctions") <> "")
 16		Response.Cookies("Option")("PageSize") = Request.Form("mla_cfg_pagesize") 
 17		Response.Cookies("Option")("MaxDisplayedChar") = Request.Form("mla_cfg_maxdisplayedchar") 
 18		Response.Cookies("Option")("MaxDisplayedBin") = Request.Form("mla_cfg_maxdisplayedbin") 
 19		Response.Cookies("Option")("RowDelimiter") = Request.Form("mla_cfg_rowdelimiter") 
 20		Response.Cookies("Option")("FirstDayOfWeek") = Request.Form("mla_cfg_firstdayofweek") 
 21		Response.Cookies("Option").Expires = #1/1/2020#
 22		Response.Redirect "default.asp?refresh=1"
 23		Response.End
 24	End If
 25
 26	myStrTree = getTreeStr("3_3", Array())
 27
 28	myArrDay = Split(myTObj.getTerm(443), ",", -1, 1)
 29
 30%>
 31
 32<!-- #INCLUDE FILE="../inc/metaheader.asp" -->
 33<BODY>
 34	<P CLASS="treeinfo"><% = myStrTree %></P>
 35
 36	<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
 37	<!--
 38	function checkForm(pForm) {
 39		if (document.nocheck) return (true);
 40		if (isEmpty(pForm.mla_cfg_pagesize)) {
 41			pForm.mla_cfg_pagesize.focus();
 42			return (false);
 43		}
 44		if (!isInteger(pForm.mla_cfg_pagesize)) {
 45			pForm.mla_cfg_pagesize.focus();
 46			return (false);
 47		}
 48		if (isEmpty(pForm.mla_cfg_maxdisplayedchar)) {
 49			pForm.mla_cfg_maxdisplayedchar.focus();
 50			return (false);
 51		}
 52		if (isEmpty(pForm.mla_cfg_maxdisplayedbin)) {
 53			pForm.mla_cfg_maxdisplayedbin.focus();
 54			return (false);
 55		}
 56		if (isEmpty(pForm.mla_cfg_rowdelimiter)) {
 57			pForm.mla_cfg_rowdelimiter.focus();
 58			return (false);
 59		}
 60		if (isEmpty(pForm.mla_cfg_firstdayofweek)) {
 61			pForm.mla_cfg_firstdayofweek.focus();
 62			return (false);
 63		}
 64		if (!isInteger(pForm.mla_cfg_maxdisplayedchar)) {
 65			pForm.mla_cfg_maxdisplayedchar.focus();
 66			return (false);
 67		}
 68		if (!isInteger(pForm.mla_cfg_maxdisplayedbin)) {
 69			pForm.mla_cfg_maxdisplayedbin.focus();
 70			return (false);
 71		}
 72		if (!isInteger(pForm.mla_cfg_firstdayofweek)) {
 73			pForm.mla_cfg_firstdayofweek.focus();
 74			return (false);
 75		}
 76		return (true);
 77	}
 78	//-->
 79	</SCRIPT>
 80
 81	<FORM NAME="mla_cfg" METHOD=POST ACTION="display.asp" onSubmit = "return (checkForm(this));">
 82		<TABLE BORDER=0 CELLPADDING=2 CELLSPACING=0 CLASS="hcontent" SUMMARY="Option Form">
 83			<TR><TD CLASS="caption" COLSPAN=2><% = myTObj.getTerm(22) & " \ " &  myTObj.getTerm(25) %></TD></TR>
 84			<TR>
 85				<TD CLASS="formlabel"><% = myTObj.getTerm(480) %> :</TD>
 86				<TD>&nbsp;</TD>
 87			</TR>
 88			<TR>
 89				<TD>&nbsp;</TD>			
 90				<TD><INPUT TYPE="checkbox" NAME="mla_cfg_showsysdatabases" ID="mla_cfg_showsysdatabases"> <LABEL FOR="mla_cfg_showsysdatabases"><% = myTObj.getTerm(481) %></LABEL></TD>
 91			</TR>
 92			<TR>
 93				<TD>&nbsp;</TD>			
 94				<TD><INPUT TYPE="checkbox" NAME="mla_cfg_showsystables" ID="mla_cfg_showsystables"> <LABEL FOR="mla_cfg_showsystables"><% = myTObj.getTerm(482) %></LABEL></TD>
 95			</TR>
 96			<TR>
 97				<TD>&nbsp;</TD>			
 98				<TD><INPUT TYPE="checkbox" NAME="mla_cfg_showsysviews" ID="mla_cfg_showsysviews"> <LABEL FOR="mla_cfg_showsysviews"><% = myTObj.getTerm(483) %></LABEL></TD>
 99			</TR>
100			<TR>
101				<TD>&nbsp;</TD>			
102				<TD><INPUT TYPE="checkbox" NAME="mla_cfg_showsysprocedures" ID="mla_cfg_showsysprocedures"> <LABEL FOR="mla_cfg_showsysprocedures"><% = myTObj.getTerm(484) %></LABEL></TD>
103			</TR>
104			<TR>
105				<TD>&nbsp;</TD>			
106				<TD><INPUT TYPE="checkbox" NAME="mla_cfg_showsysfunctions" ID="mla_cfg_showsysfunctions"> <LABEL FOR="mla_cfg_showsysfunctions"><% = myTObj.getTerm(485) %></LABEL></TD>
107			</TR>
108			<TR><TD COLSPAN=2>&nbsp;</TD></TR>
109			<TR>
110				<TD CLASS="formlabel"><% = myTObj.getTerm(486) %> :</TD>
111				<TD><INPUT TYPE="text" NAME="mla_cfg_pagesize" CLASS="numeric" TITLE=""></TD>
112			</TR>
113			<TR>
114				<TD CLASS="formlabel"><% = myTObj.getTerm(487) %> :</TD>
115				<TD><INPUT TYPE="text" NAME="mla_cfg_maxdisplayedchar" CLASS="numeric" TITLE=""></TD>
116			</TR>
117			<TR>
118				<TD CLASS="formlabel"><% = myTObj.getTerm(488) %> :</TD>
119				<TD><INPUT TYPE="text" NAME="mla_cfg_maxdisplayedbin" CLASS="numeric" TITLE=""></TD>
120			</TR>
121			<TR>
122				<TD CLASS="formlabel"><% = myTObj.getTerm(489) %> :</TD>
123				<TD><INPUT TYPE="text" NAME="mla_cfg_rowdelimiter" CLASS="numeric" TITLE=""></TD>
124			</TR>
125			<TR>
126				<TD CLASS="formlabel"><% = myTObj.getTerm(490) %> :</TD>
127				<TD>
128					<SELECT NAME="mla_cfg_firstdayofweek" CLASS="alphanumeric">
129					<%
130						For i = 0 To 6
131							Response.Write "<OPTION VALUE=" & (i+1) & ">" & myArrDay(i) & "</OPTION>" & vbCrLf
132						Next
133					%>
134					</SELECT>
135				</TD>
136			</TR>
137			<TR><TD COLSPAN=2>&nbsp;</TD></TR>
138			<TR>
139				<TD COLSPAN=2 ALIGN=CENTER>
140					<INPUT TYPE="submit" VALUE="<% = myTObj.getTerm(51) %>" NAME="mla_cfg_cancel" onClick="document.nocheck = true;"> &nbsp;
141					<INPUT TYPE="submit" VALUE="<% = myTObj.getTerm(54) %>" NAME="mla_cfg_submit">
142				</TD>
143			</TR>
144		</TABLE>
145	</FORM>
146	<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
147	<!--
148		document.mla_cfg.mla_cfg_showsysdatabases.checked = <% = CInt(mla_cfg_showsysdatabases) %>;
149		document.mla_cfg.mla_cfg_showsystables.checked = <% = CInt(mla_cfg_showsystables) %>;
150		document.mla_cfg.mla_cfg_showsysviews.checked = <% = CInt(mla_cfg_showsysviews) %>;
151		document.mla_cfg.mla_cfg_showsysprocedures.checked = <% = CInt(mla_cfg_showsysprocedures) %>;
152		document.mla_cfg.mla_cfg_showsysfunctions.checked = <% = CInt(mla_cfg_showsysfunctions) %>;
153		document.mla_cfg.mla_cfg_pagesize.value = "<% = mla_cfg_pagesize %>";
154		document.mla_cfg.mla_cfg_maxdisplayedchar.value = "<% = mla_cfg_maxdisplayedchar %>";
155		document.mla_cfg.mla_cfg_maxdisplayedbin.value = "<% = mla_cfg_maxdisplayedbin %>";
156		document.mla_cfg.mla_cfg_rowdelimiter.value = "<% = mla_cfg_rowdelimiter %>";
157		setSelectValue(document.mla_cfg.mla_cfg_firstdayofweek, "<% = mla_cfg_firstdayofweek %>", 1)
158	//-->
159	</SCRIPT>
160
161</BODY>
162</HTML>
163<!-- #INCLUDE FILE="../inc/mla_sql_end.asp" -->