%@ LANGUAGE="VBSCRIPT" %>
<%
Dim sRegType, sRegTypeDesc, sItemType, sOrderBy, sDay, sMonthNum, sNow_yymmdd, sAction, sItemID
Dim sSQL
Dim iCounter
Dim bVCMAdmin
def_font = ""
' Get SFTC logon status
get_SFTCUser username, logon_status, userid
bVCMAdmin = HasRole(userID, "VCM_ADMIN")
ConnToSFTC DBConn
If (NOT IsObject(DBConn)) Then
Response.Write " Virginia Creeper MarathonSorry, the VCM Registration Listing is not available at this time. Please check back soon.
"
Response.End
End If
sRegType = Request("regtype")
If (sRegType = "" OR sRegType = "registration" OR NOT(bVCMAdmin)) Then
sRegType = ""
sRegTypeDesc = "Registration"
sItemType = "VCM-Runners"
sOrderBy = "ItemValue1"
Else
sRegTypeDesc = "Waiting"
sItemType = "VCM-Waiting"
sOrderBy = "ItemValue3"
sAction = Request("action")
If (bVCMAdmin AND sAction = "move2reg") Then ' If registering, set reg-date and copy to official list
sItemID = Request("itemid")
sSQL = "UPDATE SiteStuff SET ItemValue5='" & Date() & "' WHERE ItemID=" & sItemID
'''Response.Write vbcrlf & ""
DBConn.Execute(sSQL)
sSQL = "INSERT INTO SiteStuff(ItemType,ItemValue1,ItemValue2,ItemValue3,ItemValue4,ItemValue5,ItemValue6) SELECT 'VCM-Runners',ItemValue1,ItemValue2,ItemValue3,ItemValue4,ItemValue5,ItemValue6 FROM SiteStuff WHERE ItemID=" & sItemID
DBConn.Execute(sSQL)
End If
End If
sDay = Day(Date())
If (sDay < 10) Then
sDay = "0" & sDay ' Need leading zero
End If
sMonthNum = Month(Date())
If (sMonthNum < 10) Then
sMonthNum = "0" & sMonthNum ' Need leading zero
End If
sNow_yymmdd = Right(Year(Date()),2) & "/" & sMonthNum & "/" & sDay
If (bVCMAdmin) Then
regYearEditAnchor = "/Edit/"
asOfDateEditAnchor = "/Edit/"
focusCommand = "onLoad=""self.focus();document.addform.itemvalue1.focus()"""
Else
regYearEditAnchor = ""
asOfDateEditAnchor = ""
focusCommand = ""
End If
'
' Get the VCM Registration Year
'
sql = "SELECT ItemValue1 FROM SiteStuff WHERE ItemType = 'VCM-RegistrationYear'"
Set rs = DBConn.Execute(sql)
If (NOT rs.eof) Then
regYear = rs("ItemValue1")
Else
regYear = "empty"
End If
rs.Close
'
' Get the VCM AsOf Date
'
sql = "SELECT ItemValue1 FROM SiteStuff WHERE ItemType = 'VCM-AsOfDate'"
Set rs = DBConn.Execute(sql)
If (NOT rs.eof) Then
asOfDate = rs("ItemValue1")
Else
asOfDate = "empty"
End If
rs.Close
%>
<%=regYear%> <%=sRegTypeDesc%> List <%=regYearEditAnchor%>
(as of <%=asOfDate%>)
| " & def_font & iCounter & ") | " End If Response.Write "" & def_font & rs("ItemValue2") & " | " If (bVCMAdmin AND sRegType = "waiting") Then Response.Write "" & def_font & rs("ItemValue3") & " | " & def_font & rs("ItemValue4") & " | " End If If (bVCMAdmin) Then If (sRegType = "waiting") Then Response.Write "" & def_font & rs("ItemValue6") & " | " If (rs("ItemValue5") <> "") Then Response.Write "" & def_font & rs("ItemValue5") & " | " Else Response.Write "" End If Else Response.Write " | " End If End If Response.Write vbcrlf & " |