Count Lines in Pages

Contents of Page: mmmain_bak.asp Number of Lines: 255 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 Charity</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;&nbsp;&nbsp;</font><font color="#0000FF" size="1"><a
0115:     href="whoisin.asp">Who is in it?</a></font><font color="#ffffff" size="2">Sweet 16
0116:     Contest: <font color="#ffffff"><% = BonusSSEntries %> + <%= tot2ndPicks %></font>&nbsp;&nbsp;&nbsp;&nbsp; </font></span></b></td>
0117:     <td VALIGN="TOP" width="515" height="16" colspan="3"><p align="right"><span
0118:     style="font-family:Arial"><b><font size="2" color="#009900">Funds Raised for Cancer
0119:     Research</font><font color="#009900" size="3">:</font><font color="#0000FF" size="3"> $<%= totAmount %>&nbsp;&nbsp;&nbsp;</font><font
0120:     size="2">(Pending:&nbsp;$<%= PendAmt %>)</font></b></span> </td>
0121:   </tr>
0122:   <tr bgcolor="#FFFAF0">
0123:     <td VALIGN="TOP" <% If user = "jt@folga.org" Then %> colspan="2" <% Else %> colspan="4"
0124:     <% End If %> height="16"><p align="center"><font style="font-size: 11pt"><span
0125:     style="font-family: Arial; font-style:italic; font-weight:700">Welcome to the <%= Season %> March
0126:     Madness Contest!</span></font></td>
0127: <% If user = "jt@folga.org" Then %>
0128:     <td VALIGN="TOP" height="16"><p align="right"><b><i><font face="Arial" color="#009900"
0129:     style="font-size: 9pt">Contest Prize Fund:</font><font face="Arial" color="#FF0000"
0130:     style="font-size: 9pt"><br>
0131: <%= PrizeFund %>    / <%= TotCost %></font></i></b></td>
0132:     <td VALIGN="TOP" height="16"><p align="right"><i><b><font face="Arial" color="#009900"
0133:     style="font-size: 9pt">Sweet 16 Prize Fund:<br>
0134:     </font><font face="Arial" color="#FF0000" style="font-size: 9pt"><%= SSFund %> / <%= totssCost %></font></b> </i></td>
0135: <% End If %>
0136:   </tr>
0137:   <tr bgcolor="#FFFAF0">
0138:     <td VALIGN="TOP" colspan="4"><p class="MsoNormal"
0139:     style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:Arial">This
0140:     is a <b>great</b> way enjoy the upcoming NCAA Men&#146;s Basketball Tournament and at the
0141:     same time help raise funds for cancer research!&nbsp; <b><br>
0142:     <br>
0143:     </b>It only takes a <strong>$20 donation</strong> to participate, with <b>$10 </b>being
0144:     donated to the <strong>City of Hope</strong> Medical Center and Research Institute
0145:     and the remainder being distributed amongst the contest winners.&nbsp; This
0146:     contest rewards the top <strong>10%</strong>&nbsp;of all entries with prizes up to <strong>$500
0147:     or more.</strong></span><u2:p></p>
0148:     <p><% If RegOpen = "YES" Then %> </p>
0149:     <p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
0150:     style="font-family: Arial">Participants who submit multiple entries are rewarded with a <i><b>free
0151:     entry</b></i> into the <font color="#008000"><i><b>Sweet 16 Contest</b></i></font>.&nbsp;&nbsp;
0152:     For more information on that, <a href="sweet16details.asp">click here</a>.</span></p>
0153:     <p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
0154:     style="font-family:Arial"><font color="#FF0000"><b>Registration is now open</b></font>.&nbsp;
0155:     Click <a href="signup.asp"><blink><b>here</b></blink></a> to register. You can start
0156:     making your picks after the brackets are announced on <%= SelSunday %>.</span></p>
0157:     <p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><strong><small><p> </p>
0158:     <p><% End If 
0159: If Reg2ndOpen = "YES" Then %> </p>
0160:     <p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
0161:     style="font-family:Arial"><font color="#FF0000"><b>Registration for the <font
0162:     color="#008000">Sweet 16 Contest</font> is now open</b></font>.&nbsp; Click <a
0163:     href="signup.asp"><blink><b>here</b></blink></a> to register. You can start making your
0164:     picks after the field of 16 is set on <%= Sel2ndSunday %>.</span></p>
0165:     <p><% End If %> </p>
0166:     <p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"
0167:     align="center"><span style="font-family:Arial"><b>&nbsp;</b><a href="cohthankyou.htm"
0168:     target="_blank">Click here for a copy of the latest &quot;thank you&quot; note from City
0169:     of Hope.</a></span></td>
0170:   </tr>
0171:   <tr bgcolor="#FFFAF0">
0172:     <td VALIGN="TOP" width="722" height="44" colspan="4"><p align="center">&nbsp; <script
0173:     language="JavaScript1.2">
0174: 
0175: 
0176: 
0177: function setcountdown(theyear,themonth,theday){
0178: yr=theyear;mo=themonth;da=theday
0179: }
0180: 
0181: //////////CONFIGURE THE COUNTDOWN SCRIPT HERE//////////////////
0182: 
0183: //STEP 1: Configure the countdown-to date, in the format year, month, day:
0184: setcountdown(<%= cutoffyear %>,<%= cutoffmonth %>,<%= cutoffday %>)
0185: 
0186: //STEP 2: Change the two text below to reflect the occasion, and message to display on that occasion, respectively
0187: var occasion="<br>register for the contest and/or make your picks."
0188: var message_on_occasion="Good Luck!"
0189: 
0190: //STEP 3: Configure the below 5 variables to set the width, height, background color, and text style of the countdown area
0191: var countdownwidth='518px'
0192: var countdownheight='20px'
0193: var countdownbgcolor='#FED87B'
0194: var opentags='<span style="font-family:Arial"><font size="3"><bold>'
0195: var closetags='</bold></span>'
0196: 
0197: //////////DO NOT EDIT PASS THIS LINE//////////////////
0198: 
0199: var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
0200: 
0201: 
0202: function start_countdown(){
0203: if (document.layers)
0204: document.countdownnsmain.visibility="show"
0205: countdown(2000,1,1)
0206: }
0207: 
0208: if (document.all)
0209: document.write('<span id="countdownie" style="width:'+countdownwidth+'; background-color:'+countdownbgcolor+'"></span>')
0210: 
0211: window.onload=start_countdown
0212: 
0213: 
0214: function countdown(){
0215: var today=new Date()
0216: var todayy=today.getYear()
0217: if (todayy < 1000)
0218: todayy+=1900
0219: var todaym=today.getMonth()
0220: var todayd=today.getDate()
0221: var todayh=today.getHours()
0222: var todaymin=today.getMinutes()
0223: var todaysec=today.getSeconds()
0224: var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec
0225: futurestring=montharray[mo-1]+" "+da+", "+yr+" 9:00:00"
0226: dd=Date.parse(futurestring)-Date.parse(todaystring)
0227: dday=Math.floor(dd/(60*60*1000*24)*1)
0228: dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1)
0229: dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1)
0230: dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1)
0231: if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=1){
0232: if (document.layers){
0233: document.countdownnsmain.document.countdownnssub.document.write(opentags+message_on_occasion+closetags)
0234: document.countdownnsmain.document.countdownnssub.document.close()
0235: }
0236: else if (document.all)
0237: countdownie.innerHTML=opentags+message_on_occasion+closetags
0238: return
0239: }
0240: else{
0241: if (document.layers){
0242: document.countdownnsmain.document.countdownnssub.document.write(opentags+dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds left until "+occasion+closetags)
0243: document.countdownnsmain.document.countdownnssub.document.close()
0244: }
0245: else if (document.all)
0246: countdownie.innerHTML=opentags+"You have "+dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds left to"+occasion+closetags
0247: }
0248: setTimeout("countdown()",1000)
0249: }
0250: </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>
0251:   </tr>
0252: </table>
0253: </center></div>
0254: </body>
0255: </html>