Count Lines in Pages

Contents of Page: top10BL.asp Number of Lines: 233 Last Modified: 8/22/2018 1:33:22 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: 		Set rsp = Server.CreateObject("ADODB.Recordset")
0032: 	sqlString = "SELECT * FROM mmPrizes " & _
0033: 			"WHERE Season = " & season
0034: 	rsp.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0035: 
0036: 	
0037: 	
0038: 	
0039: 
0040: 	Set rs = Server.CreateObject("ADODB.Recordset")
0041: 	sqlString = "SELECT * FROM mmBLTop10" & _
0042: 			" WHERE Season = " & yr & " " & _
0043: 			" ORDER BY Top5Amt DESC" 
0044: '   Response.Write(sqlString)			
0045: 	rs.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText
0046: 	totreg = 0
0047:    totentries = 0
0048:    totmade = 0
0049: %>
0050: <html>
0051: 
0052: <head>
0053: <title>March Madness - Bigges Losers Top 5 Standings</title>
0054: <link href="mm.css" rel="stylesheet" type="text/css">
0055: </head>
0056: 
0057: <body bgcolor="#ffffff">
0058: <% 
0059: 
0060: tablewidth = 500
0061: 
0062: If user = "jt@folga.org" Then
0063: tablewidth = 800
0064: End If
0065: 
0066: 
0067: 
0068: 
0069: %>
0070: 
0071: <table cellspacing="1" border="0" cellpadding="0" width="<%= tablewidth %>" >
0072:   <tr>
0073:  
0074:     <td width="95%" height="6" colspan="5">
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">Top 5</td>
0110: 
0111: <%	bgcolor = "#e8e8e8"
0112: 	GrandTotal = 0
0113: 		Do Until rs.EOF
0114: 		RegNumber = rs("RegNumber").value
0115: 		Set rsm = Server.CreateObject("ADODB.Recordset")
0116: 	sqlString = "SELECT * FROM MY4_Master " & _
0117: 							"WHERE RegNumber = '" & RegNumber & "' " 
0118: 	rsm.Open sqlString, conn2, adOpenDynamic, adLockOptimistic, adCmdText
0119: 	If rsm.EOF Then
0120: 	
0121: 	Else
0122:  			City = rsm("City").Value
0123:  			Address = rsm("Address").Value 			
0124:  			State = rsm("State").Value
0125:           Zip = rsm("Zip").Value
0126:  			FirstName = rsm("FirstName").Value
0127:  			LastName = rsm("LastName").Value
0128: '		AmountDonatedToCOH =rsm("AmountDonatedToCOH").Value
0129:          EmailAddress = rsm("EmailAddress").Value
0130:           PayPalEmailAddress = rsm("PayPalEmailAddress").Value
0131:  			FullName = FirstName & " " & LastName
0132: 
0133: 		rsm.Close
0134: 		Set rsm = Nothing	
0135:     End If
0136: 
0137: 				Set rsEntries = Server.CreateObject("ADODB.Recordset")
0138: 			sqlString = "SELECT * FROM mmEntries " & _
0139: 							"WHERE RegNumber = '" & RegNumber & "' " & _
0140: 							"AND Season = " & season & " " 
0141: 			rsEntries.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0142:   		AmountDonatedToCOH =rsEntries("AmountDonatedToCOH").Value
0143:   			rsEntries.Close
0144: 			set rsEntries = Nothing
0145: 		
0146: 			If bgcolor = "#e8e8e8" Then
0147: 				bgcolor = "#ffffff"
0148: 			Else
0149: 				bgcolor = "#e8e8e8"
0150: 			End If
0151: 
0152: 			totreg = totreg + 1
0153: 	TotalAmount = rs("Top5Amt").Value
0154: If AmountDonatedToCOH > 0 Then	
0155: PayOutAmount = TotalAmount - AmountDonatedToCOH
0156: Else
0157: PayOutAmount = TotalAmount
0158: End If	
0159: 	%>
0160: <% top5amt = rs("Top5Amt").Value
0161: 
0162:  
0163:  	Select Case totreg
0164: 			Case 1
0165: 				TotalAmount = rsp("B1").Value
0166: 			Case 2
0167: 				TotalAmount = rsp("B2").Value
0168: 			Case 3
0169: 				TotalAmount = rsp("B3").Value
0170: 			Case 4
0171: 				TotalAmount = rsp("B4").Value
0172: 			Case 5
0173: 				TotalAmount = rsp("B5").Value
0174: 		End Select
0175: 
0176: 
0177: %>
0178:   </tr>
0179:   <tr bgcolor="<%= bgcolor %>">
0180:     <td class="smalldark" align="center" height="13" width="22"><%= totreg %>
0181: </td>
0182: <% If user <> "jt@folga.org" Then %>
0183:     <td class="smalldark" align="left" height="13" width="90"><%= FullName %>
0184: </td>
0185:     <td class="smalldark" align="left" height="13" width="110"><%= City %>
0186: </td>
0187:     <td class="smalldark" align="left" height="13" width="30"><%= State %>
0188: </td>
0189: <% Else %>
0190:     <td class="smalldark" align="left" height="13" width="110"><%= FullName %>
0191: </td>
0192:     <td class="smalldark" align="left" height="13" width="110"><%= Address %>
0193: </td>
0194:     <td class="smalldark" align="left" height="13" width="80"><%= City %>
0195: </td>
0196:     <td class="smalldark" align="left" height="13" width="30"><%= State %>
0197: </td>
0198:     <td class="smalldark" align="left" height="13" width="40"><%= Zip %>
0199: </td>
0200:     <td class="smalldark" align="left" height="13" width="120"><%= EmailAddress %>
0201: 	    <td class="smalldark" align="left" height="13"><%= PayPalEmailAddress  %>
0202: </td>
0203: <% End If %>
0204: </td>
0205: 
0206:     <td class="smalldark" align="right" height="13" width="30"><%= TotalAmount %>
0207: 	<td></td><td></td>
0208: 
0209: </td>
0210:   </tr>
0211: <%	  
0212: GrandTotal = GrandTotal + TotalAmount
0213:       rs.MoveNext
0214: 		Loop
0215: 		If bgcolor = "#e8e8e8" Then
0216: 				bgcolor = "#ffffff"
0217: 			Else
0218: 				bgcolor = "#e8e8e8"
0219: 			End If
0220: 
0221: 		rs.Close
0222: 		Set rs = Nothing	
0223:  If user = "jt@folga.org" Then 	
0224: 		%>
0225: <tr><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td>
0226:     <td class="normbold" align="right" height="13"><%=  GrandTotal %></td>
0227: </tr>
0228: <% End If %>
0229: </table>
0230: 
0231: <p>&nbsp;</p>
0232: </body>
0233: </html>