Count Lines in Pages

Contents of Page: LoadMy4MasterFromMM.asp Number of Lines: 222 Last Modified: 8/22/2018 1:32:47 PM
0001: <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
0002: <!-- #include FILE="include/adovbs.inc" -->
0003: <!-- #include FILE="include/constants.inc" -->
0004: <!-- #include FILE="include/funcs.asp" -->
0005: <%
0006: 
0007: 
0008: 	Set rs = Server.CreateObject("ADODB.Recordset")
0009: 
0010: 	sqlString = "SELECT * FROM mmEntries " & _
0011: 			    "WHERE Season > 2000 and InvalidEmail = False "
0012:    
0013: 		sqlString = sqlString &	"ORDER BY EmailAddress, Season"
0014: 
0015: 
0016: 
0017: SRTitle = sqlString
0018: 
0019: 	rs.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0020: 	totreg = 0
0021:    totentries = 0
0022:    totssentries = 0   
0023:    totpaid = 0
0024:    totmade = 0
0025:    tot2ndmade = 0
0026: %>
0027: <html>
0028: 
0029: <head>
0030: <link href="mm.css" rel="stylesheet" type="text/css">
0031: <script language="JavaScript" type="text/javascript">
0032: 		function deleteNode(id)	{
0033: 			if (!confirm("Are you sure you want to delete this entry?"))	{
0034: 				return;
0035: 			}
0036: 			window.location = "mmEntryDelete.asp?id="+id;
0037: 		}
0038: 	</script>
0039: 
0040: <title>March Madness - Search Results</title>
0041: </head>
0042: 
0043: <body bgcolor="#ffffff">
0044: 
0045: <table cellspacing="1" border="0" cellpadding="0" width="85%" align="center" height="53">
0046:   <tr>
0047: <%= SRTitle %>
0048:   </tr>
0049:   <tr>
0050:     <td width="30"></td>
0051:     <td width="40"></td>
0052:     <td width="110"><img src="clear.gif" width="1" height="2"></td>
0053:     <td width="90"><img src="clear.gif" width="1" height="2"></td>
0054:     <td width="150"><img src="clear.gif" width="1" height="2"></td>
0055:     <td width="40"><img src="clear.gif" width="1" height="2"></td>
0056:     <td width="30"><img src="clear.gif" width="1" height="2"></td>
0057:     <td width="30"><img src="clear.gif" width="1" height="2"></td>
0058:     <td width="200"><img src="clear.gif" width="1" height="2"></td>
0059:     <td width="30"><img src="clear.gif" width="1" height="2"></td>
0060:     <td width="50"><img src="clear.gif" width="1" height="2"></td>
0061:   </tr>
0062:   <tr bgcolor="#577fbe">
0063:     <td class="small" align="center" height="19"></td>
0064:     <td class="small" align="center" height="19">Year</td>
0065:     <td class="small" align="center" height="19">RegNo</td>    
0066:     <td class="small" align="center" height="19">Last Name</td>
0067:     <td class="small" align="center" height="19">First Name</td>
0068:     <td class="small" align="center" height="19">City</td>
0069:     <td class="small" align="center" height="19">St</td>
0070:     <td class="small" align="center" height="19">Entries</td>
0071:     <td class="small" align="center" height="19">Bad Email</td>
0072:     <td class="small" align="left" height="19">Email Address</td>
0073:     <td class="small" align="center" height="19"><a href="whoisin.asp?sort=ID"
0074:     class="smallUndl">ID</a></td>
0075: <%	bgcolor = "#e8e8e8"
0076: 		Do Until rs.EOF
0077: 		emailaddress = rs("EmailAddress").value
0078: 	Name = rs("Name").Value
0079: 	FirstName = rs("FirstName").Value
0080: 	Address = rs("Address").Value	
0081: 	City = rs("City").Value
0082: 	State = rs("State").Value
0083: 	If State = "" Then State = "ZZ"
0084: 	Zip = rs("Zip").Value	
0085: 	passwrod = rs("Password").Value
0086:     Season = Cint(rs("Season").Value)
0087:     NewFlag = ""
0088: 			Set rsm = Server.CreateObject("ADODB.Recordset")
0089: 	sqlString = "SELECT * FROM My4_Master " & _
0090: 							"WHERE EmailAddress = '" & emailaddress & "' " 
0091: 	rsm.Open sqlString, conn2, adOpenDynamic, adLockOptimistic, adCmdText
0092: 
0093: 	If rsm.EOF Then
0094: 		 NewFlag = "NEW"
0095: 		rsm.Close
0096: 		Set rsm = Nothing
0097: 
0098: 		Set rsc = Server.CreateObject("ADODB.Recordset")
0099: 		sqlString = "SELECT * FROM mmConfig " & _
0100: 							"WHERE Element = 'REGNUMBER_LIID' " 
0101: 
0102: 		rsc.Open sqlString, conn2,  adOpenDynamic, adLockOptimistic, adCmdText	
0103: 		
0104: 		If rsc.EOF Then
0105: 		 	LIID = 9999
0106: 			rsc.Close
0107: 			Set rsc = Nothing		 	
0108: 		Else
0109: 	    	LIID = rsc("Value").Value
0110:  			LIID = LIID + 1
0111: 			rsc("Value").Value = LIID
0112: 			rsc.Update
0113: 			rsc.Close
0114: 			Set rsc = Nothing
0115: 		End If
0116: 		Set rsm = Server.CreateObject("ADODB.Recordset")		
0117: 		rsm.Open "My4_Master", conn2, adOpenDynamic, adLockOptimistic, adCmdTable
0118: 		rsm.AddNew
0119: 		rsm("RegNumber").Value = LIID
0120: 		rsm("FirstName").Value = firstName
0121: 		rsm("LastName").Value = Name
0122: 		rsm("Address").Value = Address
0123: 		rsm("City").Value = city
0124: 		rsm("State").Value = state  
0125: 		rsm("Zip").Value = zip 		
0126: 		rsm("EmailAddress").Value = emailaddress
0127: 		rsm("Password").Value = password
0128: 		rsm("MMLastYear").Value = Season
0129: 		RegNumber = LIID
0130: 		rsm.Update
0131: 		rsm.Close
0132: 		Set rsm = Nothing	
0133: 		
0134: 	Else
0135: 		oldAddress = rsm("Address").Value
0136: 		OldMMLastYear = rsm("MMLastYear").Value 
0137: 		If IsNull(OldMMLastYear) Then
0138: 			OldMMLastYear = 0
0139: 		End If
0140: 		OldMMLastYear = Cint(OldMMLastYear)
0141: 		RegNumber = rsm("RegNumber").Value     
0142: 		OKtoUpdate = ""
0143:     	If oldaddress = "N/A" and address <> "N/A" Then
0144:      		rsm("Address").Value = Address
0145: 			rsm("City").Value = city
0146: 			rsm("State").Value = state  
0147: 			rsm("Zip").Value = zip
0148:      		If OldMMLastYear <  season Then
0149:      			rsm("MMLastYear").Value = season  
0150:      			OldMMLastYear = season  	
0151:      		End If			
0152: 			OKtoUpdate = "Y"		
0153:      	End If
0154: '     	If  Season > OldMMLastYear Then
0155:      		rsm("MMLastYear").Value = Season
0156:      			OldMMLastYear = Season       		
0157: 			OKtoUpdate = "Y"	     	
0158: '    	 End If		
0159:      	If OKtoUpdate = "Y" Then
0160: 	 		rsm.Update
0161:      	End If
0162:      	rsm.Close
0163: 	 	Set rsm = Nothing	
0164: 	 
0165: 	 End If	
0166: 			If bgcolor = "#e8e8e8" Then
0167: 				bgcolor = "#ffffff"
0168: 			Else
0169: 				bgcolor = "#e8e8e8"
0170: 			End If
0171: 	%>
0172:   </tr>
0173:   <tr bgcolor="<%= bgcolor %>">
0174:     <td class="smalldark" align="center" height="13"><%= totreg %>
0175: </td>
0176:     <td class="smalldark" align="left" height="13"><%= Season %>
0177: </td>
0178:     <td class="smalldark" align="left" height="13"><%= RegNumber %> / .<%= OldMMLastYear %>.
0179: </td>
0180:     <td class="smalldark" align="left" height="13"><%= Name %>
0181: </td>
0182:     <td class="smalldark" align="left" height="13"><%= FirstName %>
0183: </td>
0184:     <td class="smalldark" align="left" height="13"><%= Address %>
0185: </td>
0186:     <td class="smalldark" align="left" height="13"><%= City %>
0187: </td>
0188:     <td class="smalldark" align="left" height="13"><%= State %>
0189: </td>
0190:     <td class="smalldark" align="left" height="13"><%= Zip %>
0191: </td>
0192: 
0193:    <td class="smalldark" align="left" height="13"><%= EmailAddress %>
0194: </td>
0195:     <td class="smalldark" align="left" height="13"><%=  NewFlag %>
0196: </td>
0197:     <td class="smalldark" align="left" height="13"><%=  OKtoUpdate %>
0198: </td>
0199: <%	   
0200:       rs.MoveNext
0201: 		Loop
0202: 		If bgcolor = "#e8e8e8" Then
0203: 				bgcolor = "#ffffff"
0204: 			Else
0205: 				bgcolor = "#e8e8e8"
0206: 			End If
0207: 
0208: 		rs.Close
0209: 		Set rs = Nothing	%>
0210:   </tr>
0211:   <tr bgcolor="<%= bgcolor %>">
0212:     <td class="smalldark" align="left" colspan="3" height="13">Total Registered: <%= totreg %> </td>
0213:     <td class="smalldark" align="left" colspan="2" height="13"><p align="right">Total Entries:</td>
0214:     <td></td>
0215:     <td class="smalldark" align="center" height="13"><%= totentries %>
0216: </td>
0217:     <td class="smalldark" align="left" colspan="3" height="13"><p align="center"><input
0218:     type="button" value="Go Back" class="norm" onClick="history.back()" style="float: center"></td>
0219:   </tr>
0220: </table>
0221: </body>
0222: </html>