Count Lines in Pages

Contents of Page: biggestloserstandings.asp Number of Lines: 306 Last Modified: 4/22/2025 5:26:17 PM
0001: <% @Language = "VBScript" %>
0002: <!-- #include FILE="include/adovbs.inc" -->
0003: <!-- #include FILE="include/constants.inc" -->
0004: <!-- #include FILE="include/ReturnPageSet.inc" -->
0005: <%
0006: 	yr = Request.QueryString("yr")
0007: 	RegNumber = Request.QueryString("RegNumber")
0008: 	MyChampion = Request.QueryString("Champion")
0009: 	ShowTop5 = Request.QueryString("Top5")
0010: 	MaxToShow = 0
0011: 	If ShowTop5 = "Y" Then
0012: 	MaxToShow = 5
0013: 	End If
0014: 
0015: 
0016: 
0017: 	If yr <> "" Then
0018: 	yr = CInt(yr)
0019: 	End If
0020: 	season = CInt(season)
0021: 
0022: MaxYearToShow = season - 7
0023: 	
0024: 	If yr = "" Then yr = season
0025: 
0026: 
0027: 		Set rsp = Server.CreateObject("ADODB.Recordset")
0028: 	sqlString = "SELECT * FROM mmPrizes " & _
0029: 			"WHERE Season = " & yr
0030: 	rsp.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0031: 
0032: 
0033: If yr < Season Then
0034: Future = "Y"
0035: NextYr = yr + 1
0036: End IF
0037: 
0038: LastYr = Yr - 1
0039: 
0040: If LastYr < 2011 Then LastYr = 2011
0041: 
0042: 	If startmakepicks = "YES" Then
0043: 	user = Request.Cookies("user")
0044: 	If user = "" and startmakepicks = "YES" Then Response.Redirect("login.asp?from=biggestloserstandings.asp")
0045: 
0046: 
0047:  	Set rsg = Server.CreateObject("ADODB.Recordset")
0048: 	sqlString = "SELECT * FROM mmEntries " & _
0049: 			"WHERE Season = " & yr & " " & _
0050: 			"AND EmailAddress = '" & user & "'"
0051: '	rsg.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText
0052:     rsg.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText	  
0053: 	
0054:      	
0055: 	If rsg.EOF Then
0056: '
0057:     Else	
0058: 
0059: 	paid = rsg("PaidEntries").Value
0060:     Entries = rsg("NumEntries").Value
0061:     Num2ndEntries = rsg("Num2ndEntries").Value
0062: 	paid2nd = rsg("Paid2ndEntries").Value
0063: 	firstname = rsg("FirstName").Value
0064: 	ShowStand = rsg("ShowStandings").Value
0065: 	MyRegNumber = rsg("RegNumber").Value
0066: 
0067:     If showstandingstounpaid <> "YES" Then
0068: 
0069: UnpaidEntries = Entries - Paid
0070: UnpaidEntries = UnpaidEntries + (num2ndEntries - Paid2nd)
0071: UnpaidEntries = CInt(UnpaidEntries)
0072:     
0073: 		If UnpaidEntries > 0 and ShowStand = False Then 
0074: 			Response.Redirect("notpaidyet.asp?name=" & firstname)
0075: 		Else
0076: 	'	Response.Write("paid=" & paid & " paid2nd=" & paid2nd & " ShowStand=" & ShowStand & " yr=" & Thisyr & " season=" & season & "YrDiff=" & YrDiff & "UndpaidEntries=" & UnpaidEntries)
0077: 		End If
0078: 	End If
0079: 
0080: 	MyRegNumber = rsg("RegNumber").Value
0081: 	
0082: 	rsg.Close
0083: 	set rsg = Nothing
0084:    End If
0085: 
0086:    End if
0087: 	
0088: 	sortStr = Request.QueryString("sort")
0089: 	If sortStr = "" Then sortStr = "GamesPlayed, TotalPoints ASC"
0090: If sort = "Name" Then
0091: sortStr = "Name ASC"
0092: End If
0093: 
0094: 
0095: 	Set rs = Server.CreateObject("ADODB.Recordset")
0096: 	sqlString = "SELECT * FROM mmBiggestLoser " & _
0097: 			"WHERE Season = " & yr & " " & _
0098: 			"ORDER BY " & sortStr
0099: 	rs.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0100: 
0101: 		totpicks = rs.RecordCount
0102: 
0103: 
0104: 		
0105: 
0106: '   	tenpct = CInt(totpicks / 10)
0107: Tenpct = 5
0108: %>
0109: <html>
0110: 
0111: <head>
0112: <title>March Madness - Biggest Losers Standings</title>
0113: <link href="mm.css" rel="stylesheet" type="text/css">
0114: <link href="https://mychinodes.org/desb.css" rel="stylesheet" type="text/css">
0115: <script language="JavaScript" type="text/javascript">
0116: 		function deleteNode(id)	{
0117: 			if (!confirm("Are you sure you want to delete this entry?"))	{
0118: 				return;
0119: 			}
0120: 			window.location = "BiggestLoserDelete.asp?id="+id;
0121: 		}
0122: 	</script>
0123: </head>
0124: </head>
0125: 
0126: <body bgcolor="#ffffff">
0127: <table cellspacing="1" border="0" cellpadding="0" width="800" >
0128: <tr>
0129: <td align="left" width="30%"><button class="button-10" onclick="window.open('standings.asp?yr=<%= yr %>&RegNumber=<%= RegNumber %>','main');"><small>Main Contest</big></button></td>
0130: <td align="center" width="30%"><button class="button-10" onclick="window.open('standings2nd.asp?yr=<%= yr %>&RegNumber=<%= RegNumber %>','main');"><small>Sweet 16</big></button></td>
0131: 
0132: <td align="right" width="40%"><button class="button-10" onclick="window.open('mystandings_m.asp?DeskTop=Y&yr=<%= yr %>&RegNumber=<%= RegNumber %>','main');"><small>My Picks & Top 5</big></button></td>
0133: </tr>
0134:  </tr>
0135:  </table>
0136: <table cellspacing="1" border="0" cellpadding="0" width="800">
0137:   <tr>
0138: <% If RegNumber = "" Then %>
0139: 
0140:    <td class="norm" width="43%" align="left"><big><big><b><i>Biggest Losers Contest Standings
0141:    
0142:    </big></td> 
0143:   <td class="norm" width="23%" align="center"><a href="biggestloserstandings.asp?yr=<%= yr %>&RegNumber=<%= MyRegNumber%>">Show My Entries Only</a></td>
0144:   <td class="norm" width="33%" align="right"><big>Year: <% If LastYr >= MaxYearToShow Then %><a href="biggestloserstandings.asp?yr=<%= LastYr %>"><<</a><% End If %> |<b> <%= Yr %></b>
0145:  <%' If Future = "Y" Then %>
0146:  | <a href="biggestloserstandings.asp?yr=<%= NextYr %>">>></a> 
0147:  <%' End If %>
0148:   </big></td> 
0149: <% Else %>
0150:    <td class="norm" width="33%" align="left"><big>big><b><i>Biggest Losers Contest Standings
0151:    </big></td> 
0152:     <td class="norm" width="33%"  align="center"><a href="biggestloserstandings.asp?yr=<%= yr %>">Show Everyone</a>  |  
0153: <a href="biggestloserstandings.asp?yr=<%= yr %>&RegNumber=<%= RegNumber %>&Top5=Y">Include Top 5</a>  
0154:   </td>
0155:   <td class="norm" width="33%" align="right"><big>Year: <a href="biggestloserstandings.asp?yr=<%= LastYr %>&RegNumber=<%= MyRegNumber%>"><<</a> <b><%= Yr %></b>
0156:   <%' If Future = "Y" Then %>
0157:  <a href="biggestloserstandings.asp?yr=<%= NextYr %>&RegNumber=<%= MyRegNumber%>">>></a> 
0158:  <%' End If %> 
0159:   </big></td> 
0160: <% End If %>
0161: </tr>
0162: <tr><td> </td></tr>
0163: </table>
0164: 
0165: <table cellspacing="2" border="0" cellpadding="0" width="800">
0166:   <tr>
0167:     <td width="3%" height="1"><img src="clear.gif" width="1" height="1"></td>
0168:     <td width="20%"><img src="clear.gif" width="1" height="1"></td>
0169:     <td width="16%"><img src="clear.gif" width="1" height="1"></td>
0170:     <td width="4%"><img src="clear.gif" width="1" height="1"></td>
0171:     <td width="5%"><img src="clear.gif" width="1" height="1"></td>
0172:     <td width="3%"><img src="clear.gif" width="1" height="1"></td>
0173:     <td width="9%"><img src="clear.gif" width="1" height="1"></td>
0174:     <td width="3%"><img src="clear.gif" width="1" height="1"></td>
0175:     <td width="9%"><img src="clear.gif" width="1" height="1"></td>
0176:     <td width="3%"><img src="clear.gif" width="1" height="1"></td>
0177:     <td width="9%"><img src="clear.gif" width="1" height="1"></td>
0178:     <td width="3%"><img src="clear.gif" width="1" height="1"></td>
0179:     <td width="9%"><img src="clear.gif" width="1" height="1"></td>
0180:     <td width="3%"><img src="clear.gif" width="1" height="1"></td>
0181:   </tr>
0182: 
0183:     <tr><td class="smalldark" colspan="6">(Sorted by Game Played and Total Points)</td><td class="smalldark" colspan="9" align="right">
0184: <% If yr = Season Then %>	  
0185: 	  Last updated @  <font color="red"><%= STANDINGSUPDATED %></font> (PDT)
0186: <% End If %>
0187: </td></tr>
0188: 
0189:   <tr bgcolor="#ffff99">
0190:     <td width="25"  class="small" align="center">Rnk</td>
0191:     <td width="140" class="small" align="LEFT">Name</td>
0192:     <td width="150" class="small" align="left">City, St</td>
0193: 	<td width="30" class="small" align="center">Games<br>Played</td>
0194:     <td width="30" class="small" align="center">Total<br>Points</td>
0195:     <td width="30" class="small" align="center">Teams<br>Left</td>
0196:     <td width="75" class="small" align="center">#1 Seed</td>
0197:     <td width="25" class="small" align="center">Pts</td>
0198:     <td  width="75" class="small" align="center">#2 Seed</td>
0199:     <td width="25" class="small" align="center">Pts</td>
0200:     <td  width="75" class="small" align="center">#3 Seed</td>
0201:     <td width="25" class="small" align="center">Pts</td>
0202:     <td  width="75" class="small" align="center">#4 Seed</td>
0203:     <td width="30" class="small" align="center">Pts</td>
0204: 
0205: 
0206:   </tr>
0207: <%	bgcolor = "#e8e8e8"
0208: Ranking = 0
0209: 		Do Until rs.EOF
0210: 			ThisRegNumber = rs("RegNumber").Value
0211: 			BLID = rs("ID").Value
0212: 		Ranking = Ranking + 1
0213: 
0214: TotalAmount = ""
0215: 
0216: If Ranking =< 5 Then
0217: 
0218:  
0219:  	Select Case Ranking
0220: 			Case 1
0221: 				TotalAmount = rsp("B1").Value
0222: 			Case 2
0223: 				TotalAmount = rsp("B2").Value
0224: 			Case 3
0225: 				TotalAmount = rsp("B3").Value
0226: 			Case 4
0227: 				TotalAmount = rsp("B4").Value
0228: 			Case 5
0229: 				TotalAmount = rsp("B5").Value
0230: 		End Select
0231: 
0232: End If
0233: 
0234: 			   IF ranking =< 5 then
0235: 		      bgcolor = "#BCF5A9"
0236: 		   Else
0237: 			If bgcolor = "#e8e8e8" Then
0238: 				bgcolor = "#ffffff"
0239: 			Else
0240: 				bgcolor = "#e8e8e8"
0241: 			End If	
0242: 			End If
0243: 			If RegNumber = "" And ThisRegNumber = MyRegNumber Then
0244: 			 bgcolor = "#F5A9D0"
0245: 			End If
0246: 
0247: ' RegNumber = rs("RegNumber").Value
0248: 
0249: 	Set rsEntry = Server.CreateObject("ADODB.Recordset")
0250: 	sqlString = "SELECT * FROM mmEntries " & _
0251: 			"WHERE Season = " & yr & " "  & _
0252: 			"AND RegNumber = '" & ThisRegNumber & "' "  
0253: 	rsEntry.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0254: 	If rsEntry.EOF Then
0255: Name = "???, ??"
0256: CitySt = "???" & BLID
0257: Else
0258: 	lastName = rsEntry("Name").Value
0259: 	firstName = rsEntry("FirstName").Value
0260:     Name = FirstName & " " & LastName
0261: 	CitySt = rsEntry("City").Value & ", " & rsEntry("State").Value
0262: End if
0263: 	rsEntry.Close
0264: 	Set rsEntry = Nothing
0265: 
0266: 
0267: If RegNumber = "" Or ( RegNumber = ThisRegNumber OR ranking <= MaxtoShow ) Then
0268: 
0269: 			%>
0270:   <tr bgcolor="<%= bgcolor %>" height="18">
0271:     <td class="smalldark" align="center"><%= ranking %>
0272: </td>
0273: 
0274:     <td class="Norm" align="left"><a href="biggestloserdisplay.asp?yr=<%= yr %>&RegNumber=<%= rs("RegNumber").Value %>" class="normUndl"><%= Name %></a></td>
0275: 
0276:     <td class="smalldark" align="left"><%= CitySt %>
0277: </td>
0278:     <td class="smalldark" align="center"><b><%= rs("GamesPlayed").Value %></b></td>
0279:     <td class="smalldark" align="center"><b><%= rs("TotalPoints").Value %></b></td>
0280:     <td class="smalldark" align="center"><%= rs("TeamsLeft").Value %></td>
0281:     <td class="smalldark" align="Left"><%= rs("Seed01TeamName").Value %></td>
0282:     <td class="smalldark" align="center"><%= rs("Seed01Points").Value %></td>
0283:     <td class="smalldark" align="Left"><%= rs("Seed02TeamName").Value %></td>
0284:     <td class="smalldark" align="center"><%= rs("Seed02Points").Value %></td>
0285:     <td class="smalldark" align="Left"><%= rs("Seed03TeamName").Value %></td>
0286:     <td class="smalldark" align="center"><%= rs("Seed03Points").Value %></td>
0287:     <td class="smalldark" align="Left"><%= rs("Seed04TeamName").Value %></td>
0288:     <td class="smalldark" align="center"><%= rs("Seed04Points").Value %></td>
0289: <% If yr = Season And SHOWPAYOUTAMOUNT = "YES" Then %>
0290:     <td class="normbold" align="center"><%= TotalAmount %></td>
0291: <% End If %>
0292: <% If user = "jt@folga.org" Then %>
0293:   <td class="smalldark" align="center"><a
0294:         href="javascript:deleteNode('<%= rs("ID").Value %>')" class="smallblueUndl">Del</a></td>
0295: <% End If %>
0296:   </tr>
0297: <%		
0298: 
0299: End If
0300: rs.MoveNext
0301: 		Loop
0302: 		rs.Close
0303: 		Set rs = Nothing	%>
0304: </table>
0305: </body>
0306: </html>