PageRenderTime 23ms CodeModel.GetById 15ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/SQL/scripts/db/dbtbl.asp

http://github.com/khaneh/Orders
ASP | 63 lines | 61 code | 2 blank | 0 comment | 0 complexity | 730661fb4273bd69297930ad275fb435 MD5 | raw file
 1<!-- #INCLUDE FILE="../inc/mla_sql_include.asp" -->
 2<%
 3	Dim myDbName, myNodeId, myArrTbl, myTblCount, i, myObjStr, myStrClass, myTblName, myTblShortName, myStrTree
 4	myNodeId = Request.QueryString("nid")
 5	myDbName = Request.QueryString("db")
 6	openConnection
 7	myStrTree = getTreeStr(Mid(myNodeId, 2) & "_1", Array(myDbName))
 8	myArrTbl = getDbTbl(myDbName)
 9	closeConnection
10	If isArray(myArrTbl) Then myTblCount = UBound(myArrTbl, 2) Else myTblCount = -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/table.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALIGN="MIDDLE" ALT="Tables"> <% = myTObj.getTerm(7) %></TD></TR>
19		<TR><TD>
20			<TABLE BORDER=0 CELLPADDING=2 CELLSPACING=2 ALIGN=CENTER CLASS="content" SUMMARY="Table List">
21				<THEAD>
22					<TR><TD CLASS="collabel"><% = myTObj.getTerm(150) %></TD><TD CLASS="collabel"><% = myTObj.getTerm(121) %></TD><TD CLASS="collabel"><% = myTObj.getTerm(122) %></TD><TD CLASS="collabel"><% = myTObj.getTerm(126) %></TD><TD CLASS="collabel"><% = myTObj.getTerm(151) %></TD><TD CLASS="collabel">&nbsp;</TD></TR>
23				</THEAD>
24				<TBODY>
25					<%
26						Set myObjStr = New mlt_string
27						For i = 0 To myTblCount
28							myTblName = "[" & rembracket(myDbName) & "].[" & rembracket(myArrTbl(1, i)) & "].[" & rembracket(myArrTbl(0, i)) & "]"
29							myTblShortName = "[" & rembracket(myArrTbl(1, i)) & "].[" & rembracket(myArrTbl(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/table.gif"" WIDTH=""16"" HEIGHT=""16"" BORDER=0 ALT=""" & myArrTbl(0, i) & """ ALIGN=""MIDDLE""> "
33							myObjStr.strAppend "<A HREF=""tblstruct.asp?nid=" & myNodeId & "&db=" & Server.URLEncode(myDbName) & "&tbl=" & Server.URLEncode(myTblName) & """>"
34							If Trim(myArrTbl(5, i)) = "S" Then
35								myObjStr.strAppend "<B><I>" & myArrTbl(0, i) & "</I></B>"
36							Else
37								myObjStr.strAppend "<B>" & myArrTbl(0, i) & "</B>"
38							End If
39							If mla_auth(1, 4) Or mla_auth(1, 5) Then myObjStr.strAppend "</A>"
40							myObjStr.strAppend "</TD>" & vbCrLf
41							myObjStr.strAppend "<TD>" & myArrTbl(1, i) & "</TD>" & vbCrLf
42							myObjStr.strAppend "<TD>" & myArrTbl(2, i) & "</TD>" & vbCrLf
43							myObjStr.strAppend "<TD>" & myArrTbl(3, i) & "</TD>" & vbCrLf
44							myObjStr.strAppend "<TD ALIGN=RIGHT>" & myArrTbl(4, i) & "</TD>" & vbCrLf
45							myObjStr.strAppend "<TD>"
46							If mla_auth(1, 5) Then myObjStr.strAppend "&nbsp;<A HREF=""content.asp?nid=" & myNodeId & "&db=" & Server.URLEncode(myDbName) & "&obj=" & Server.URLEncode(myTblName) & "&type=tbl""><IMG SRC=""../../themes/" & mla_cfg_theme & "/images/action/content.gif"" WIDTH=""16"" HEIGHT=""16"" BORDER=0 ALT=""" & myTObj.getTerm(152) & """></A>"
47							If mla_auth(1, 6) Then myObjStr.strAppend "&nbsp;<A HREF=""search.asp?nid=" & myNodeId & "&db=" & Server.URLEncode(myDbName) & "&obj=" & Server.URLEncode(myTblName) & "&type=tbl""><IMG SRC=""../../themes/" & mla_cfg_theme & "/images/action/search.gif"" WIDTH=""16"" HEIGHT=""16"" BORDER=0 ALT=""" & myTObj.getTerm(154) & """></A>"
48							myObjStr.strAppend "&nbsp;" & vbCrLf
49							If mla_auth(1, 4) Then myObjStr.strAppend "&nbsp;<A HREF=""tblstruct.asp?nid=" & myNodeId & "&db=" & Server.URLEncode(myDbName) & "&tbl=" & Server.URLEncode(myTblName) & """><IMG SRC=""../../themes/" & mla_cfg_theme & "/images/action/property.gif"" WIDTH=""16"" HEIGHT=""16"" BORDER=0 ALT=""" & myTObj.getTerm(153) & """></A>"							
50							myObjStr.strAppend "&nbsp;</TD>" & vbCrLf
51							myObjStr.strAppend "</TR>" & vBCrLf
52						Next
53						Response.Write myObjStr.getStr()
54						Set myObjStr = Nothing
55					%>
56				</TBODY>
57			</TABLE>
58		</TD></TR>
59	</TABLE>
60
61</BODY>
62</HTML>
63<!-- #INCLUDE FILE="../inc/mla_sql_end.asp" -->