Count Lines in Pages

Contents of Page: mmmain.aspo Number of Lines: 257 Last Modified: 8/22/2018 1:32:54 PM
0001: <% @Language = "VBScript" %>
0002: <!-- #include FILE="include/adovbs.inc" -->
0003: <!-- #include FILE="include/constants.inc" -->
0004: <%
0005: 	Set rs = Server.CreateObject("ADODB.Recordset")
0006: 	sqlString = "SELECT * FROM mmEntries WHERE Season = " & season
0007: 	rs.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0008: 	totEntries = rs.RecordCount
0009: 	paidentries = 0
0010: 	totCost = 0
0011: 	totssCost = 0	
0012: 	pending = 0
0013: 	pendentries = 0
0014: 	totSEntries = 0
0015: 	NoS16Entry = 0
0016: 	NbrParticipants = 0
0017: 	Do Until Rs.EOF
0018: 
0019: 	npks = Cint(rs("NumEntries").Value)
0020: 	If npks > 0 then
0021: 	NbrParticipants = NbrParticipants + 1
0022: 	totSEntries = totSEntries + 1
0023: 	End If
0024: 	If npks = 1 then
0025: 	NoS16Entry = NoS16Entry + 1
0026: 	End If	
0027: 	IF Season > 2006 Then
0028:     nsspks = Cint(rs("Num2ndEntries").Value)
0029:     End If
0030: 	paid = rs("PaidEntries").Value
0031: 	PayPalUsed = rs("PayPalUsed").Value	
0032: 	paid2nd = rs("Paid2ndEntries").Value
0033: 	BonusSS = npks - 1	
0034: 	If BonusSS < 0 Then BonusSS = 0
0035: 	TotBonusSS = TotBonusSS + BonusSS
0036: '	 Response.Write(totSEntries & "=" & TotBonusSS & "-" & BonusSS & "-" & npks & "-" & rs("EmailAddress").Value & "<br>")
0037: 	If paid <> "" Then paid = CInt(paid)
0038: 	totPicks = totPicks + npks
0039: 	tot2ndPicks = tot2ndPicks + nsspks
0040: 	If paid > 0 Then
0041: 	   paidentries = paidentries + paid
0042: 	Else
0043: 	   pendentries = pendentries + 1
0044: 	End If
0045: 	totsspks = totsspks + nsspks
0046: 	
0047: 	If PayPalUsed = True Then
0048:     	singlesscost = .30 + (( 20 * nsspks ) * .029 )
0049: 	    If Season < 2007 Then
0050: 	       singlecost = .30 + (( 20 + ( BonusSS * 15 )) * .029 )
0051: 	    Else
0052: 	       singlecost = .30 + (( 20 * npks ) * .029 )
0053: 	    End If
0054: 	    totCost = totCost + singlecost
0055: 	    totssCost = totssCost + singlesscost	
0056: 	End If
0057:     rs.MoveNext
0058: 		Loop
0059: 	rs.Close
0060: 	Set rs = Nothing
0061:    totCost = Cint(totCost)
0062:    totssCost = Cint(TotssCost)
0063:    BonusSSEntries = totPicks - totSEntries
0064: 
0065:    cutoffyear = season
0066:    cutoffmonth = Mid(cutoffdate,1,2)
0067:    cutoffday   = Mid(cutoffdate,4,2)	
0068:    
0069:    
0070: '	 Response.Write(TotBonusSS & "-" & totSentries & "-" & totpicks & "<br>")
0071: 	pending =  totPicks - paidentries
0072: 	SSFund = TotBonusSS * 5 + ( totsspks * 10 ) 
0073: 	PrizeFund = ( totPicks * 10 ) - SSFund 
0074: 	PrizeFund = ( totSentries * 10 ) + ( ( totPicks - totSentries ) * 5 )
0075: 	PrizeFund =  Cint(PrizeFund)
0076: 	totAmount = totPicks * 10
0077: '	totAmount = totPicks * 15
0078: '	totAmount = totAmount + (totEntries * 5)
0079: '	totAmount = Cint(totAmount / 2)
0080: 	
0081: '	PendAmt = pending * 15
0082: '	PendAmt = PendAmt + (pendentries * 5)
0083: '	PendAmt = Cint(PendAmt / 2)
0084:    PendAmt = pending * 10
0085: 
0086: %>
0087: <html>
0088: 
0089: <head><script language="JavaScript">
0090: 		function COHThankYou()
0091: 		{
0092: 			x = 640;
0093: 			y = 850;
0094: 			var xpos = (screen.width - x)/2;
0095: 			var ypos = (screen.height - y)/2;
0096: 			var updateasp = "cohthankyou2006.htm";
0097: 			var w;
0098: 			w = window.open(updateasp,'update','width='+x+',height='+y+',top='+ypos+',left='+xpos);
0099: 		}	
0100: 	</script>
0101: 
0102: <title>Joe Toledo's March Madness Contest - Benefiting Be Perfect Foundation</title>
0103: <base target="_self">
0104: </head>
0105: 
0106: <body bgcolor="#ffffff">
0107: <div align="center"><center>
0108: 
0109: <table cellspacing="0" border="1" cellpadding="5" width="100%" bordercolor="#FED87B"
0110: align="center" height="364">
0111:   <tr>
0112:     <td VALIGN="TOP" height="16"><b><span style="font-family:Arial"><font color="#FF0000"
0113:     size="1"># of Participants / Entries to Date:</font><font color="#0000FF" size="3">&nbsp;<%= NbrParticipants %>
0114:     / <%= totPicks %>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000FF" size="1.5"><a
0115:     href="whoisin.asp">Who is in it?</a>
0116: <% If user = "jt@folga.org" Then %>
0117: &nbsp;&nbsp;<a href="whoisdeadbeat.asp"><b>Dead Beats</b></a></font>
0118: <% End If %>
0119: </span></b></td>
0120:     <td VALIGN="TOP" width="515" height="16" colspan="3"><p align="right"><span
0121:     style="font-family:Arial"><b><font size="2" color="#009900">Funds Raised for Kody Peraita</font><font color="#009900" size="3">:</font><font color="#0000FF" size="3"> $<%= totAmount %>&nbsp;&nbsp;&nbsp;</font><font
0122:     size="2">(Pending:&nbsp;$<%= PendAmt %>)</font></b></span> </td>
0123:   </tr>
0124:   <tr bgcolor="#FFFAF0">
0125:     <td VALIGN="TOP" <% If user = "jt@folga.org" Then %> colspan="2" <% Else %> colspan="4"
0126:     <% End If %> height="16"><p align="center"><font style="font-size: 11pt"><span
0127:     style="font-family: Arial; font-style:italic; font-weight:700">Welcome to the <%= Season %> March
0128:     Madness Contest!</span></font></td>
0129: <% If user = "jt@folga.org" Then %>
0130:     <td VALIGN="TOP" height="16"><p align="right"><b><i><font face="Arial" color="#009900"
0131:     style="font-size: 9pt">Contest Prize Fund:</font><font face="Arial" color="#FF0000"
0132:     style="font-size: 9pt"><br>
0133: <%= PrizeFund %>    / <%= TotCost %></font></i></b></td>
0134:     <td VALIGN="TOP" height="16"><p align="right"><i><b><font face="Arial" color="#009900"
0135:     style="font-size: 9pt">Sweet 16 Prize Fund:<br>
0136:     </font><font face="Arial" color="#FF0000" style="font-size: 9pt"><%= SSFund %> / <%= totssCost %></font></b> </i></td>
0137: <% End If %>
0138:   </tr>
0139:   <tr bgcolor="#FFFAF0">
0140:     <td VALIGN="TOP" colspan="4"><p class="MsoNormal"
0141:     style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:Arial">This
0142:     is a <b>great</b> way enjoy the upcoming NCAA Men&#146;s Basketball Tournament and at the
0143:     same time help raise funds for cancer research!&nbsp; <b><br>
0144:     <br>
0145:     </b>It only takes a <strong>$20 donation</strong> to participate, with <b>$10 </b>being
0146:     donated to the <strong>Be Perfect Foundation</strong>, Project Walk to benefit Kodi Peraita and the
0147:     remainder being distributed amongst the contest winners.&nbsp; This contest rewards the
0148:     top <strong>10%</strong>&nbsp;of all entries with prizes up to <strong>$500 or more.</strong></span><u2:p></p>
0149:     <p><% If RegOpen = "YES" Then %> </p>
0150:     <p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
0151:     style="font-family: Arial">Participants who submit multiple entries are rewarded with a <i><b>free
0152:     entry</b></i> into the <font color="#008000"><i><b>Sweet 16 Contest</b></i></font>.&nbsp;&nbsp;
0153:     For more information on that, <a href="sweet16details.asp">click here</a>.</span></p>
0154:     <p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
0155:     style="font-family: Arial">Also included is the unique &quot;<strong>Biggest Losers</strong>&quot;
0156:     contest, where participants get to pick the worst 16 teams (by seed) in the field of this
0157:     year's NCAA tournament. &nbsp; This contest is included with registration (no additional
0158:     cost) giving participants up to 3 chances of winning!</span></p>
0159:     <p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
0160:     style="font-family:Arial"><font color="#FF0000"><b>Registration is now open</b></font>.&nbsp;
0161:     Click <a href="signup.asp"><blink><b>here</b></blink></a> to register. You can start
0162:     making your picks after the brackets are announced on <%= SelSunday %>.</span></p>
0163:     <strong><small><p><% End If 
0164: If Reg2ndOpen = "YES" Then %> </p>
0165:     <p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
0166:     style="font-family:Arial"><font color="#FF0000"><b>Registration for the <font
0167:     color="#008000">Sweet 16 Contest</font> is now open</b></font>.&nbsp; Click <a
0168:     href="signup.asp"><blink><b>here</b></blink></a> to register. You can start making your
0169:     picks after the field of 16 is set on <%= Sel2ndSunday %>.</span></p>
0170:     <p><% End If %> </p>
0171: 
0172:   </tr>
0173:   <tr bgcolor="#FFFAF0">
0174:     <td VALIGN="TOP" width="722" height="44" colspan="4"><p align="center">&nbsp; <script
0175:     language="JavaScript1.2">
0176: 
0177: 
0178: 
0179: function setcountdown(theyear,themonth,theday){
0180: yr=theyear;mo=themonth;da=theday
0181: }
0182: 
0183: //////////CONFIGURE THE COUNTDOWN SCRIPT HERE//////////////////
0184: 
0185: //STEP 1: Configure the countdown-to date, in the format year, month, day:
0186: setcountdown(<%= cutoffyear %>,<%= cutoffmonth %>,<%= cutoffday %>)
0187: 
0188: //STEP 2: Change the two text below to reflect the occasion, and message to display on that occasion, respectively
0189: var occasion="<br>register for the contest and/or make your picks."
0190: var message_on_occasion="Good Luck!"
0191: 
0192: //STEP 3: Configure the below 5 variables to set the width, height, background color, and text style of the countdown area
0193: var countdownwidth='518px'
0194: var countdownheight='20px'
0195: var countdownbgcolor='#FED87B'
0196: var opentags='<span style="font-family:Arial"><font size="3"><bold>'
0197: var closetags='</bold></span>'
0198: 
0199: //////////DO NOT EDIT PASS THIS LINE//////////////////
0200: 
0201: var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
0202: 
0203: 
0204: function start_countdown(){
0205: if (document.layers)
0206: document.countdownnsmain.visibility="show"
0207: countdown(2000,1,1)
0208: }
0209: 
0210: if (document.all)
0211: document.write('<span id="countdownie" style="width:'+countdownwidth+'; background-color:'+countdownbgcolor+'"></span>')
0212: 
0213: window.onload=start_countdown
0214: 
0215: 
0216: function countdown(){
0217: var today=new Date()
0218: var todayy=today.getYear()
0219: if (todayy < 1000)
0220: todayy+=1900
0221: var todaym=today.getMonth()
0222: var todayd=today.getDate()
0223: var todayh=today.getHours()
0224: var todaymin=today.getMinutes()
0225: var todaysec=today.getSeconds()
0226: var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec
0227: futurestring=montharray[mo-1]+" "+da+", "+yr+" 9:00:00"
0228: dd=Date.parse(futurestring)-Date.parse(todaystring)
0229: dday=Math.floor(dd/(60*60*1000*24)*1)
0230: dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1)
0231: dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1)
0232: dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1)
0233: if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=1){
0234: if (document.layers){
0235: document.countdownnsmain.document.countdownnssub.document.write(opentags+message_on_occasion+closetags)
0236: document.countdownnsmain.document.countdownnssub.document.close()
0237: }
0238: else if (document.all)
0239: countdownie.innerHTML=opentags+message_on_occasion+closetags
0240: return
0241: }
0242: else{
0243: if (document.layers){
0244: document.countdownnsmain.document.countdownnssub.document.write(opentags+dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds left until "+occasion+closetags)
0245: document.countdownnsmain.document.countdownnssub.document.close()
0246: }
0247: else if (document.all)
0248: countdownie.innerHTML=opentags+"You have "+dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds left to"+occasion+closetags
0249: }
0250: setTimeout("countdown()",1000)
0251: }
0252: </script> <ilayer id="countdownnsmain" width="&amp;{countdownwidth};" height="&amp;{countdownheight};" bgColor="&amp;{countdownbgcolor};" visibility="hide"> <layer id="countdownnssub" width="&amp;{countdownwidth};" height="&amp;{countdownheight};" left="0" top="0"></layer></ilayer> </td>
0253:   </tr>
0254: </table>
0255: </center></div>
0256: </body>
0257: </html>