PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/SQL/scripts/db/dbview.asp

http://github.com/khaneh/Orders
ASP | 61 lines | 59 code | 2 blank | 0 comment | 0 complexity | 4b54f5f606999dff8126a3d7a0072b49 MD5 | raw file
 1<!-- #INCLUDE FILE="../inc/mla_sql_include.asp" -->
 2<%
 3	Dim myDbName, myNodeId, myArrView, myViewCount, i, myObjStr, myStrClass, myViewName, myStrTree, myShortViewName
 4	myNodeId = Request.QueryString("nid")
 5	myDbName = Request.QueryString("db")
 6	openConnection
 7	myStrTree = getTreeStr(Mid(myNodeId, 2) & "_2", Array(myDbName))
 8	myArrView = getDbView(myDbName)
 9	closeConnection
10	If isArray(myArrView) Then myViewCount = UBound(myArrView, 2) Else myViewCount = -1 End If
11%>
12<!-- #INCLUDE FILE="../inc/metaheader.asp" -->
13<BODY>
14	<P CLASS="treeinfo"><% = myStrTree %></P>
15
16	<TABLE BORDER=0 CELLPADDING=2 CELLSPACING=0 CLASS="content" SUMMARY="Database Information">
17		<TR><TD CLASS="caption">
18		<IMG SRC="../../themes/<% = mla_cfg_theme %>/images/mylittletree/view.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALIGN="MIDDLE" ALT="Views"> <% = myTObj.getTerm(8) %></TD></TR>
19		<TR><TD>
20			<TABLE BORDER=0 CELLPADDING=2 CELLSPACING=2 ALIGN=CENTER CLASS="content" SUMMARY="View List">
21				<THEAD>
22					<TR><TD CLASS="collabel"><% = myTObj.getTerm(160) %></TD><TD CLASS="collabel"><% = myTObj.getTerm(121) %></TD><TD CLASS="collabel"><% = myTObj.getTerm(122) %></TD><TD CLASS="collabel">&nbsp;</TD></TR>
23				</THEAD>
24				<TBODY>
25					<%
26						Set myObjStr = New mlt_string
27						For i = 0 To myViewCount
28							myViewName = "[" & rembracket(myDbName) & "].[" & rembracket(myArrView(1, i)) & "].[" & rembracket(myArrView(0, i)) & "]"
29							myShortViewName = "[" & rembracket(myArrView(1, i)) & "].[" & rembracket(myArrView(0, i)) & "]"
30							If i MOD 2 = 0 Then myStrClass = "odd" Else myStrClass = "even" End If
31							myObjStr.strAppend "<TR CLASS=""" & myStrClass & """>" & vBCrLf
32							myObjStr.strAppend "<TD><IMG SRC=""../../themes/" & mla_cfg_theme & "/images/mylittletree/view.gif"" WIDTH=""16"" HEIGHT=""16"" BORDER=0 ALT=""" & myArrView(0, i) & """ ALIGN=""MIDDLE""> "
33							myObjStr.strAppend "<A HREF=""viewstruct.asp?nid=" & myNodeId & "&db=" & Server.URLEncode(myDbName) & "&view=" & Server.URLEncode(myViewName) & """>"
34							If Trim(myArrView(3, i)) <> 0 Then
35								myObjStr.strAppend "<B><I>" & myArrView(0, i) & "</I></B>"
36							Else
37								myObjStr.strAppend "<B>" & myArrView(0, i) & "</B>"
38							End If
39							If mla_auth(2, 4) Or mla_auth(2, 5) Then myObjStr.strAppend "</A>"
40							myObjStr.strAppend "</TD>" & vbCrLf
41							myObjStr.strAppend "<TD>" & myArrView(1, i) & "</TD>" & vbCrLf
42							myObjStr.strAppend "<TD>" & myArrView(2, i) & "</TD>" & vbCrLf
43							myObjStr.strAppend "<TD>"
44							If mla_auth(2, 5) Then myObjStr.strAppend "&nbsp;<A HREF=""content.asp?nid=" & myNodeId & "&db=" & Server.URLEncode(myDbName) & "&obj=" & Server.URLEncode(myViewName) & "&type=view""><IMG SRC=""../../themes/" & mla_cfg_theme & "/images/action/content.gif"" WIDTH=""16"" HEIGHT=""16"" BORDER=0 ALT=""" & myTObj.getTerm(152) & """></A>"
45							If mla_auth(2, 6) Then myObjStr.strAppend "&nbsp;<A HREF=""search.asp?nid=" & myNodeId & "&db=" & Server.URLEncode(myDbName) & "&obj=" & Server.URLEncode(myViewName) & "&type=view""><IMG SRC=""../../themes/" & mla_cfg_theme & "/images/action/search.gif"" WIDTH=""16"" HEIGHT=""16"" BORDER=0 ALT=""" & myTObj.getTerm(154) & """></A>"
46							myObjStr.strAppend "&nbsp;" & vbCrLf
47							If mla_auth(2, 4) Then myObjStr.strAppend "&nbsp;<A HREF=""viewstruct.asp?nid=" & myNodeId & "&db=" & Server.URLEncode(myDbName) & "&view=" & Server.URLEncode(myViewName) & """><IMG SRC=""../../themes/" & mla_cfg_theme & "/images/action/property.gif"" WIDTH=""16"" HEIGHT=""16"" BORDER=0 ALT=""" & myTObj.getTerm(153) & """></A>"
48							myObjStr.strAppend "&nbsp;</TD>" & vbCrLf
49							myObjStr.strAppend "</TR>" & vBCrLf
50						Next
51						Response.Write myObjStr.getStr()
52						Set myObjStr = Nothing
53					%>
54				</TBODY>
55			</TABLE>
56		</TD></TR>
57	</TABLE>
58
59</BODY>
60</HTML>
61<!-- #INCLUDE FILE="../inc/mla_sql_end.asp" -->