PageRenderTime 22ms CodeModel.GetById 18ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/SQL/scripts/db/dbudf.asp

http://github.com/khaneh/Orders
ASP | 55 lines | 53 code | 2 blank | 0 comment | 0 complexity | 2ad140be8ca5de0a2b77536bef904cbf MD5 | raw file
 1<!-- #INCLUDE FILE="../inc/mla_sql_include.asp" -->
 2<%
 3	Dim myDbName, myNodeId, myArrUdf, myUdfCount, i, myObjStr, myStrClass, myUdfName, myStrTree, myUdfShortName
 4	myNodeId = Request.QueryString("nid")
 5	myDbName = Request.QueryString("db")
 6	openConnection
 7	myStrTree = getTreeStr(Mid(myNodeId, 2) & "_9", Array(myDbName))
 8	myArrUdf = getDbFunction(myDbName)
 9	closeConnection
10	If isArray(myArrUdf) Then myUdfCount = UBound(myArrUdf, 2) Else myUdfCount = -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/udf.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALIGN="MIDDLE" ALT="User defined functions"> <% = myTObj.getTerm(16) %></TD></TR>
19		<TR><TD>
20			<TABLE BORDER=0 CELLPADDING=2 CELLSPACING=2 ALIGN=CENTER CLASS="content" SUMMARY="UDF List">
21				<THEAD>
22					<TR><TD CLASS="collabel"><% = myTObj.getTerm(176) %></TD><TD CLASS="collabel"><% = myTObj.getTerm(121) %></TD><TD CLASS="collabel"><% = myTObj.getTerm(122) %></TD></TR>
23				</THEAD>
24				<TBODY>
25					<%
26						Set myObjStr = New mlt_string
27						For i = 0 To myUdfCount
28							myUdfName = "[" & myDbName & "].[" & myArrUdf(1, i) & "].[" & myArrUdf(0, i) & "]"
29							myUdfShortName = "[" & myArrUdf(1, i) & "].[" & myArrUdf(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/udf.gif"" WIDTH=""16"" HEIGHT=""16"" BORDER=0 ALT=""" & myArrUdf(0, i) & """ ALIGN=""MIDDLE""> "
33							If mla_auth(9, 4) Then myObjStr.strAppend "<A HREF=""udfstruct.asp?nid=" & myNodeId & "&db=" & Server.URLEncode(myDbName) & "&udf=" & Server.URLEncode(myUdfName) & """>"
34							If Trim(myArrUdf(3, i)) <> 0 Then
35								myObjStr.strAppend "<B><I>" & myArrUdf(0, i) & "</I></B>" & vbCrLf
36							Else
37								myObjStr.strAppend "<B>" & myArrUdf(0, i) & "</B>" & vbCrLf
38							End If
39							If mla_auth(9, 1) Then myObjStr.strAppend "</A>"
40							myObjStr.strAppend "</TD>" & vbCrLf
41							myObjStr.strAppend "<TD>" & myArrUdf(1, i) & "</TD>" & vbCrLf
42							myObjStr.strAppend "<TD>" & myArrUdf(2, i) & "</TD>" & vbCrLf
43							myObjStr.strAppend "</TR>" & vBCrLf
44						Next
45						Response.Write myObjStr.getStr()
46						Set myObjStr = Nothing
47					%>
48				</TBODY>
49			</TABLE>
50		</TD></TR>
51	</TABLE>
52
53</BODY>
54</HTML>
55<!-- #INCLUDE FILE="../inc/mla_sql_end.asp" -->