Count Lines in Pages

Contents of Page: register_m.asp Number of Lines: 258 Last Modified: 2/26/2025 2:22:18 PM
0001: <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
0002: 
0003: <!-- #include FILE="include/adovbs.inc" -->
0004: <!-- #include FILE="include/constants.inc" -->
0005: <!-- #include FILE="include/funcs.asp" -->
0006: 
0007: <%
0008: 
0009: %>
0010: 
0011: <html>
0012: 
0013: <head>
0014: <!base target="_top">
0015: </head>
0016: </html>
0017: 
0018: <%
0019: 
0020: ReturnSiteURL = Session("BaseSiteURL")
0021: 
0022: If ReturnSiteURL = "default.asp" Then
0023: 
0024: UsedMobile = "N"
0025: 
0026: Else
0027: 
0028: UsedMobile = "Y"
0029: 
0030: ENd If
0031: 
0032: 
0033: 	user = Request.Cookies("user")
0034: 
0035: 	firstName = Trim(Request.Form("FirstName"))
0036: 	lastName = Trim(Request.Form("Name"))
0037: 	address = Trim(Request.Form("Address"))
0038: 	city = Trim(Request.Form("City"))
0039: 	ReadTerms = Trim(Request.Form("ReadTerms"))
0040: 	statename = UCase(Trim(Request.Form("State")))
0041: 	zip = Trim(Request.Form("Zip"))
0042: 	RefBy = Trim(Request.Form("Refby"))
0043: 	numEntries = Request.Form("NumEntries")
0044: 	RegNumber = Trim(Request.Form("RegNumber"))	
0045: 	If numEntries = "" Then
0046: 	numEntries = 0
0047: 	End If
0048: 	num2ndEntries = Request.Form("Num2ndEntries")
0049: 	If num2ndEntries = "" Then
0050: 	num2ndEntries = 0
0051: 	End If	
0052: 	emailaddress = Trim(Request.Form("EMail"))
0053: 	password = Trim(Request.Form("PasswordOne"))
0054: 	passwordtwo = Trim(Request.Form("PasswordTwo"))
0055: 	success = Request.Form("success")
0056: 				If address = "" Then
0057: 		address = "N/A"
0058: 		End If
0059: 		If LYZip = "" Then
0060: 		LYZip = "99999"
0061: 		End If
0062: 	
0063: 	If Refby = emailaddress Then
0064: 	Refby = ""
0065: 	End If
0066: 
0067: 	If numEntries < 1 Then
0068: 		Response.Redirect("MMDisplayError_M.asp?Type=NUMENTRIES")
0069: 	End If
0070: 
0071: 	If numEntries = 0 and num2ndEntries = 0 Then
0072: 	Response.Redirect("MMDisplayError_M.asp?Type=MISSINGENTRY")
0073: 	End If
0074: 	If password = "" Then
0075: 	Response.Redirect("MMDisplayError_M.asp?Type=MISSINGPASSWORD")
0076: 	End If
0077: 	If password <> passwordtwo Then
0078: 	Response.Redirect("MMDisplayError_M.asp?Type=PASSWORDNOTEQUAL&var1=" & password & "&var2=" & passwordtwo)
0079: 	End If	
0080: 	If ReadTerms = "" Then
0081: 	Response.Redirect("MMDisplayError_M.asp?Type=READTERMS")
0082: 	End If	
0083: 	If numEntries > 9 Then
0084: 	Response.Redirect("MMDisplayError_M.asp?Type=TOOMANY")
0085: 	End If	
0086: 		
0087: 	Set rs = Server.CreateObject("ADODB.Recordset")
0088: 	sqlString = "SELECT * FROM mmEntries " & _
0089: 							"WHERE EmailAddress = '" & emailaddress & "' " & _
0090: 							"AND Season = " & season
0091: 	rs.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0092: 	If rs.EOF Then
0093: 		rs.Close
0094: 		rs.Open "mmEntries", conn, adOpenDynamic, adLockOptimistic, adCmdTable
0095: 		rs.AddNew
0096: 		rs("RegNumber").Value = RegNumber
0097: 		rs("FirstName").Value = firstName
0098: 		rs("Name").Value = lastName
0099: 		rs("Address").Value = address
0100: 		rs("City").Value = city
0101: 		rs("State").Value = statename
0102: 		rs("Zip").Value = zip
0103:         rs("NumEntries").Value = numEntries
0104:         rs("Num2ndEntries").Value = num2ndEntries       
0105: 		rs("EmailAddress").Value = emailaddress
0106: 		rs("Password").Value = password
0107: 		rs("Season").Value = season
0108: 		rs("GroupName").Value = "DEFAULT"
0109: 		rs("GroupName2").Value = "DEFAULT"		
0110: 		rs("GroupName3").Value = "DEFAULT"	
0111: 		rs("RefBy").Value = RefBy
0112: 		rs("FreeEntries").Value = 0
0113: 		rs("TotalRefs").Value = 0
0114: 		rs("UsedMobile").Value = UsedMobile
0115: 		rs.Update
0116: 		rs.Close
0117: 		Set rs = Nothing
0118: 		
0119: 		Set rsm = Server.CreateObject("ADODB.Recordset")
0120: 		sqlString = "SELECT * FROM MY4_Master " & _
0121: 							"WHERE RegNumber = '" & RegNumber & "' " 
0122: 		rsm.Open sqlString, conn2, adOpenDynamic, adLockOptimistic, adCmdText
0123: 		If rsm.EOF Then
0124: ' Nothing
0125: 		Else
0126:   			rsm("MMLastYear").Value = Season
0127: 			rsm.Update 
0128: 			rsm.Close
0129: 			Set rsm = Nothing
0130:        	End If
0131: 	
0132: 				
0133: 	Else
0134: '	   Response.Write(sqlString)
0135: 		rs.Close
0136: 		Set rs = Nothing
0137: 		Response.Redirect("badEntry.asp")
0138: 	End If
0139: 	
0140: 	If regopen = "YES" Then
0141: 	RegType = ""
0142: 	RegEntries =  numEntries 
0143: 	Else
0144: 	RegType = "Sweet 16"
0145: 	RegEntries = num2ndEntries 
0146: 	End If	
0147: 
0148: 	If Len(password) > 2 Then
0149: 
0150: 	xl = Len(password) - 2
0151: 	tpass = "********************************"
0152: 	xpassword = Left(password,2)
0153: 	mpass = Mid(tpass,3,xl)
0154: 	tpassword = xpassword & mpass
0155: 
0156: 	Else
0157: 	
0158: 	tpassword = password
0159: 
0160: 	End If
0161: 
0162: 
0163: 	MMWebSite = chr(34) & "http://folga.org/mm" & chr(34)
0164: 	
0165: 	' send mail to Joe about new entry
0166: 	      msg = "Name:          " & firstName & " " & lastName & "<BR>" & _
0167: 		        "Email          " & emailaddress & "<br>" & _
0168: 				"Address:       " & address & ", " & city & ", " & statename & " " & zip & "<BR>"  & _
0169: 				"Date:          " & todayDate & "<BR>"  & _
0170: 				"# Entries :   " & numEntries & " / " & num2ndEntries 
0171: 
0172: 
0173: Response.Write("Email: " & EmailAddress & " - " & LastName & "<br>")
0174: 
0175: If ReturnSiteURL = "default.asp" Then
0176: 
0177: RegFrom = "MM"
0178: 
0179: Else
0180: 
0181: RegFrom = "MMM"
0182: 
0183: ENd If
0184: 
0185: EmailSubject = RegFrom & " (" & numEntries & "/" & num2ndEntries & ") " & firstname & " " & lastname & " - " & city & ", " & statename 
0186: 
0187: 
0188:    sendEmail notifyemail, "", "", EmailSubject, msg, "HTML", "MM Entry <jt@folga.org>"  
0189:            
0190: 				
0191: 	' send confirmation message to user
0192: 	msg = "This confirms your registration in the March Madness " & RegType & " contest." & "<BR>"  & _
0193: 				"<BR>" & _
0194: 				"Your details are:" & "<BR>" & _
0195: 				"  Name:          " & firstName & " " & lastName & "<BR>" & _
0196: 				"  Email:         " & emailaddress & "<BR>"  & _
0197: 				"  Password starts with: " & tpassword & "<BR>"  & _
0198: 				"  # of Entries:  " & RegEntries  & "<BR><BR>"  & _
0199: 				"  Thanks for participating! " & "<BR>"  & _
0200: 				"  You will be notified via email when your donation is received and processed.<BR>"  & _
0201: 				"Good Luck!" & "<BR>" 
0202: '				"Joe Toledo<BR><BR>p.s.: Win cash or free entries by referring friends/coleagues.  Check out the <b>Win FREE Entries!</b> link at <a href=" & MMWebSite & ">March Madness Contest Web Site</a>"
0203: 				
0204:     sendEmail emailaddress, "", "", "March Madness Contest - Registration Confirmation" , msg, "HTML", "Joe Toledo <jt@folga.org>"  		
0205:     
0206: '    If RefBy <> "" Then
0207: '    
0208: '    
0209: '  	Set rsm = Server.CreateObject("ADODB.Recordset")
0210: '		sqlString = "SELECT * FROM mmEntries " & _
0211: '							"WHERE EmailAddress = '" & RefBy & "' " & _
0212: '	                        "AND Season = " & season
0213: '		rsm.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText
0214: 'Response.Write(sqlString)
0215: '		If rsm.EOF Then
0216: '' Nothing
0217: 'Response.Write("<BR>Not Found")
0218: '		Else
0219: '		    MyFirstName = rsm("FirstName").Value
0220: '		    OldRefs = rsm("TotalRefs").Value
0221: '		    NewRefs = OldRefs + RegEntries
0222: '			NewRegs = Cint(NewRefs)
0223: '  			rsm("TotalRefs").Value = NewRefs
0224: '			rsm.Update 
0225: '			rsm.Close
0226: '			Set rsm = Nothing
0227: '       	End If
0228: '    
0229: '    EmailSubject = "March Madness Contest - Your referral has signed up! (" & firstName & " " & lastName & ")"
0230: '    msg = "Hi there " & MyFirstName & "! " & "<BR><BR>"
0231: '    msg = msg & firstName & " has just registered for the March Madness Contest and entered you as the referring person.<br><br>"
0232: '    msg = msg & "  Number of entries submitted by " & firstName & ":  " & RegEntries  & "<BR>"
0233: '    msg = msg & "  Total entries submitted by your referrals so far: " & NewRefs & "<br><br>"
0234: '    msg = msg & " Thank you for helping get more participation into the contest!"
0235: '  sendEmail RefBy, "", "", EmailSubject , msg, "HTML", "Joe Toledo <joeatoledo@gmail.com>"  
0236: '
0237: '
0238: '    End If    
0239: 
0240: emailaddress = LCase(emailaddress)
0241: 
0242: 	addCookie "user", emailaddress
0243: 	addCookie "SquarePoolsEMail", emailaddress
0244: 	addCookie "SquarePoolsRegNumber", RegNumber
0245: 	Session("loggedIn") = "Yes"
0246: 
0247: '	If user <> "jt@folga.org" Then
0248: '	addCookie "user", emailaddress
0249: '	
0250: '	addCookie "SquarePoolsEMail", emailaddress
0251: '	addCookie "SquarePoolsRegNumber", RegNumber
0252: '	
0253: '	Session("loggedIn") = "Yes"
0254: '	End If
0255: 
0256: 	Response.Redirect("thankyoureg_m.asp")
0257: 	' Response.Redirect("default.asp")
0258: %>