Count Lines in Pages

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