Count Lines in Pages

Contents of Page: DraftParticipantsOrderAssign.asp Number of Lines: 71 Last Modified: 3/3/2023 5:05:33 PM
0001: <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
0002: 
0003: <!-- #include FILE="include/adovbs.inc" -->
0004: <!-- #include FILE="include/constants.inc" -->
0005: <!-- #include FILE="include/funcs.asp" -->
0006: <%
0007: '
0008: ' Remove Old Results
0009: '
0010: GroupID = Request.Querystring("GroupID")
0011: RoundNo = Request.Querystring("RoundNo")
0012: 
0013: If GroupID = "" Then GroupID = 1
0014: If RoundNo = "" Then RoundNo = 6
0015: 
0016: %>
0017: 
0018: <html>
0019: 
0020: <head>
0021: <meta name="viewport" content="width=device-width">
0022: <link href="mm.css" rel="stylesheet" type="text/css">
0023: <title>March Madness - Assign Draft Order</title>
0024: <base target="_self">
0025: </head>
0026: <table cellspacing="1" border="0" cellpadding="2" width="300" >
0027: </tr>
0028: <%
0029: 
0030: 		Set rsd = Server.CreateObject("ADODB.Recordset")
0031: 
0032:     	sqlString = "SELECT * FROM mmdraft WHERE Season = " & Season & " AND GroupID = " & GroupID & " ORDER BY DraftOrder DESC"			
0033: 							
0034: 		rsd.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText
0035: 
0036: 		Do Until rsd.EOF
0037: 		
0038:    		Randomize
0039:    		Randomize
0040: 
0041:         RNumber = Int(Rnd * 20) 
0042: 
0043: 		rsd("Random").Value = RNumber
0044:         
0045: 
0046: 		rsd.MoveNext
0047: 		Loop
0048: 
0049: 	Set rsd = Server.CreateObject("ADODB.Recordset")
0050: 
0051:     	sqlString = "SELECT * FROM mmdraft WHERE Season = " & Season & " AND GroupID = " & GroupID & " ORDER BY Random"				
0052: 							
0053: 		rsd.Open sqlString, conn, adOpenDynamic, adLockOptimistic, adCmdText
0054: 
0055: Order = 0
0056: 
0057: 		Do Until rsd.EOF
0058: 		
0059:    		Order = Order + 1
0060: 
0061: 		rsd("DraftOrder").Value = Order
0062:         
0063: 
0064: 		rsd.MoveNext
0065: 		Loop
0066: 
0067: Response.Redirect("DraftParticipants.asp?GroupID=" & GroupID)
0068: %>		
0069: 
0070: 
0071: