PageRenderTime 10ms CodeModel.GetById 2ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/SQL/scripts/inc/tree_con.asp

http://github.com/khaneh/Orders
ASP | 92 lines | 78 code | 14 blank | 0 comment | 1 complexity | 0b96a5a48d2ffec175bfbd13b6a4462a MD5 | raw file
 1<!-- #INCLUDE FILE="../inc/mla_sql_include.asp" -->
 2<%
 3	If Not Session("isConnected") Then
 4		Response.Redirect "tree.asp"
 5		Response.End
 6	End If
 7
 8	Dim myArrDb, myDbCount, myStrSrvName
 9	openConnection
10	myArrDB = getDbList()
11	myStrSrvName = getSrvName()
12	closeConnection
13	If isArray(myArrDb) Then myDbCount = UBound(myArrDb, 2) Else myDbCount = -1 End If
14
15%>
16<!-- #INCLUDE FILE="../inc/metaheader.asp" -->
17<BODY>
18
19<SCRIPT LANGUAGE="JavaScript" SRC="../js/mylittletree.js" TYPE="text/javascript"></SCRIPT>
20<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
21<!--
22	var oTree = new myLittleTree("oTree", "../../themes/<% = mla_cfg_theme %>/images/mylittletree/"); 
23
24	oTree.addFolder("M0", null, "<% = myTObj.getTerm(1) %>", "root.gif", "../hlp/default.asp", "Content");
25
26	oTree.addFolder("M1", "M0", "<% = myTObj.getTerm(2) %>", "folder.gif", "../conn/default.asp", "Content");
27		oTree.addFolder("M1_1", "M1", "<% = myTObj.getTerm(3) %>", "server.gif", "../conn/dsnless.asp", "Content");
28		oTree.addFolder("M1_2", "M1", "<% = myTObj.getTerm(4) %>", "server.gif", "../conn/dsn.asp", "Content");
29		oTree.addFolder("M1_3", "M1", "<% = myTObj.getTerm(32) %>", "disconnect.gif", "../../restart.asp", "_top");
30
31	oTree.addFolder("M2", "M0", "<% = myStrSrvName %>", "server.gif", "../srv/srvinfo.asp", "Content");
32	oTree.addFolder("M2_1", "M2", "<% = myTObj.getTerm(5) %>", "folder.gif", "../db/default.asp", "Content");
33	<%
34		Dim i, myObjStr
35		Set myObjStr = New mlt_string
36		For i = 0 To myDbCount
37			myObjStr.strAppend vbTab & "oTree.addFolder(""M2_1_" & i+1 & """, ""M2_1"", """ & myArrDb(0, i) & """, ""database.gif"", ""../db/dbinfo.asp?nid=M2_1_" & i+1 & "&db=" & Server.URLEncode(myArrDb(0, i)) & """, ""Content"");" & vbCrLf
38			If mla_auth(1, 0) Then myObjStr.strAppend vbTab & vbTab & "oTree.addFolder(""M2_1_" & i+1 & "_1"", ""M2_1_" & i+1 & """, """ & myTObj.getTerm(7) & """, ""table.gif"", ""../db/dbtbl.asp?nid=M2_1_" & i+1 & "&db=" & Server.URLEncode(myArrDb(0, i)) & """, ""Content"");" & vbCrLf
39			If mla_auth(2, 0) Then myObjStr.strAppend vbTab & vbTab & "oTree.addFolder(""M2_1_" & i+1 & "_2"", ""M2_1_" & i+1 & """, """ & myTObj.getTerm(8) & """, ""view.gif"", ""../db/dbview.asp?nid=M2_1_" & i+1 & "&db=" & Server.URLEncode(myArrDb(0, i)) & """, ""Content"");" & vbCrLf
40			If mla_auth(3, 0) Then myObjStr.strAppend vbTab & vbTab & "oTree.addFolder(""M2_1_" & i+1 & "_3"", ""M2_1_" & i+1 & """, """ & myTObj.getTerm(9) & """, ""sp.gif"", ""../db/dbsp.asp?nid=M2_1_" & i+1 & "&db=" & Server.URLEncode(myArrDb(0, i)) & """, ""Content"");" & vbCrLf
41			If mla_auth(4, 0) Then myObjStr.strAppend vbTab & vbTab & "oTree.addFolder(""M2_1_" & i+1 & "_4"", ""M2_1_" & i+1 & """, """ & myTObj.getTerm(10) & """, ""user.gif"", ""../db/dbuser.asp?nid=M2_1_" & i+1 & "&db=" & Server.URLEncode(myArrDb(0, i)) & """, ""Content"");" & vbCrLf
42			If mla_auth(5, 0) Then myObjStr.strAppend vbTab & vbTab & "oTree.addFolder(""M2_1_" & i+1 & "_5"", ""M2_1_" & i+1 & """, """ & myTObj.getTerm(11) & """, ""role.gif"", ""../db/dbrole.asp?nid=M2_1_" & i+1 & "&db=" & Server.URLEncode(myArrDb(0, i)) & """, ""Content"");" & vbCrLf
43			If mla_auth(6, 0) Then myObjStr.strAppend vbTab & vbTab & "oTree.addFolder(""M2_1_" & i+1 & "_6"", ""M2_1_" & i+1 & """, """ & myTObj.getTerm(12) & """, ""rule.gif"", ""../db/dbrule.asp?nid=M2_1_" & i+1 & "&db=" & Server.URLEncode(myArrDb(0, i)) & """, ""Content"");" & vbCrLf
44			If mla_auth(7, 0) Then myObjStr.strAppend vbTab & vbTab & "oTree.addFolder(""M2_1_" & i+1 & "_7"", ""M2_1_" & i+1 & """, """ & myTObj.getTerm(13) & """, ""default.gif"", ""../db/dbdefault.asp?nid=M2_1_" & i+1 & "&db=" & Server.URLEncode(myArrDb(0, i)) & """, ""Content"");" & vbCrLf
45			If mla_auth(8, 0) Then myObjStr.strAppend vbTab & vbTab & "oTree.addFolder(""M2_1_" & i+1 & "_8"", ""M2_1_" & i+1 & """, """ & myTObj.getTerm(14) & """, ""udt.gif"", ""../db/dbudt.asp?nid=M2_1_" & i+1 & "&db=" & Server.URLEncode(myArrDb(0, i)) & """, ""Content"");" & vbCrLf
46			If mla_auth(9, 0) Then myObjStr.strAppend vbTab & vbTab & "oTree.addFolder(""M2_1_" & i+1 & "_9"", ""M2_1_" & i+1 & """, """ & myTObj.getTerm(16) & """, ""udf.gif"", ""../db/dbudf.asp?nid=M2_1_" & i+1 & "&db=" & Server.URLEncode(myArrDb(0, i)) & """, ""Content"");" & vbCrLf
47		Next
48		Response.Write myObjStr.getStr()
49		Set myObjStr = Nothing
50	%>
51	
52	<% If mla_auth(11, 0) Or mla_auth(12, 0) Then %>
53		oTree.addFolder("M2_3", "M2", "<% = myTObj.getTerm(19) %>", "folder.gif", "../srv/default.asp", "Content");
54		<% If mla_auth(11, 0) Then %>
55			oTree.addFolder("M2_3_1", "M2_3", "<% = myTObj.getTerm(230) %>", "connection.gif", "../srv/srvcon.asp", "Content");
56		<% End If %>
57		<% If mla_auth(12, 0) Then %>
58			oTree.addFolder("M2_3_2", "M2_3", "<% = myTObj.getTerm(231) %>", "srvrole.gif", "../srv/srvrole.asp", "Content");
59		<% End If %>
60	<% End If %>
61
62	<% If mla_auth(13, 0) Then %>
63		oTree.addFolder("M2_4", "M2", "<% = myTObj.getTerm(30) %>", "folder.gif", "../tools/default.asp", "Content");
64			oTree.addFolder("M2_4_1", "M2_4", "<% = myTObj.getTerm(31) %>", "query.gif", "../tools/query.asp", "Content");
65	<% End If %>
66
67	<% If mla_auth(14, 0) Or mla_auth(14, 1) Or mla_auth(14, 2) Then %>
68		oTree.addFolder("M10", "M0", "<% = myTObj.getTerm(22) %>", "folder.gif", "../pref/default.asp", "Content");
69		<% If mla_auth(14, 0) Then %>
70			oTree.addFolder("M10_1", "M10", "<% = myTObj.getTerm(23) %>", "", "../pref/theme.asp", "Content");
71		<% End If %>
72		<% If mla_auth(14, 1) Then %>
73			oTree.addFolder("M10_2", "M10", "<% = myTObj.getTerm(24) %>", "", "../pref/language.asp", "Content");
74		<% End If %>
75		<% If mla_auth(14, 2) Then %>
76			oTree.addFolder("M10_3", "M10", "<% = myTObj.getTerm(25) %>", "", "../pref/display.asp", "Content");
77		<% End If %>
78	<% End If %>
79
80	document.write (oTree.createHTML());
81
82	oTree.expandNode("M2"); 
83	oTree.expandNode("M2_1"); 
84
85	if (window.parent.frames['Content']) window.parent.frames['Content'].document.location = "../srv/srvinfo.asp";
86
87//-->
88</SCRIPT>
89
90</BODY>
91</HTML>
92<!-- #INCLUDE FILE="../inc/mla_sql_end.asp" -->