Count Lines in Pages

Contents of Page: DESMenuEdit.asp Number of Lines: 175 Last Modified: 2/19/2026 2:18:42 PM
0001: <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
0002: 
0003: 
0004: <!--#include file="include/constants.inc"-->
0005: <!--#include FILE="include/adovbs.inc" -->
0006: 
0007: <%
0008: 	ID = Trim(Request.QueryString("id"))
0009: 		XParentID = Trim(Request.QueryString("ParentID"))
0010: 	
0011: 	IF ID = "" Then Response.Redirect("DES_Menu_Maint.asp")
0012: 	
0013: 	If ID = 0 Then
0014: 		action = "Add"	
0015: 		nodeName = ""
0016: 		IsFolder = True
0017: 		parentID = XParentID
0018: 		typeValue = "R"
0019: 		link = ""
0020: 	Else
0021: 		action = "Edit"
0022: 		Set rs = Server.CreateObject("ADODB.Recordset")
0023: 		sqlString = "SELECT * FROM mmMenu WHERE ID = " & ID
0024: 		rs.Open sqlString, Conn, adOpenDynamic, adLockOptimistic, adCmdText
0025: 		nodeID = rs("NodeID").Value
0026: 		nodeName = rs("NodeName").Value		
0027: 		Description = rs("Description").Value
0028: 		parentID = rs("ParentID").Value
0029: 		ImageID = rs("ImageID").Value		
0030: 		typeValue = rs("Type").Value
0031: 		link = rs("Link").Value
0032: '		NeedLogin = rs("NeedLogin").Value
0033: 		TDClass = rs("TDClass").Value
0034: '		SecurityLevel = rs("SecurityLevel").Value
0035: 		IF TDClass = "" Then
0036: 		TDClass = "norm"
0037: 		End If		
0038: 		rs.Close	
0039: 	End If 
0040: 
0041: TypeDesc = ""
0042: Select Case TypeValue
0043:  Case "R"
0044: TypeDesc = "Regular"
0045:  Case "B"
0046: TypeDesc = "New Window"
0047:  Case "T"
0048: TypeDesc = "Same Window"
0049:  Case "X"
0050: TypeDesc = "Hide"
0051: End Select 
0052: %>
0053: 
0054: <html>
0055: <head>
0056: <title>FOLGA Menu Maintenance</title>
0057: 	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
0058: <link href="mm.css" rel="stylesheet" type="text/css">
0059: 	<script language="JavaScript" type="text/javascript">
0060: 		function editNode(id)	{
0061: 			form = document.node;
0062: 			if (form.NodeID.value == "0")	{
0063: 				alert("A node value of 0 is not valid. Please change.");
0064: 				form.NodeID.select();
0065: 				return false;
0066: 			}
0067: 			// check for double quotes
0068: 			for (i=0; i<form.NodeName.value.length; i++)	{
0069: 				if (form.NodeName.value.charCodeAt(i) == 34)	{
0070: 					alert("Double quotes cannot be used in the name. Please change.");
0071: 					form.NodeName.select();
0072: 					return false;
0073: 				}
0074: 				// check for single quotes
0075: 				if (form.NodeName.value.charCodeAt(i) == 39)	{
0076: 					alert("Single quotes cannot be used in the name. Please change.");
0077: 					form.NodeName.select();
0078: 					return false;
0079: 				}
0080: 			}
0081: 			return true;
0082: 		}
0083: 	</script>
0084: </head>
0085: 
0086: <body bgcolor="#FFFFFF" onLoad="document.node.NodeID.select()">
0087: 
0088: 	<form method="post" action="DESMenuUpdate.asp?ParentID=<%= XParentID %>" name="node" onSubmit="return editNode()">
0089: 		<input type="hidden" name="action" value="<%= action %>">
0090: 		<input type="hidden" name="MenuID" value="<%= ID %>">		
0091: 		<table border="0" cellpadding="2" cellspacing="1" width="735">
0092: 			<tr><td class="bigblue" align="center" width="111"></td><td class="bigblue" align="left" width="606" colspan="2"><%= action %> Menu
0093:                 Entry Update</td></tr>
0094: 			<tr>
0095: 				<td class="norm" bgcolor="#f8f8f8" width="111" align="right">
0096:                     <b>Node ID:</b></td>
0097: 				<td class="norm" bgcolor="#f8f8f8" width="606" colspan="2">
0098: 					<input type="text" name="NodeID" value="<%= nodeID %>" style="width:50px" class="norm"></td>
0099: 			</tr>
0100: 			<tr>
0101: 				<td class="norm" bgcolor="#f8f8f8" width="111" align="right">
0102:                     <b>Node Name:</b></td>
0103: 				<td class="norm" bgcolor="#f8f8f8" width="606" colspan="2">
0104: 					<input type="text" name="NodeName" value="<%= nodeName %>" style="width:300px" class="norm"></td>
0105: 			</tr>
0106: 			<tr>
0107: 				<td class="norm" bgcolor="#f8f8f8" width="111" align="right">
0108:                     <b>URL Link:</b></td>
0109: 				<td class="norm" bgcolor="#f8f8f8" width="606" colspan="2">
0110: 					<input type="text" name="Link" value="<%= link %>" style="width:380px" class="norm"></td>
0111: 			</tr>
0112: 			<tr>
0113: 				<td class="norm" bgcolor="#f8f8f8" width="111" align="right">
0114:                     <b>Description:</b></td>
0115: 				<td class="norm" bgcolor="#f8f8f8" width="606" colspan="2">
0116: 					<input type="text" name="Description" value="<%= Description %>" style="width: 597; height: 23" class="norm" size="132"></td>
0117: 			</tr>
0118: 			<tr>
0119: 				<td class="norm" bgcolor="#f8f8f8" width="111" align="right">
0120:                     <b>Image ID:</b></td>
0121: 				<td class="norm" bgcolor="#f8f8f8" width="606" colspan="2">
0122: 					<input type="text" name="ImageID" value="<%= ImageID %>" style="width:350px" class="norm"></td>
0123: 			</tr>			
0124: 			<tr>
0125: 				<td class="norm" bgcolor="#f8f8f8" width="111" align="right">
0126:                     <b>TD Class:</b></td>
0127: 				<td class="norm" bgcolor="#f8f8f8" width="606" colspan="2">
0128: <select name="TDClass" size="1">
0129:         <option selected value="<%= TDClass %>"><%= TDClass %></option>
0130:         <option value="norm">norm</option>
0131:         <option value="normred">normred</option>
0132:         <option value="normbold">normbold</option>
0133:      </select>
0134:             </td>
0135: 			</tr>
0136: 
0137: 			<tr>
0138: 				<td class="norm" bgcolor="#f8f8f8" width="111" align="right">
0139:                     <b>Parent ID:</b></td>
0140: 				<td class="norm" bgcolor="#f8f8f8" width="606" colspan="2">
0141: 					<input type="text" name="ParentID" value="<%= parentID %>" style="width:50px" class="norm"></td>
0142: 			</tr>
0143: 			<tr>
0144: 				<td class="norm" bgcolor="#f8f8f8" width="111" align="right">
0145:                     <b>Type:</b></td>
0146: 				<td class="norm" bgcolor="#f8f8f8" width="92">
0147: <select name="Type" size="1">
0148:         <option selected value="<%= typeValue %>"><%= TypeDesc %></option>
0149:         <option value="R">Regular</option>
0150:         <option value="B">New Window</option>
0151:         <option value="T">Same Window</option>
0152:         <option value="X">Hide</option>
0153:      </select>
0154: </td> 
0155: </tr>
0156: 	
0157: <tr><td></td>
0158: 				<td class="norm" bgcolor="#f8f8f8" width="514">
0159:                     <input type="submit" value="Save Menu Entry" class="norm">&nbsp;
0160:                     <input type="button" value="Cancel" class="norm" onClick="history.back(-1)"></td>
0161: 			</tr>
0162: 	
0163: 
0164: 			<tr><td class="small" width="111"></td><td class="small" width="606" colspan="2">&nbsp;</td></tr>
0165: 			<tr>
0166: 				<td class="norm" align="center" width="111">
0167:                 </td>
0168: 				<td class="norm" align="center" width="606" colspan="2">
0169:                     &nbsp;</td>
0170: 			</tr>
0171: 		</table>
0172: 	</form>
0173: 
0174: </body>
0175: </html>