Count Lines in Pages

Contents of Page: picks_stop.asp Number of Lines: 187 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: <!-- #include FILE="include/funcs.asp" -->
0006: 
0007: <%
0008: 	user = Request.Cookies("user")
0009: 	If user = "" Or (user <> "" And Session("loggedIn") = "") Then Response.Redirect("login.asp?from=picks.asp")
0010: 	
0011: 	If todayDate => cutoffdate and todaytime => cutofftime Then
0012: 	noMorePicks = True
0013: 	End If
0014: 	
0015: 	If user = "joe@lusogolf.org" Or user = "skesic@bridgesolutions.com" Then noMorePicks = False
0016:    If startmakepicks = "no" Then
0017:       Response.Redirect("picks1demo.asp")
0018:    Else
0019: 	' delete all temporary picks for this user
0020: 	Set cn = Server.CreateObject("ADODB.Connection")
0021: 	cn.Open conn
0022: 	sqlString = "DELETE FROM mmPicks " & _
0023: 							"WHERE EmailAddress = '" & user & "' " & _
0024: 							"AND Season = " & season & " " & _
0025: 							"AND Complete = 'No'"
0026: 	cn.Execute sqlString, lngRecs, adExecuteNoRecords
0027: 	cn.Close
0028: 	Set cn = Nothing
0029: 	
0030: 	' obtain the entry information
0031: 	Set rsEntry = Server.CreateObject("ADODB.Recordset")
0032: 	sqlString = "SELECT * FROM mmEntries " & _
0033: 							"WHERE EmailAddress = '" & user & "' " & _
0034: 							"AND Season = " & season
0035: 	rsEntry.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0036: 	numEntries = CInt(rsEntry("NumEntries").Value)
0037: 	firstName = rsEntry("FirstName").Value
0038: 	name = rsEntry("Name").Value
0039: 	rsEntry.Close
0040: 	Set rsEntry = Nothing
0041: 
0042: 	' get all picks
0043: 	Set rsPicks = Server.CreateObject("ADODB.Recordset")
0044: 	sqlString = "SELECT * FROM mmPicks " & _
0045: 							"WHERE EmailAddress = '" & user & "' " & _
0046: 							"AND Season = " & season & " " & _
0047: 							"AND Complete = 'Yes'"
0048: 	rsPicks.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0049: 	
0050: 	If rsPicks.EOF And numEntries <> 0 And Not noMorePicks Then
0051: 		rsPicks.Close
0052: 		Response.Redirect("picks1.asp?region=1")
0053: 	ElseIf numEntries = 0 Then
0054: 		rsPicks.Close
0055: 		Response.Redirect("contactmm.asp?user=" & user)
0056: 	End If
0057: 
0058: 	totPicks = rsPicks.RecordCount
0059:    End If
0060: %>
0061: 
0062: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
0063: 
0064: <html>
0065: <head>
0066: 	<title>March Madness - Picks Screen</title>
0067: 	<link href="mm.css" rel="stylesheet" type="text/css">
0068: </head>
0069: 
0070: <body bgcolor="#ffffff">
0071: 
0072: 	<table border="0" cellpadding="0" cellspacing="0" align="center" width="651">
0073: 		<tr>
0074: 			<td class="bigblue" width="438">Step #3: Make / Review Picks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
0075: 			<td class="bigblue" width="205">&nbsp;User: <%= user %>
0076: 			
0077:               &nbsp;</td>
0078: 		</tr>
0079: 		<tr>
0080: 			<td class="norm" colspan="3" width="648">
0081: 				<ol>
0082: 					<li>To <b>review picks</b> already made, click on Entry Name.</li>
0083: 					<li>To <b>change picks</b> on any given entry, click <b>Picks</b> in the Change column.&nbsp; <span class="normred"><b><br>
0084:                       WARNING:</b></span> You must complete all screens.</li>
0085: 					<li>To <b>change</b> just the <b>finalists</b> on any given entry, click <b>Finalists</b> in the Change column.&nbsp; <span class="normred"><b><br>
0086:                       WARNING:</b></span> You must complete this screen.</li>
0087: 					<li>Click on <img src="images/post.gif" border="0" align="absmiddle"> to change your Entry Name.</li>
0088: 				</ol>
0089: 			</td>
0090: 		</tr>
0091: 		<tr valign="top">
0092: 			<td class="normbold" width="643" colspan="2">Player's Name:</td>
0093: 			<td class="norm" width="4" align="left">
0094: 				<%= firstName %>&nbsp;<%= name %>
0095: 			</td>
0096: 		</tr>
0097: <%	If numEntries > 1 Then	%>
0098: <%		If numEntries > totPicks Then
0099: 				numLeft = numEntries - totPicks	%>
0100:                   <%		End If	%>
0101: 
0102: 			<tr valign="top">
0103: 				<td class="normbold" width="209">Max Entries:</td>
0104: 				<td class="normbold" width="434">
0105: 				&nbsp;<span class="normRed">(<%= numLeft %> left)</span>
0106:                   &nbsp;</td>
0107: 				<td class="norm" width="4"><%= numEntries %>
0108: 				</td>
0109: 			</tr>
0110: <%	End If	%>
0111: 		<tr><td colspan="3" class="space" width="648">&nbsp;</td></tr>
0112: 		<tr>
0113: 			<td colspan="3" width="648">
0114: <%	If Not rsPicks.EOF Then	%>
0115: 					<table border="0" cellpadding="0" cellspacing="0" align="center">
0116: 						<tr bgcolor="#FFFAF0">
0117: 							<td class="normbold" width="150" align="left" height="20">Entry Name</td>
0118: 							<td class="normbold" width="100" align="left">Champion</td>
0119: 							<td class="normbold" width="100" align="left">2nd Place</td>
0120: 							<td class="normbold" width="200" align="left">Semifinalists</td>
0121: 							<td class="normbold" width="100" align="center">Change</td>
0122: 						</tr>
0123: 						<tr><td colspan="5" height="1" bgcolor="#000000"><spacer type="block"></td></tr>
0124: <%	End If
0125: 		back = "#f8f8f8"
0126: 		Do Until rsPicks.EOF
0127: 			P1 = rsPicks("F1").Value
0128: 			If P1 <> rsPicks("S1").Value Then
0129: 				P2 = rsPicks("S1").Value
0130: 			Else
0131: 				P2 = rsPicks("S2").Value
0132: 			End If
0133: 			RU = ""
0134: 			If rsPicks("A15").Value <> P1 And rsPicks("A15").Value <> P2 Then RU = AddToList(RU, rsPicks("A15").Value)
0135: 			If rsPicks("B15").Value <> P1 And rsPicks("B15").Value <> P2 Then RU = AddToList(RU, rsPicks("B15").Value)
0136: 			If rsPicks("C15").Value <> P1 And rsPicks("C15").Value <> P2 Then RU = AddToList(RU, rsPicks("C15").Value)
0137: 			If rsPicks("D15").Value <> P1 And rsPicks("D15").Value <> P2 Then RU = AddToList(RU, rsPicks("D15").Value)
0138: 			If back = "#f8f8f8" Then
0139: 				back = "#ffffff"
0140: 			Else
0141: 				back = "#f8f8f8"
0142: 			End If
0143: 			Dim RUarr
0144: 			RUarr = Split(RU, ",")
0145: %>
0146: 						<tr bgcolor="<%= back %>">
0147: 							<td class="norm">
0148: 								<a href="displaypicks.asp?pick=<%= rsPicks("ID").Value %>" class="normUndl"><%= rsPicks("EntryName").Value %></a>
0149: 								&nbsp;
0150: 								<a href="nameChange.asp?pick=<%= rsPicks("ID").Value %>" class="normUndl">
0151: 									<img src="images/post.gif" alt="Change entry name" border="0" align="absmiddle">
0152: 								</a>
0153: 							</td>
0154: 							<td class="norm" align="left"><%= displayTeam(P1) %></td>
0155: 							<td class="norm" align="left"><%= displayTeam(P2) %></td>
0156: 							<td class="norm" align="left">
0157: 								<%= displayTeam(RUarr(0)) %>,&nbsp;<%= displayTeam(RUarr(1)) %>
0158: 							</td>
0159: 							<td align="left">
0160: <%		If noMorePicks Then	%>
0161: 									&nbsp;
0162: <%		Else	%>
0163: 									<a href="editPicks.asp?pick=<%= rsPicks("ID").Value %>&page=region" class="normUndl">Picks</a>
0164: 									&nbsp;&nbsp;
0165: 									<a href="editPicks.asp?pick=<%= rsPicks("ID").Value %>&page=final" class="normUndl">Finalists</a>
0166: <%		End If	%>
0167: 							</td>
0168: 						</tr>
0169: <%		rsPicks.MoveNext
0170: 		Loop
0171: 		rsPicks.Close
0172: 		Set rsPicks = Nothing	%>
0173: 				</table>
0174: 			</td>
0175: 		</tr>
0176: <%	If numEntries > totPicks And Not noMorePicks Then	%>
0177: 		<tr><td colspan="3" class="space" width="648">&nbsp;</td></tr>
0178: 		<tr align="center">
0179: 			<td colspan="3" width="648">
0180: 				<input type="button" value="Make Picks For A New Entry" class="norm" onClick="window.location='picks1.asp?region=1'"></td>
0181: 		</tr>
0182: <%	End If	%>
0183: 	</table>
0184: 
0185: 
0186: </body>
0187: </html>