Count Lines in Pages

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