Count Lines in Pages

Contents of Page: picksdemo_saveTemp.asp Number of Lines: 90 Last Modified: 8/22/2018 1:33:07 PM
0001: <% @Language = "VBScript" %>
0002: 
0003: <!-- #include FILE="include/adovbs.inc" -->
0004: <!-- #include FILE="include/constants.inc" -->
0005: 
0006: <%
0007: '	user = Request.Cookies("user")
0008:    user = "rosie@lusogolf.org"
0009:    season = 2003
0010: 	submit = Request.Form("submit")
0011: 	region = Request.Form("region")
0012: 
0013: 	If user = ""  Or (user <> "" And Session("loggedIn") = "") Or region = "" Then Response.Redirect("login.asp?from=picks.asp")
0014: 
0015: 	' create array of field names
0016: 	Dim teamchar
0017: 	teamchar = Array("A","B","C","D")
0018: 	c = teamchar(region - 1)
0019: 	Dim fname(15)
0020: 	For i = 0 To 14
0021: 		j = i + 1
0022: 		fname(i) = c & CStr(j)
0023: 	Next
0024: 
0025: 	' write the new data
0026: 	Set rs = Server.CreateObject("ADODB.Recordset")
0027: 	sqlString = "SELECT * FROM mmPicks " & _
0028: 			"WHERE Season = " & season & " " & _
0029: 			"AND EmailAddress = '" & user & "' " & _
0030: 			"AND Complete = 'No'"
0031: 	rs.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText
0032: 	If Not rs.EOF Then
0033: 		rs(fname(0)).Value = c & Request.Form("game1")
0034: 		rs(fname(1)).Value = c & Request.Form("game2")
0035: 		rs(fname(2)).Value = c & Request.Form("game3")
0036: 		rs(fname(3)).Value = c & Request.Form("game4")
0037: 		rs(fname(4)).Value = c & Request.Form("game5")
0038: 		rs(fname(5)).Value = c & Request.Form("game6")
0039: 		rs(fname(6)).Value = c & Request.Form("game7")
0040: 		rs(fname(7)).Value = c & Request.Form("game8")
0041: 		rs(fname(8)).Value = c & Request.Form("game9")
0042: 		rs(fname(9)).Value = c & Request.Form("game10")
0043: 		rs(fname(10)).Value = c & Request.Form("game11")
0044: 		rs(fname(11)).Value = c & Request.Form("game12")
0045: 		rs(fname(12)).Value = c & Request.Form("game13")
0046: 		rs(fname(13)).Value = c & Request.Form("game14")
0047: 		rs(fname(14)).Value = c & Request.Form("game15")
0048: 		rs.Update
0049: 	Else
0050: 		rs.Close
0051: 		rs.Open "mmPicks", conn, adOpenDynamic, adLockOptimistic, adCmdTable
0052: 		rs.AddNew
0053: 		rs("Season").Value = season
0054: 		rs("EmailAddress").Value = user
0055: 		rs("Complete").Value = "No"
0056: 		rs(fname(0)).Value = c & Request.Form("game1")
0057: 		rs(fname(1)).Value = c & Request.Form("game2")
0058: 		rs(fname(2)).Value = c & Request.Form("game3")
0059: 		rs(fname(3)).Value = c & Request.Form("game4")
0060: 		rs(fname(4)).Value = c & Request.Form("game5")
0061: 		rs(fname(5)).Value = c & Request.Form("game6")
0062: 		rs(fname(6)).Value = c & Request.Form("game7")
0063: 		rs(fname(7)).Value = c & Request.Form("game8")
0064: 		rs(fname(8)).Value = c & Request.Form("game9")
0065: 		rs(fname(9)).Value = c & Request.Form("game10")
0066: 		rs(fname(10)).Value = c & Request.Form("game11")
0067: 		rs(fname(11)).Value = c & Request.Form("game12")
0068: 		rs(fname(12)).Value = c & Request.Form("game13")
0069: 		rs(fname(13)).Value = c & Request.Form("game14")
0070: 		rs(fname(14)).Value = c & Request.Form("game15")
0071: 		rs.Update
0072: 	End If
0073: 	rs.Close
0074: 	Set rs = Nothing
0075: 	
0076: 	' determine where to go next
0077: 	If Left(submit, 7) = "<- Back" Then
0078: 		region = region - 1
0079: 	ElseIf Left(submit, 4) = "Next" Then
0080: 		region = region + 1
0081: 	Else
0082: 		Response.Redirect("login.asp?from=picks.asp")
0083: 	End If
0084: 	
0085: 	If region > 4 Then
0086: 		Response.Redirect("picks2demo.asp")
0087: 	Else
0088: 		Response.Redirect("picks1demo.asp?region=" & region)
0089: 	End If
0090: %>