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

/SQL/scripts/db/viewstruct.asp

http://github.com/khaneh/Orders
ASP | 64 lines | 60 code | 4 blank | 0 comment | 0 complexity | ecbf84dee28ec77f4d51b79ef51f3217 MD5 | raw file
 1<!-- #INCLUDE FILE="../inc/mla_sql_include.asp" -->
 2<%
 3	Dim myNodeId, myDbName, myViewName, myArrCol, myColCount, i, myObjStr, myStrClass, myViewTxt, myStrTree
 4	myNodeId = Request.QueryString("nid")
 5	myDbName = Request.QueryString("db")
 6	myViewName = Request.QueryString("view")
 7	openConnection
 8	myStrTree = getTreeStr(Mid(myNodeId, 2) & "_2_2", Array(myDbName, myViewName))
 9	myArrCol = getViewCol(myDbName, myViewName)
10	myViewTxt = txt2html(getObjTxt(myDbName, myViewName))
11	closeConnection
12	If isArray(myArrCol) Then myColCount = UBound(myArrCol, 2) Else myColCount = -1 End If
13%>
14<!-- #INCLUDE FILE="../inc/metaheader.asp" -->
15<BODY>
16	<P CLASS="treeinfo"><% = myStrTree %></P>
17
18	<TABLE BORDER=0 CELLPADDING=2 CELLSPACING=0 CLASS="content" SUMMARY="Database Information">
19		<TR><TD CLASS="caption"><% = myTObj.getTerm(331) %></TD></TR>
20		<TR><TD>
21			<TABLE BORDER=0 CELLPADDING=2 CELLSPACING=2 ALIGN=CENTER CLASS="content" WIDTH="100%" SUMMARY="View Stucture">
22				<THEAD>
23					<TR><TD CLASS="collabel"><% = myTObj.getTerm(300) %></TD><TD CLASS="collabel"><% = myTObj.getTerm(301) %></TD><TD CLASS="collabel"><% = myTObj.getTerm(302) %></TD><TD CLASS="collabel"><% = myTObj.getTerm(303) %></TD><TD CLASS="collabel"><% = myTObj.getTerm(304) %></TD><TD CLASS="collabel"><% = myTObj.getTerm(305) %></TD><TD CLASS="collabel"><% = myTObj.getTerm(307) %></TD><TD CLASS="collabel"><% = myTObj.getTerm(308) %></TD><TD CLASS="collabel"><% = myTObj.getTerm(309) %></TD><TD CLASS="collabel"><% = myTObj.getTerm(310) %></TD></TR>
24				</THEAD>
25				<TBODY>
26					<%
27						Set myObjStr = New mlt_string
28						For i = 0 To myColCount
29							If i MOD 2 = 0 Then myStrClass = "odd" Else myStrClass = "even" End If
30							myObjStr.strAppend "<TR CLASS=""" & myStrClass & """>" & vBCrLf
31							myObjStr.strAppend "<TD NOWRAP><B>" & myArrCol(0, i) & "</B></TD>" & vbCrLf
32							myObjStr.strAppend "<TD NOWRAP>" & myArrCol(1, i) & "</TD>" & vbCrLf
33							myObjStr.strAppend "<TD NOWRAP ALIGN=RIGHT>" & myArrCol(2, i) & "</TD>" & vbCrLf
34							myObjStr.strAppend "<TD NOWRAP ALIGN=RIGHT>&nbsp;" & myArrCol(3, i) & "</TD>" & vbCrLf
35							myObjStr.strAppend "<TD NOWRAP ALIGN=RIGHT>&nbsp;" & myArrCol(4, i) & "</TD>" & vbCrLf
36							myObjStr.strAppend "<TD NOWRAP ALIGN=RIGHT>&nbsp;" & myArrCol(5, i) & "</TD>" & vbCrLf
37							myObjStr.strAppend "<TD NOWRAP ALIGN=RIGHT>&nbsp;" & myArrCol(6, i) & "</TD>" & vbCrLf
38							myObjStr.strAppend "<TD NOWRAP ALIGN=RIGHT>&nbsp;" & myArrCol(7, i) & "</TD>" & vbCrLf
39							myObjStr.strAppend "<TD NOWRAP ALIGN=RIGHT>&nbsp;" & myArrCol(8, i) & "</TD>" & vbCrLf
40							myObjStr.strAppend "<TD NOWRAP ALIGN=RIGHT>&nbsp;" & myArrCol(9, i) & "</TD>" & vbCrLf
41							myObjStr.strAppend "</TR>" & vBCrLf
42						Next
43						Response.Write myObjStr.getStr()
44						Set myObjStr = Nothing
45					%>
46				</TBODY>
47			</TABLE>
48			
49			&nbsp;<BR>
50
51			<TABLE BORDER=0 CELLPADDING=2 CELLSPACING=2 ALIGN=CENTER CLASS="content" WIDTH="100%" SUMMARY="View Definition">
52				<THEAD>
53					<TR><TD CLASS="collabel"><% = myTObj.getTerm(161) %></TD></TR>
54				</THEAD>
55				<TBODY>
56					<TR><TD><% = myViewTxt %></TD></TR>
57				</TBODY>
58			</TABLE>
59			
60		</TD></TR>
61	</TABLE>
62</BODY>
63</HTML>
64<!-- #INCLUDE FILE="../inc/mla_sql_end.asp" -->