<% Domain = Request.ServerVariables("server_name") if lcase(Domain) = "www.avath.com" then URL = Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL") & "?" & Request.Querystring URL = Replace(url,"www.avath.com","http://www.coasthillsevents.com") Response.Redirect url end if raceid = request.querystring("raceid") if raceid = 1 then Club = "Ardor Adventures" raceid = 1 EventName = "2013 Spring Trail Series" elseif raceid = 2 then Club = "Ardor Adventures" raceid = 2 EventName = "2015 Spring Trail Series" elseif raceid = 3 then Club = "Ardor Adventures" raceid = 3 EventName = "2015 Summer Trail Series" elseif raceid = 4 then Club = "Ardor Adventures" raceid = 4 EventName = "2015 Fall Trail Series" elseif raceid = 5 then Club = "Ardor Adventures" raceid = 5 EventName = "2016 Spring Trail Series" elseif raceid = 6 then Club = "Ardor Adventures" raceid = 6 EventName = "2016 Summer Trail Series" elseif raceid = 7 then Club = "Ardor Adventures" raceid = 7 EventName = "2017 Spring Trail Series" end if AgeGroup = request.querystring("AgeGroup") Bib = trim(request.querystring("bib")) fname = trim(request.querystring("fname")) lname = trim(request.querystring("lname")) If bib <> "" then Bib = " And Bib='" & Bib & "'" end if if fname <> "" then fname = " And fname='" & fname & "'" end if if lname <> "" then lname = " And lname='" & lname & "'" end if if AgeGroup <> "All" then IF AgeGroup = "M" or AgeGroup = "F" then AgeGroup = " And Gender = '" & AgeGroup & "'" Else AgeGroup = " And AgeGroup='" & AgeGroup & "'" end if else AgeGroup = "" end if strSQL = "Select * from series where eventid=" & RaceID & AgeGroup &_ " order by gender desc, case when OverAllSeriesPoints is null then 1 else 0 end, OverAllseriesPoints desc;" 'response.write strsql 'should be added according to what you would like displayed) chedsn = Application("dbCon") SET cn = Server.CreateObject("ADODB.Connection") 'set up the 'ADO connection cn.Open CHEDSN 'open the connection to 'the database, using DSN - set up the DSN in your control panel SET oRs = cn.Execute(strSQL) 'Execute the SQL statement %>
Number First Last
Select Group
<% DO WHILE NOT oRs.EOF 'on error resume next %> <% oRs.MoveNext Loop %>
Name City Age Group Overall Series Points Completed Race 1 Race 2 Race 3 Race 4 Race 5
<% = trim(oRs.Fields("FName")) & " " & trim(oRs.Fields("LName")) %> <% = trim(oRs.Fields("City")) & ", " & oRs("State") %> <% = oRs.Fields("Age") %> <% = oRs.Fields("AgeGroup") %> <% = oRs.Fields("OverallSeriesPoints") %> <% = oRs.Fields("Completed") %> <% = oRs("Race1") %> <% = oRs.Fields("Race2") %> <% = oRs.Fields("Race3")%> <% = oRs.Fields("Race4")%> <% = oRs.Fields("Race5")%>
<% cn.Close 'Close the database connection SET cn = Nothing 'Clean up after yourself Function convertTime(seconds) ConvSec = seconds mod 60 IF Len(ConvSec) = 1 Then ConvSec = "0" & ConvSec End If ConvMin = (seconds mod 3600) \ 60 IF Len(ConvMin) = 1 Then ConvMin = "0" & ConvMin End If ConvHour = seconds \ 3600 IF Len(ConvHour) = 1 Then ConvHour = "0" & ConvHour End If myTime = ConvHour & ":" & ConvMin & ":" & ConvSec If left(myTime,2)="00" then convertTime = right(myTime,5) else convertTime = myTime end if end Function Function SecondsToTime(intSeconds) Dim hours, minutes, seconds ' calculates whole hours (like a div operator) if intSeconds > 0 then hours = intSeconds \ 3600 ' calculates the remaining number of seconds intSeconds = intSeconds Mod 3600 ' calculates the whole number of minutes in the remaining number of seconds minutes = intSeconds \ 60 ' calculates the remaining number of seconds after taking the number of minutes seconds = intSeconds Mod 60 ' returns as a string myTime = hours & ":" & minutes & ":" & seconds End if End Function %>