PageRenderTime 15ms CodeModel.GetById 11ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/SQL/scripts/db/dbrule.asp

http://github.com/khaneh/Orders
ASP | 50 lines | 48 code | 2 blank | 0 comment | 0 complexity | 3489e500ff357dfe4454e4837ceb5170 MD5 | raw file
 1<!-- #INCLUDE FILE="../inc/mla_sql_include.asp" -->
 2<%
 3	Dim myDbName, myNodeId, myArrRule, myRuleCount, i, myObjStr, myStrClass, myStrTree, myRuleName, myRuleTxt
 4	myNodeId = Request.QueryString("nid")
 5	myDbName = Request.QueryString("db")
 6	openConnection
 7	myStrTree = getTreeStr(Mid(myNodeId, 2) & "_6", Array(myDbName))
 8	myArrRule = getDbRule(myDbName)
 9	closeConnection
10	If isArray(myArrRule) Then myRuleCount = UBound(myArrRule, 2) Else myRuleCount = -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/rule.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALIGN="MIDDLE" ALT="Rules"> <% = myTObj.getTerm(12) %></TD></TR>
19		<TR><TD>
20			<TABLE BORDER=0 CELLPADDING=2 CELLSPACING=2 ALIGN=CENTER CLASS="content" SUMMARY="Rule List">
21				<THEAD>
22					<TR><TD CLASS="collabel"><% = myTObj.getTerm(180) %></TD><TD CLASS="collabel"><% = myTObj.getTerm(121) %></TD><TD CLASS="collabel"><% = myTObj.getTerm(122) %></TD><TD CLASS="collabel"><% = myTObj.getTerm(181) %></TD></TR>
23				</THEAD>
24				<TBODY>
25					<%
26						Set myObjStr = New mlt_string
27						For i = 0 To myRuleCount
28							myRuleName = "[" & rembracket(myArrRule(1, i)) & "].[" & rembracket(myArrRule(0, i)) & "]"
29							myRuleTxt = txt2html(Trim(myArrRule(3, i)))
30							If Left(myRuleTxt, 4) = "<BR>" Then myRuleTxt = Mid(myRuleTxt, 5)
31							If i MOD 2 = 0 Then myStrClass = "odd" Else myStrClass = "even" End If
32							myObjStr.strAppend "<TR CLASS=""" & myStrClass & """>" & vBCrLf
33							myObjStr.strAppend "<TD><IMG SRC=""../../themes/" & mla_cfg_theme & "/images/mylittletree/rule.gif"" WIDTH=""16"" HEIGHT=""16"" BORDER=0 ALT=""" & myArrRule(0, i) & """ ALIGN=""MIDDLE""> "
34							myObjStr.strAppend "<B>" & myArrRule(0, i) & "</B></TD>" & vbCrLf
35							myObjStr.strAppend "<TD>" & myArrRule(1, i) & "</TD>" & vbCrLf
36							myObjStr.strAppend "<TD>" & myArrRule(2, i) & "</TD>" & vbCrLf
37							myObjStr.strAppend "<TD>" & myRuleTxt & "</TD>" & vbCrLf
38							myObjStr.strAppend "</TR>" & vBCrLf
39						Next
40						Response.Write myObjStr.getStr()
41						Set myObjStr = Nothing
42					%>
43				</TBODY>
44			</TABLE>
45		</TD></TR>
46	</TABLE>
47
48</BODY>
49</HTML>
50<!-- #INCLUDE FILE="../inc/mla_sql_end.asp" -->