<% template LEADERBOARDSvc(starwave.webgames.services.UserInputSvc obj) %> <% inputs = obj.input maxPeriods = 11 currentPeriod = 12 // last completed period %> WVGM Leaderboard <% Header("LeaderboardSvc") %>
Leaderboard

<% foreach (num in 1..maxPeriods) { if(num < currentPeriod) { '' } else { '' } } %> <% if (obj.param0 == "-1") { targetFieldName = "nPoints" } else { targetFieldName = "nWeekTotal" & (obj.param0) } nullFormat("--") currentRow = 0 nRank = -1 nLastTotal = -1 foreach (input in inputs) { nTotal = input[targetFieldName].asInteger if (nTotal != nLastTotal) { nRank = currentRow + 1 nLastTotal = nTotal } '' '' '' foreach (num in 1..maxPeriods) { celldata = "" week = "nWeekTotal" & num if (num & "" == obj.param0) { celldata = celldata & '' } celldata = celldata & input[week] '' } '\n' currentRow = currentRow + 1 } %>
Leaderboard
RK TEAM, OWNERW' & num & 'W'&num&'TOTAL
' & nRank & '' & input["sLocation"] & ' ' input["sNickname"] & ', ' & input["sFirstName"] & ' ' & input["sLastName"] & '' if (celldata == "") { '--' } else { celldata } '' if (obj.param0 == "-1") { '' } input["nPoints"] '
<% Footer("LEADERBOARDSvc") %>