Count Lines in Pages

Contents of Page: top102nd.asp Number of Lines: 244 Last Modified: 8/22/2018 1:33:23 PM
0001: <% @Language = "VBScript" %>
0002: <!-- #include FILE="include/adovbs.inc" -->
0003: <!-- #include FILE="include/constants.inc" -->
0004: <%
0005: 	user = Request.Cookies("user")
0006: 	yr = Request.QueryString("yr")
0007: 	If yr = "" Then yr = season
0008: 	If startmakepicks = "YES" Then
0009: 	If user = "" Then Response.Redirect("login.asp?from=top10.asp")
0010:  
0011:   	Set rsg = Server.CreateObject("ADODB.Recordset")
0012: 	sqlString = "SELECT * FROM mmEntries " & _
0013: 			"WHERE Season = " & yr & " " & _
0014: 			"AND EmailAddress = '" & user & "'"
0015: 	rsg.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText
0016:     
0017: 
0018: 	paid = rsg("PaidEntries").Value
0019: 	firstname = rsg("FirstName").Value
0020: 	ShowStand = rsg("ShowStandings").Value
0021: 	paid2nd = rsg("Paid2ndEntries").Value	
0022: 	
0023: 	rsg.Close
0024: 	set rsg = Nothing
0025: 
0026: 	If paid < 1 and paid2nd < 1 and ShowStand = False Then Response.Redirect("notpaidyet.asp?name=" & firstname)
0027: 
0028:     
0029:     End If
0030: 	
0031: 		
0032: 	Set rsp = Server.CreateObject("ADODB.Recordset")
0033: 	sqlString = "SELECT * FROM mmPrizes " & _
0034: 			"WHERE Season = " & season
0035: 	rsp.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0036: 	
0037: 
0038: 	Set rs = Server.CreateObject("ADODB.Recordset")
0039: 	sqlString = "SELECT * FROM mm2ndTop10" & _
0040: 			" WHERE Season = " & yr & " " & _
0041: 			" ORDER BY ID" 
0042: '   Response.Write(sqlString)			
0043: 	rs.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText
0044: 	totreg = 0
0045:    totentries = 0
0046:    totmade = 0
0047: %>
0048: <html>
0049: 
0050: <head>
0051: <title>March Madness - Sweet 16 Top 10% Standings</title>
0052: <link href="mm.css" rel="stylesheet" type="text/css">
0053: </head>
0054: 
0055: <body bgcolor="#ffffff">
0056: <% 
0057: 
0058: tablewidth = 500
0059: 
0060: If user = "jt@folga.org" Then
0061: tablewidth = 800
0062: End If
0063: 
0064: 
0065: 
0066: 
0067: %>
0068: 
0069: <table cellspacing="1" border="0" cellpadding="0" width="<%= tablewidth %>">
0070:   <tr>
0071:  
0072:     <td width="95%" height="6" colspan="8"><p align="center"><font face="Arial" size="2"><img
0073:     src="clear.gif" width="1" height="4">Total Prize Fund: <% = PrizeFund2nd %><img src="clear.gif" width="1"
0074:     height="4"></font><br>
0075:     <small><font face="Arial" color="#FF0000"><strong><small>** In case of ties (after
0076:     tie-breaker is applied) the corresponding prizes will be split.</small></strong></font></small></td>
0077:   </tr>
0078:   <tr>
0079:     <td width="22"></td>
0080:     <td width="90"><img src="clear.gif" width="1" height="2"></td>
0081:     <td width="100"><img src="clear.gif" width="1" height="2"></td>
0082: <% If user = "jt@folga.org" Then %>
0083:     <td width="49"><img src="clear.gif" width="1" height="2"></td>
0084: <% End If %>
0085:     <td width="39"><img src="clear.gif" width="1" height="2"></td>
0086: <% If user = "jt@folga.org" Then %>
0087:     <td width="45"><img src="clear.gif" width="1" height="2"></td>
0088: <% End If %>
0089:     <td width="31"><img src="clear.gif" width="1" height="2"></td>
0090:     <td width="57"><img src="clear.gif" width="1" height="2"></td>
0091:     <td width="19"><img src="clear.gif" width="1" height="2"></td>
0092:     <td width="33"><img src="clear.gif" width="1" height="2"></td>
0093:   </tr>
0094:   <tr bgcolor="#577fbe">
0095:     <td class="small" align="center" height="19" width="22"></td>
0096: <% If user <> "jt@folga.org" Then %>
0097:     <td class="small" align="center" height="19" width="80">Entry Name</td>
0098:     <td class="small" align="center" height="19" width="90">City</td>
0099:     <td class="small" align="center" height="19" width="30">St</td>
0100: <% Else %>
0101:     <td class="small" align="center" height="19" width="90">Full Name</td>
0102:     <td class="small" align="center" height="19" width="100">Address</td>
0103:     <td class="small" align="center" height="19" width="60">City</td>
0104:     <td class="small" align="center" height="19" width="30">St</td>
0105:     <td class="small" align="center" height="19" width="40">Zip</td>
0106:     <td class="small" align="center" height="19" width="120">Email</td>
0107:     <td class="small" align="center" height="19">PayPal Email</td>
0108: <% End If %>
0109:     <td class="small" align="center" height="19" width="30">PossPts</td>
0110:     <td class="small" align="center" height="19" width="40">Total</td>
0111: 
0112: <%
0113: 	bgcolor = "#e8e8e8"
0114: 	GrandTotal = 0
0115: 		Do Until rs.EOF
0116: 		PicksID = rs("PicksID").value
0117: 			Set rsPicks = Server.CreateObject("ADODB.Recordset")
0118: 			sqlString = "SELECT * FROM mm2ndPicks " & _
0119: 							"WHERE ID = " & PicksID 
0120: 			rsPicks.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0121: 	
0122: 			emailaddr = rspicks("EmailAddress").value
0123: 			EntryName = rspicks("EntryName").Value
0124:  		   rsPicks.Close
0125: 			set rsPicks = Nothing
0126: 			Set rsEntries = Server.CreateObject("ADODB.Recordset")
0127: 			sqlString = "SELECT * FROM mmEntries " & _
0128: 							"WHERE EmailAddress = '" & emailaddr & "' " & _
0129: 							"AND Season = " & season & " " 
0130: 			rsEntries.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0131:    RegNumber = rsEntries("RegNumber").Value
0132:   		AmountDonatedToCOH =rsEntries("AmountDonatedToCOH").Value
0133:   			rsEntries.Close
0134: 			set rsEntries = Nothing
0135: 
0136: 					
0137: 		Set rsm = Server.CreateObject("ADODB.Recordset")
0138: 	sqlString = "SELECT * FROM MY4_Master " & _
0139: 							"WHERE RegNumber = '" & RegNumber & "' " 
0140: 	rsm.Open sqlString, conn2, adOpenDynamic, adLockOptimistic, adCmdText
0141: 	If rsm.EOF Then
0142: 	
0143: 	Else
0144:  			City = rsm("City").Value
0145:  			Address = rsm("Address").Value 			
0146:  			State = rsm("State").Value
0147:           Zip = rsm("Zip").Value
0148:  			FirstName = rsm("FirstName").Value
0149:  			LastName = rsm("LastName").Value
0150: '		AmountDonatedToCOH =rsm("AmountDonatedToCOH").Value
0151:       PayPalEmailAddress = rsm("PayPalEmailAddress").Value
0152:  			FullName = FirstName & " " & LastName
0153: 
0154: 		rsm.Close
0155: 		Set rsm = Nothing	
0156:      End If
0157: 		
0158: 			If bgcolor = "#e8e8e8" Then
0159: 				bgcolor = "#ffffff"
0160: 			Else
0161: 				bgcolor = "#e8e8e8"
0162: 			End If
0163: 
0164: 			totreg = totreg + 1
0165: 	TotalAmount = rs("TotalAmt").Value
0166: If AmountDonatedToCOH > 0 Then	
0167: PayOutAmount = TotalAmount - AmountDonatedToCOH
0168: Else
0169: PayOutAmount = TotalAmount
0170: End If
0171: 
0172: 
0173:  TotalAmount = rsp("STop10").Value
0174:  
0175:  	Select Case totreg
0176: 			Case 1
0177: 				TotalAmount = rsp("S1").Value
0178: 			Case 2
0179: 				TotalAmount = rsp("S2").Value
0180: 			Case 3
0181: 				TotalAmount = rsp("S3").Value
0182: 			Case 4
0183: 				TotalAmount = rsp("S4").Value
0184: 			Case 5
0185: 				TotalAmount = rsp("S5").Value
0186: 		End Select
0187: 
0188: 	%>
0189: <% top5amt = rs("Top5Amt").Value %>
0190:   </tr>
0191:   <tr bgcolor="<%= bgcolor %>">
0192:     <td class="smalldark" align="center" height="13" width="22"><%= totreg %>
0193: </td>
0194: <% If user <> "jt@folga.org" Then %>
0195:     <td class="smalldark" align="left" height="13" width="90"><%= EntryName %>
0196: </td>
0197:     <td class="smalldark" align="left" height="13" width="110"><%= City %>
0198: </td>
0199:     <td class="smalldark" align="left" height="13" width="30"><%= State %>
0200: </td>
0201: <% Else %>
0202:     <td class="smalldark" align="left" height="13" width="110"><%= FullName %>
0203: </td>
0204:     <td class="smalldark" align="left" height="13" width="110"><%= Address %>
0205: </td>
0206:     <td class="smalldark" align="left" height="13" width="80"><%= City %>
0207: </td>
0208:     <td class="smalldark" align="left" height="13" width="30"><%= State %>
0209: </td>
0210:     <td class="smalldark" align="left" height="13" width="40"><%= Zip %>
0211: </td>
0212:     <td class="smalldark" align="left" height="13" width="120"><%= EmailAddr %>
0213: 	    <td class="smalldark" align="left" height="13"><%= PayPalEmailAddress  %>
0214: </td>
0215: <% End If %>
0216:     <td class="smalldark" align="center" height="13" width="30"><%= rs("PossPts").Value %>
0217: </td>
0218: 
0219:     <td class="smalldark" align="right" height="13"><%=  TotalAmount %></td>
0220: 
0221: </td>
0222:   </tr>
0223: <%	  
0224: GrandTotal = GrandTotal + TotalAmount
0225:       rs.MoveNext
0226: 		Loop
0227: 		If bgcolor = "#e8e8e8" Then
0228: 				bgcolor = "#ffffff"
0229: 			Else
0230: 				bgcolor = "#e8e8e8"
0231: 			End If
0232: 
0233: 		rs.Close
0234: 		Set rs = Nothing	%>
0235: 
0236: 
0237: <tr><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td>
0238:     <td class="normbold" align="right" height="13"><%=  GrandTotal %></td>
0239: </tr>
0240: </table>
0241: 
0242: <p>&nbsp;</p>
0243: </body>
0244: </html>