<%@ page import="java.util.Iterator, java.util.Set, java.util.Collection" %> <%@ page import="java.lang.reflect.Array" %> <%@ page import="ysl.util.Utils, ysl.util.StaticData, ysl.ui.SelectList" %> <%@ page import="ysl.util.Log, ysl.util.Money, ysl.util.ServletUtils" %> <%@ page import="ysl.util.Term" %> <%@ page import="ysl.buslog.users.Role, ysl.buslog.users.UserRole, ysl.buslog.users.User" %> <%@ page import="ysl.buslog.competitions.Season, ysl.buslog.competitions.Competition, ysl.buslog.competitions.Division" %> <%@ page import="ysl.buslog.refs.GameOfficial, ysl.buslog.refs.OfficialPay" %> <%@ include file="TestSessionFragment.jsp" %> <% int roleId = currentUserRole.getRoleId(); League league = currentUserRole.getEntity().getLeague(); int compId = ServletUtils.getInt(request, "compId", 0); int seasonId = ServletUtils.getInt(request, "seasonId", 0); Season season = Season.getInstance(seasonId); Competition comp = null; if (compId > 0) { comp = Competition.getInstance(compId); season = comp.getSeason(); seasonId = season.getId(); } if (seasonId == 0) { season = league.getActiveSeason(); if (season != null) seasonId = season.getId(); } SelectList compsSL = null; SelectList seasonsSL = league == null ? null : new SelectList(league.getSeasons()); if (season != null) { compsSL = new SelectList(season.getRealCompetitions()); } int leagueId = league == null ? 0 : league.getId(); Iterator playAttrs = LeaguePlayAttr.getPlayAttrMatrix(leagueId).iterator(); session.setAttribute("currentCompetition", comp); String offStr = Term.getTerm(Term.OFFICIAL, league); String off1Str = Term.getTerm(Term.OFFICIAL1, league); String off2Str = Term.getTerm(Term.OFFICIAL2, league); String off3Str = Term.getTerm(Term.OFFICIAL3, league); String venueStr = Term.getTerm(Term.VENUE, league); String pageTitle = "Edit " + Term.capitalizeTerm(offStr) + " Pay Rates"; %> <%@ include file="header.jsp" %>
Edit <%= (seasonId == 0 ? "Default " : "") %><%= Term.capitalizeTerm(offStr) %> Pay Rates<%= (comp == null ? "" : "
for " + comp.getFullName()) %>
<%= league.getLeagueName() %>
<%@ include file="ShowStatusMessageFragment.jsp" %>
<% if (compsSL != null) { %> <% } else out.println(""); %>
Choose the Season and Competition
Season:
Competition:
<% if (playAttrs != null) { %>
<% int charCols = 0; if (league.showGender()) { out.println(" "); charCols++; } if (league.showAge()) { out.println(" "); charCols++; } if (league.showClass()) { out.println(" "); charCols++; } %> <%= (Utils.hasData(off2Str) ? "" : "") %> <%= (Utils.hasData(off3Str) ? "" : "") %> <% Money refPay = null; Money ar1Pay = null; Money ar2Pay = null; int row=0; while (playAttrs.hasNext()) { Object ids = playAttrs.next(); String attrStr = null; if (ids != null) { int age = Array.getInt(ids, LeaguePlayAttr.AGE - 1); int gender = Array.getInt(ids, LeaguePlayAttr.GENDER - 1); int classId = Array.getInt(ids, LeaguePlayAttr.CLASS - 1); if (compId == OfficialPay.TRAVELING_ID) { refPay = OfficialPay.getSeasonTravelingPay(leagueId, seasonId, gender, age, classId, GameOfficial.CENTER_REF); ar1Pay = OfficialPay.getSeasonTravelingPay(leagueId, seasonId, gender, age, classId, GameOfficial.AR1); ar2Pay = OfficialPay.getSeasonTravelingPay(leagueId, seasonId, gender, age, classId, GameOfficial.AR2); } else { refPay = OfficialPay.getLeagueCompetitionPay(leagueId, seasonId, compId, gender, age, classId, GameOfficial.CENTER_REF); ar1Pay = OfficialPay.getLeagueCompetitionPay(leagueId, seasonId, compId, gender, age, classId, GameOfficial.AR1); ar2Pay = OfficialPay.getLeagueCompetitionPay(leagueId, seasonId, compId, gender, age, classId, GameOfficial.AR2); } if(row%2==0) out.println(""); else out.println(""); if (league.showGender()) { attrStr = StaticData.getString(StaticData.GENDERS, gender); out.println(""); } if (league.showAge()) { attrStr = StaticData.getString(StaticData.AGE_GROUPS, age); out.println(""); } if (league.showClass()) { attrStr = StaticData.getString(StaticData.PLAY_CLASSES, classId); out.println(""); } %> <%= (Utils.hasData(off2Str) ? "" : "") %> <%= (Utils.hasData(off3Str) ? "" : "") %> <% row++; } // end if ids != null } // end while playAttrs.hasNext() out.println("
GenderAge GroupClass<%= Term.capitalizeTerm(off1Str) %> Pay" + Term.capitalizeTerm(off2Str) + " Pay" + Term.capitalizeTerm(off3Str) + " Pay
 " + (attrStr == null ? "Default" : attrStr) + " " + (attrStr == null ? "Default" : attrStr) + " " + (attrStr == null ? "Default" : attrStr) + "
"); out.println(""); if (seasonId != 0) { if (OfficialPay.hasCompetitionPays(seasonId, compId)) { out.println(""); } /*else { out.println("Using Season Default " + Term.capitalizeTerm(offStr) + " Pay Rates"); } */ } out.println(""); out.println("

"); } // end if playAttrs != null %>
User Home