Count Lines in Pages

Contents of Page: whoisinmygroup.asp Number of Lines: 177 Last Modified: 8/22/2018 1:33:27 PM
0001: <% @Language = "VBScript" %>
0002: <!-- #include FILE="include/adovbs.inc" -->
0003: <!-- #include FILE="include/constants.inc" -->
0004: <%
0005: 	user = Request.Cookies("user")	
0006: 	If user = ""  Then Response.Redirect("login.asp?from=whoisinmygroup.asp")
0007: 
0008:    yr = season
0009: 
0010: 	GroupName = Request.QueryString("group")
0011: 	
0012: 	Set rsg = Server.CreateObject("ADODB.Recordset")
0013: 	sqlString = "SELECT * FROM mmEntries " & _
0014: 			"WHERE Season = " & yr & " " & _
0015: 			"AND EmailAddress = '" & user & "'"
0016: 	rsg.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText
0017:     
0018:    groupname1 = rsg("GroupName").Value
0019:    groupname2 = rsg("GroupName2").Value
0020:    groupname3 = rsg("GroupName3").Value   
0021: 
0022: 
0023:     rsg.Close
0024: 	set rsg = Nothing
0025: 
0026: 		If GroupName = "" Then
0027: 		  groupname = groupname1
0028: 	    End If
0029: 
0030: 	OtherGroup = ""
0031: 	If groupname1 <> "DEFAULT"  Then
0032: 	group1 = groupname1
0033: 	End If 
0034: 	If groupname2 <> "DEFAULT"  Then
0035: 	group2 = groupname2
0036: 	End If 
0037: 	If groupname3 <> "DEFAULT"  Then
0038: 	group3 = groupname3
0039: 	End If 
0040:  		
0041: 
0042: 		
0043: 	Set rs = Server.CreateObject("ADODB.Recordset")
0044: 	sqlString = "SELECT * FROM mmEntries " & _
0045: 			"WHERE Season = " & yr & " " & _
0046: 			"AND ( GroupName = '" & groupname & "' "  &  _
0047: 			"OR GroupName2 = '" & groupname & "' " &  _
0048: 			"OR GroupName3 = '" & groupname & "' )"  &  _
0049: 			"ORDER BY Name"
0050: 	rs.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText
0051: 	totreg = 0
0052:    totentries = 0
0053:    totpaid = 0
0054:    totmade = 0
0055: %>
0056: <html>
0057: 
0058: <head>
0059: <title>March Madness - Who is in My Group</title>
0060: <link href="mm.css" rel="stylesheet" type="text/css">
0061: </head>
0062: 
0063: <body bgcolor="#ffffff">
0064: 
0065: <table cellspacing="1" border="0" cellpadding="0" width="600" height="53">
0066:   <tr>
0067:     <td width="600" height="6" colspan="3"><p align="left"><font face="Arial" size="2"><b><img
0068:     src="images/clear.gif" width="1" height="4">People in group: <%= GroupName %></td><td colspan="3" align="right"><font face="Arial" size="2">( <% If Group1 <> "" Then %> <a
0069:     href="Whoisinmygroup.asp?Group=<%= Group1 %>"><%= Group1 %></a> <% End If %> <% If Group2 <> "" Then %> <a
0070:     href="Whoisinmygroup.asp?Group=<%= Group2 %>"><%= Group2 %></a> <% End If %> <% If Group3 <> "" Then %> <a
0071:     href="Whoisinmygroup.asp?Group=<%= Group3 %>"><%= Group3 %></a> <% End If %> )</b></font><font face="Arial"
0072:     size="2">&nbsp;<img src="images/clear.gif" width="1" height="4"></font></td>
0073:   </tr>
0074:   <tr>
0075:     <td width="30"></td>
0076:     <td width="110"><img src="images/clear.gif" width="1" height="2"></td>
0077:     <td width="90"><img src="images/clear.gif" width="1" height="2"></td>
0078:     <td width="150"><img src="images/clear.gif" width="1" height="2"></td>
0079:     <td width="40"><img src="images/clear.gif" width="1" height="2"></td>
0080:     <td width="30"><img src="images/clear.gif" width="1" height="2"></td>
0081: <% If user = "joe@lusogolf.org" Then %>
0082:     <td width="30"><img src="images/clear.gif" width="1" height="2"></td>
0083:     <td width="180"><img src="images/clear.gif" width="1" height="2"></td>
0084:     <td width="30"><img src="images/clear.gif" width="1" height="2"></td>
0085:     <td width="50"><img src="images/clear.gif" width="1" height="2"></td>
0086: <% End If %>
0087:   </tr>
0088:   <tr bgcolor="#577fbe">
0089:     <td class="small" align="center" height="19"></td>
0090:     <td class="small" align="center" height="19">Last Name</td>
0091:     <td class="small" align="center" height="19">First Name</td>
0092:     <td class="small" align="center" height="19">City</td>
0093:     <td class="small" align="center" height="19">St</td>
0094:     <td class="small" align="center" height="19">Entries</td>
0095: <% If user = "joe@lusogolf.org" Then %>
0096:     <td class="small" align="center" height="19">Made</td>
0097:     <td class="small" align="left" height="19">Email Address</td>
0098: <% End If %>
0099: <%	bgcolor = "#e8e8e8"
0100: 		Do Until rs.EOF
0101: 		emailaddr = rs("EmailAddress").value
0102: 			Set rsPicks = Server.CreateObject("ADODB.Recordset")
0103: 	sqlString = "SELECT * FROM mmPicks " & _
0104: 							"WHERE EmailAddress = '" & emailaddr & "' " & _
0105: 							"AND Season = " & season & " " & _
0106: 							"AND Complete = 'Yes'"
0107: 	rsPicks.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0108: 	
0109: 	
0110: 
0111: 	totPicksMade = rsPicks.RecordCount
0112:     rsPicks.Close
0113: 	set rsPicks = Nothing
0114: 		
0115: 			If bgcolor = "#e8e8e8" Then
0116: 				bgcolor = "#ffffff"
0117: 			Else
0118: 				bgcolor = "#e8e8e8"
0119: 			End If
0120: 			val = rs("NumEntries").Value
0121: 			paid = rs("PaidEntries").Value
0122: 			If paid <> "" Then totpaid = totpaid + CInt(paid)
0123: 			totreg = totreg + 1
0124: 			totmade = totmade + totPicksMade
0125: 	%>
0126:   </tr>
0127:   <tr bgcolor="<%= bgcolor %>">
0128:     <td class="smalldark" align="center" height="13"><%= totreg %>
0129: </td>
0130:     <td class="smalldark" align="left" height="13"><%= rs("Name").Value %>
0131: </td>
0132:     <td class="smalldark" align="left" height="13"><%= rs("FirstName").Value %>
0133: </td>
0134:     <td class="smalldark" align="left" height="13"><%= rs("City").Value %>
0135: </td>
0136:     <td class="smalldark" align="left" height="13"><%= rs("State").Value %>
0137: </td>
0138:     <td class="smalldark" align="center" height="13"><%= val %>
0139: </td>
0140: <% If user = "jt@folga.org" Then %>
0141:     <td class="smalldark" align="center" height="13"><%= totPicksMade %>
0142: </td>
0143:     <td class="smalldark" align="left" height="13"><a href="mailto:<%= emailaddr %>"><%= emailaddr %></a></td>
0144:     <td class="smalldark" align="center" height="13"><%= paid %>
0145: </td>
0146:     <td class="smalldark" align="left" height="13"><a
0147:     href="editmmEntries.asp?id=<%= rs("ID").Value %>" class="smallblueUndl"><%= rs("ID").Value %></a></td>
0148: <% End If %>
0149:   </tr>
0150: <%	   totentries = totentries + val
0151: 
0152:       rs.MoveNext
0153: 		Loop
0154: 		If bgcolor = "#e8e8e8" Then
0155: 				bgcolor = "#ffffff"
0156: 			Else
0157: 				bgcolor = "#e8e8e8"
0158: 			End If
0159: 
0160: 		rs.Close
0161: 		Set rs = Nothing	%>
0162:   <tr bgcolor="<%= bgcolor %>">
0163:     <td class="smalldark" align="left" colspan="2" height="13">Total Registered: <%= totreg %> </td>
0164:     <td class="smalldark" align="left" colspan="3" height="13"><p align="right">Total Entries:</td>
0165:     <td class="smalldark" align="center" height="13"><% = totentries %>
0166: </td>
0167: <% If user = "joe@lusogolf.org" Then %>
0168:     <td class="smalldark" align="center" height="13"><% = totmade %>
0169: </td>
0170:     <td class="smalldark" align="left" height="13"><p align="right">Paid Entries:</td>
0171:     <td class="smalldark" align="center" colspan="2" height="13"><% = totpaid %>
0172: </td>
0173: <% End If %>
0174:   </tr>
0175: </table>
0176: </body>
0177: </html>