Count Lines in Pages

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