Count Lines in Pages

Contents of Page: MMRegistrationsByDay.asp Number of Lines: 249 Last Modified: 3/11/2026 8:00:08 PM
0001: <% @Language = "VBScript" %>
0002: <!-- #include FILE="include/adovbs.inc" -->
0003: <!-- #include FILE="include/constants.inc" -->
0004: <%
0005: 
0006: 	FiscalYear = Trim(Request.QueryString("FiscalYear"))	
0007: 	If FiscalYear = "" Then
0008: 	   FiscalYear = SQCURRENTYEAR
0009: 	End If
0010: 	FromFiscalYear = Trim(Request.QueryString("FromFiscalYear"))
0011: 	SQCost = Trim(Request.QueryString("SQCost"))
0012: 
0013: 'FromFiscalYear = CInt(FromFiscalYear)
0014: 
0015: Dim Stats(3,5,31)
0016: Dim Months(5)
0017: Months(1) = "Feb"
0018: Months(2) = "Mar"
0019: Months(3) = "???"
0020: 
0021: %>
0022: 
0023: <html>
0024: 
0025: <head>
0026: <link href="mm.css" rel="stylesheet" type="text/css">
0027: <title>March Madness Contest - Registrations by Day</title>
0028: </head>
0029: 
0030: <body bgcolor=""#FFFAF0"">
0031: <table cellspacing="1" border="1" cellpadding="1" width="850" align="left" >
0032: <%
0033: 
0034: 
0035: Set rs = Server.CreateObject("ADODB.Recordset")
0036: 
0037: 	sqlString = "SELECT * FROM mmEntries " & _
0038: 			"WHERE Season > 2021	 ORDER BY Season, DateTimeStamp"
0039: 
0040:   'Response.Write(sqlString & "<br>")							
0041: 	   rs.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0042: 	   
0043: 
0044: %>
0045: 
0046: 
0047: <%	bgcolor = "#ffffff"
0048: 
0049: TotOpenAmt = 0
0050: 
0051: LastSeason = ""
0052: FirstTime = ""
0053: SeasonTotal = 0
0054: 
0055: 		Do Until rs.EOF 
0056: 		    Season = rs("Season").Value
0057: 			If LastSeason = "" Then
0058: 			   LastSeason = Season
0059: 			End If
0060: 			If LastSeason <> Season Then
0061: If FirstTime = "" Then
0062: FirstTime = "X"	
0063: Else
0064: %>
0065: </td></tr>
0066: </table>
0067: <% End If %>
0068: 
0069: <tr><td>
0070: <table cellspacing="1" border="1" cellpadding="1" width="850" align="left" >
0071: <% SelSunday = GetSelSunday(LastSeason)
0072: SelSunday = Cint(SelSunday)
0073: TourneyStart = SelSunday + 5
0074: %>
0075: <tr height="40">
0076: <td class="norm" width="5%"><%= LastSeason %><small>-<%= SelSunday %></td>
0077: 
0078: <% For D = 1 To 31
0079: 
0080: If D = SelSunday Then
0081: Boldit = "<b>"
0082: Else
0083: Boldit = ""
0084: End If
0085: 
0086:  %>
0087: <td class="norm" align="right" width="3%"><%= Boldit %><%= D %></td>
0088: <% Next %>
0089: <td class="norm">Total</td>
0090: </tr>
0091: 
0092: <% 
0093: 
0094: RunningTotal = 0
0095: LateEntries = 0
0096: For M = 1 To 2 %>
0097: 
0098: <TR height="40"><td class="norm"><%= Months(M) %></td>
0099: <%
0100: 
0101: 
0102: 		  For D = 1 To 31
0103: 		  RunningTotal = RunningTotal + Stats(0,M,D)
0104: 		  If Stats(0,M,D) > 0 Then
0105: 		  PRunningTotal = RunningTotal
0106: 		  Else
0107: 		  PRunningTotal = " "
0108: 		  End If
0109: 		  
0110: If D => SelSunday and D <= TourneyStart and Months(M) = "Mar" Then
0111: BoldIt = "<b><big>"
0112: LateEntries = LateEntries + Stats(0,M,D)
0113: Else
0114: BoldIt =  "" 
0115: End if
0116: %>
0117: <td class="norm" align="right"><%= BoldIt %><%= Stats(0,M,D) %><br><%= PRunningTotal %></td>
0118: <%	  Next %>
0119: <td class="norm" align="right"><b><%= Stats(0,M,0) %></td>
0120: </tr>
0121: <% Next %>
0122: 
0123: <% Stats(0,0,0) = Stats(0,0,0) + Stats(0,M,0) %>
0124: <tr>
0125: <% LatePct = (LateEntries * 100 / SeasonTotal) 
0126: LatePct = FormatNumber(LatePct,1)
0127: %>
0128: <td class="norm" colspan="10" align="right">Late Entries: <b><%= LateEntries %></td>
0129: <td class="norm" colspan="10" align="right">Late %: <b><%= LatePct %></b></td>
0130: <td class="norm" colspan="13" align="right">Total Entries: <b><%= SeasonTotal %></td></tr>
0131: <%
0132:  LastSeason = Season
0133:  SeasonTotal = 0
0134:  Erase Stats
0135: End If 
0136: 			
0137: 			DateTimeStamp = rs("DateTimeStamp").Value
0138: 			NumEntries = rs("NumEntries").Value
0139: 			Mo = Month(DateTimeStamp)
0140: 			Dy = Day(DateTimeStamp)
0141: 
0142: 			If Mo = 2 Then
0143: 			  MoPos = 1
0144: 			ElseIf Mo = 3 Then
0145: 			  MoPos = 2
0146: 			Else
0147: 			  MoPos = 3	
0148: 			End If
0149: 
0150: TotSquareCost = TotSquareCost + SquareCost
0151: 
0152: 	'
0153: '	Response.Write(DateTimePosted & "=" & MoPos & "=" & DayPos & "<br>")
0154: 
0155: 	Stats(0,MoPos,DY) = Stats(0,MoPos,DY) + NumEntries
0156: 	Stats(0,MoPos,0) = Stats(0,MoPos,0) + NumEntries
0157: SeasonTotal = SeasonTotal + NumEntries
0158: 		rs.MoveNext
0159: 		Loop
0160:        
0161: 		rs.Close
0162: 		Set rs = Nothing
0163: 		
0164: %>		
0165: 
0166: </table>
0167: </td></tr>
0168: <tr><td>
0169: <table cellspacing="1" border="1" cellpadding="1" width="850" align="left" >
0170: 
0171: <tr height="40">
0172: <% SelSunday = GetSelSunday(LastSeason) %>
0173: <td class="norm" width="5%"><%= LastSeason %><small>-<%= SelSunday %></td>
0174: <%
0175: SelSunday = Cint(SelSunday)
0176: TourneyStart = SelSunday + 5
0177:  For D = 1 To 31 
0178: 
0179: If D = SelSunday Then
0180: Boldit = "<b>"
0181: Else
0182: Boldit = ""
0183: End If
0184: 
0185: %>
0186: <td class="norm" align="right" width="3%"><%= Boldit %><%= D %></td>
0187: <% Next %>
0188: <td class="norm">Total</td>
0189: </tr>
0190: 
0191: <% 
0192: 
0193: 
0194: RunningTotal = 0
0195: LateEntries = 0
0196: For M = 1 To 2 %>
0197: 
0198: <TR height="40"><td class="norm"><%= Months(M) %></td>
0199: <%
0200: 		  For D = 1 To 31
0201: 	
0202: RunningTotal = RunningTotal + Stats(0,M,D)	
0203: 		  If Stats(0,M,D) > 0 Then
0204: 		  PRunningTotal = RunningTotal
0205: 		  Else
0206: 		  PRunningTotal = " "
0207: 		  End If  
0208: If D => SelSunday and D <= TourneyStart and Months(M) = "Mar" Then
0209: BoldIt = "<b><big>"
0210: LateEntries = LateEntries + Stats(0,M,D)
0211: Else
0212: BoldIt =  "" 
0213: End if		  
0214: 		  
0215: %>
0216: <td class="norm" align="right"><%= BoldIt %><%= Stats(0,M,D) %><br><%= PRunningTotal %></td>
0217: <%	  Next %>
0218: <td class="norm" align="right"><b><%= Stats(0,M,0) %></td>
0219: </tr>
0220: <%	  Next %>
0221: 
0222: <% Stats(0,0,0) = Stats(0,0,0) + Stats(0,M,0) %>
0223: <% LatePct = (LateEntries * 100 / SeasonTotal) 
0224: LatePct = FormatNumber(LatePct,1)
0225: %>
0226: <tr>
0227: <td class="norm" colspan="10" align="right">Late Entries: <b><%= LateEntries %></td>
0228: <td class="norm" colspan="10" align="right">Late %: <b><%= LatePct %></b></td>
0229: <td class="norm" colspan="13" align="right">Total Entries: <b><%= SeasonTotal %></td></tr>
0230: 
0231: 
0232: </table>
0233: <table cellspacing="1" border="0" cellpadding="0" width="850" align="left" height="50">
0234: <tr height="20"><td height="20">&nbsp<br>&nbsp;.</td></tr>
0235: </table>
0236: </body>
0237: 
0238: </html>
0239: <% 
0240: Function GetSelSunday(season)
0241: 	Set rsTemp= Server.CreateObject("ADODB.Recordset")
0242: 	sqlString = "SELECT * FROM mmPrizes " & _
0243: 			"WHERE Season = " & season
0244: 	rsTemp.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0245: 	GetSelSunday = rsTemp("SelSunday").Value
0246: 	rsTemp.Close
0247: 	Set rsTemp = Nothing
0248: End Function
0249: %>