Count Lines in Pages

Contents of Page: MM_Menu_Maint.asp Number of Lines: 125 Last Modified: 2/11/2024 5:16:24 PM
0001: <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
0002: 
0003: <!--#include file="include/constants.inc"-->
0004: <!--#include FILE="include/adovbs.inc" -->
0005: 
0006: <%
0007: '	user = Request.Cookies("user")
0008: '	If user <> "joe@lusogolf.org" And user <> "skesic@bridgesolutions.com" Then
0009: '		Response.Redirect("../login.asp?from=" & Server.URLEncode("admin/lgadmin.htm"))
0010: '	End If
0011: 
0012: '	Set rs = Server.CreateObject("ADODB.Recordset")
0013: '	sqlString = "SELECT * FROM mmMenu WHERE NodeID > 0 ORDER BY ParentID, NodeID"
0014: 'sqlString = "SELECT * FROM wcMenu "	& _
0015: ''							"WHERE Type <> 'Z' " & _  
0016: '							"ORDER BY ParentID, NodeID "
0017: 
0018: 	
0019: '	rs.Open "wcMenu", Conn, adOpenDynamic, adLockOptimistic, adCmdTable
0020: '	rs.Open sqlString, Conn, adOpenDynamic, adLockOptimistic, adCmdTable
0021: 	
0022: 	Set rs = Server.CreateObject("ADODB.Recordset")
0023: 	sqlString = "SELECT * FROM mmMenu "	& _
0024: 							"WHERE Type <> 'z' " & _
0025: 							"ORDER BY ParentID, NodeID "
0026: 							
0027: 							
0028: 	rs.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText
0029: 	
0030: 
0031: 		
0032: %>
0033: 
0034: <html>
0035: <head>
0036: <title>Admin - View Tables</title>
0037: 	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
0038: 	<link href="mm.css" rel="stylesheet" type="text/css">
0039: 	<script language="JavaScript" type="text/javascript">
0040: 		function deleteNode(id)	{
0041: 			if (!confirm("Are you sure you want to delete this node?"))	{
0042: 				return;
0043: 			}
0044: 			window.location = "mmMenuDelete.asp?id="+id;
0045: 		}
0046: 	</script>
0047: </head>
0048: 
0049: <body bgcolor="#ffffff">
0050: 
0051: 		<table border="0" cellpadding="0" cellspacing="0" width="800">
0052: 				<tr><td class="space" align="center" colspan="6">&nbsp;<a href="mmMenuEdit.asp?id=0" class="normundl">Add New Node</a>&nbsp;
0053:                                | <a href="mmadmin.asp"><font size="2">Admin Men</font>u</a></td></tr>
0054: 			<tr>
0055: 				<td>
0056: 							<tr bgcolor="#C46488" height="22">
0057: 							<td class="small" align="center" width="5%">
0058: 								Parent</td>
0059: 							<td class="small" align="center" width="5%" height="20">
0060: 								Node</td>
0061: 							<td class="small" align="center" width="5%">
0062: 								Del</td>								
0063: 							<td class="small" align="center" width="30%">
0064: 								Node Name</td>						
0065: 							<td class="small" align="center" width="5%">
0066: 								Type</td>
0067: 							<td class="small" align="center" width="45%">
0068: 								Link</td>
0069: 						</tr>
0070: 			<% 	
0071: 			
0072: 			bgcolor = "#ffeeee"
0073: 			trbgcolor = "#A4A4A4"
0074: 			LastParentID = ""
0075: 					Do Until rs.EOF
0076: 					ParentID = rs("ParentID").Value
0077: 					NodeType = Trim(rs("Type").Value)
0078: 
0079: 					If LastParentID = "" Then
0080: 					LastParendID = ParentID
0081: 					End If
0082: 					If LastParentID <> ParentID Then
0083: 					   	LastParentID = ParentID
0084: 						If bgcolor = "#A4A4A4" Then
0085: 							bgcolor = "#ffffff"
0086: 						Else
0087: 								bgcolor = "#A4A4A4"
0088: 						End If	
0089: 
0090: End If	
0091: 						If NodeType <> "X" Then
0092: 						Cell_color = "green"
0093: 						Else
0094: 						Cell_color = bgcolor
0095: 						End If
0096: 						%>
0097: 						<tr bgcolor="<%= bgcolor %>" height="24">
0098: 							<td class="norm" align="center"><%= rs("ParentID").Value %></td>
0099: 							<td class="norm" align="center"><a href="mmMenuEdit.asp?id=<%= rs("ID").Value %>">	<%= rs("NodeID").Value %></a></td>
0100: 							
0101: 							<td class="norm" align="center">
0102: 								<a href="javascript:deleteNode('<%= rs("ID").Value %>')" class="smallblueUndl">Del</a></td>
0103: 								<td class="norm" align="left">
0104: 								<%= rs("NodeName").Value %></td>
0105: 							<td class="norm" align="center" bgcolor="<%= Cell_color %>">
0106: 								<%= NodeType %></td>
0107: 							<td class="smalldark" align="left">
0108: 								<%= rs("Link").Value %></td>
0109: 						</tr>
0110: 			<%		rs.MoveNext
0111: 					Loop
0112: 					rs.Close
0113: 					Set rs = Nothing	%>
0114: 						<tr>
0115: 							<td class="smalldark" align="center" colspan="7">
0116: 								<a href="mmMenuEdit.asp?id=0" class="normundl">Add New Node</a>&nbsp;
0117:                                | <a href="mmadmin.asp">
0118:                                 Admin Menu</a> </td>
0119: 						</tr>
0120: 				</td>
0121: 			</tr>
0122: 		</table>
0123: 
0124: </body>
0125: </html>