Count Lines in Pages

Contents of Page: roadcurrstandingpost.asp Number of Lines: 74 Last Modified: 8/22/2018 1:33:14 PM
0001: <% @Language = "VBScript" %>
0002: 
0003: <!-- #include FILE="include/adovbs.inc" -->
0004: <!-- #include FILE="include/constants.inc" -->
0005: 
0006: <%
0007: 
0008:        FieldName = Trim(Request.Form("CurrRound"))      
0009:        Yr = Trim(Request.Form("Season"))
0010:        
0011: 		Set rs = Server.CreateObject("ADODB.Recordset")
0012: 		sqlString = "SELECT * FROM mmStandings " & _
0013: 								"WHERE Season = " & yr & " " 
0014: 								
0015: 		rs.Open sqlString, conn, adOpenStatic, adLockReadOnly, adCmdText
0016: 
0017: 		Do Until rs.EOF
0018:         	rank = rs("Rank").Value
0019:         	PicksID = rs("PicksID").Value
0020:        	
0021:         	Set rsPicks = Server.CreateObject("ADODB.Recordset")
0022:         	sqlString = "SELECT * FROM mmPicks " & _
0023: 							"WHERE ID = " & PicksID 
0024: 
0025: 
0026:   	
0027:         	rsPicks.Open sqlString, conn, adDynamic, adLockOptimistic, adCmdText
0028:         	
0029:         	RCPoints = 0
0030:         	
0031:         	F32Rank = rsPicks("F32S").Value
0032:         	F16Rank = rsPicks("F16S").Value
0033:         	F8Rank = rsPicks("F8S").Value
0034:         	F4Rank = rsPicks("F4S").Value
0035:         	F2Rank = rsPicks("F2S").Value
0036:         	F1Rank = rsPicks("F1S").Value         	
0037:         	Select Case FieldName
0038:         	       Case "F32S"
0039:         	             RCPoints = 0
0040:         	       Case "F16S"
0041:         	             RCPoints = Abs(F32Rank - rank)
0042:         	       Case "F8S"
0043:         	             RCPoints = Abs(F32Rank - F16Rank)
0044:         	             RCPoints = RCPoints + Abs(F16Rank - rank)
0045:         	       Case "F4S"
0046:         	             RCPoints = Abs(F32Rank - F16Rank)
0047:         	             RCPoints = RCPoints + Abs(F16Rank - F8Rank)
0048:         	             RCPoints = RCPoints + Abs(F8Rank - rank)
0049:         	        Case "F2S"
0050:         	             RCPoints = Abs(F32Rank - F16Rank)
0051:         	             RCPoints = RCPoints + Abs(F16Rank - F8Rank)
0052:         	             RCPoints = RCPoints + Abs(F8Rank - F4Rank) 
0053:         	             RCPoints = RCPoints + Abs(F4Rank - rank)        	                    	        
0054:         	       Case "F1S"
0055:         	             RCPoints = Abs(F32Rank - F16Rank)
0056:         	             RCPoints = RCPoints + Abs(F16Rank - F8Rank)
0057:         	             RCPoints = RCPoints + Abs(F8Rank - F4Rank) 
0058:         	             RCPoints = RCPoints + Abs(F4Rank - F2Rank)  
0059:         	             RCPoints = RCPoints + Abs(F2Rank - rank)         	             
0060:         	End Select      
0061:             rsPicks(FieldName).Value = rank
0062:             rsPicks("CurrPos").Value = rank
0063:             rsPicks("RCPoints").Value = RCPoints
0064:             rsPicks.Update
0065: 		    rsPicks.Close
0066: 		    Set rsPicks = Nothing
0067: 		rs.MoveNext
0068: 		Loop
0069: 		
0070: 		rs.Close
0071: 		Set rs = Nothing		   
0072: 		   
0073:         Response.Write("Update Completed.")		   
0074: 		%>