Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[271] Implemented `Arena Match History` feature. You need to patch yo…

…ur server core (MaNGOS/TC2) with provided patches (`tools/armory_arena_chart` for MaNGOS and `tools/trinity_core` for TC2). Hope, this will be the last feature that requires core support :). Trinity users: patch was not tested on TC2 (compiled successfully), please, provide good bugreports.
  • Loading branch information...
commit 6ba78f95d24f59e457dbdcdbb9ab484eb5e29454 1 parent 2454c00
@Shadez authored
View
149 _css/datepicker.css
@@ -0,0 +1,149 @@
+
+table.jCalendar {
+ border: 0px solid #a95600;
+ background: #a95600;
+ border-collapse: separate;
+ border-spacing: 2px;
+ margin-top: 1px;
+}
+table.jCalendar th {
+ background: #8b3f00;
+ color: #fff;
+ font-weight: bold;
+ padding: 3px 5px;
+}
+
+table.jCalendar td {
+ background: #f1de92;
+ color: #000;
+ padding: 3px 5px;
+ text-align: center;
+}
+table.jCalendar td.other-month {
+ background: #e9dfaa;
+ color: #aaa;
+}
+table.jCalendar td.today {
+ background: #666;
+ color: #fff;
+}
+table.jCalendar td.selected {
+ background: #c0a374;
+ color: #fff;
+}
+table.jCalendar td.selected.dp-hover {
+ background: #dcba85;
+ color: #fff;
+}
+table.jCalendar td.dp-hover,
+table.jCalendar tr.activeWeekHover td {
+ background: #fff;
+ color: #000;
+}
+table.jCalendar tr.selectedWeek td {
+ background: #f66;
+ color: #fff;
+}
+table.jCalendar td.disabled, table.jCalendar td.disabled.dp-hover {
+ background: #d5cc9b;
+ color: #888;
+}
+table.jCalendar td.unselectable,
+table.jCalendar td.unselectable:hover,
+table.jCalendar td.unselectable.dp-hover {
+ background: #d5cc9b;
+ color: #888;
+}
+
+/* For the popup */
+
+/* NOTE - you will probably want to style a.dp-choose-date - see how I did it in demo.css */
+
+div.dp-popup {
+ position: relative;
+ background: #5b2900;
+ font-size: 10px;
+ font-family: arial, sans-serif;
+ padding: 2px;
+ width: 172px;
+ line-height: 1.2em;
+}
+div#dp-popup {
+ position: absolute;
+ z-index: 199;
+}
+div.dp-popup h2 {
+ font-size: 12px;
+ text-align: center;
+ margin: 4px 0;
+ padding: 0;
+ color: #FFF;
+}
+a#dp-close {
+ font-size: 11px;
+ padding: 4px 0;
+ text-align: center;
+ display: block;
+ color: #FFF;
+}
+a#dp-close:hover {
+ text-decoration: underline;
+}
+div.dp-popup a {
+ color: #000;
+ text-decoration: none;
+ padding: 3px 2px 0;
+}
+div.dp-popup div.dp-nav-prev {
+ position: absolute;
+ top: 6px;
+ left: 6px;
+ width: 6px;
+ height: 9px;
+ line-height: 9px !important;
+}
+div.dp-popup div.dp-nav-prev a {
+ float: left;
+ width: 6px;
+ height: 9px;
+ line-height: 9px !important;
+ display: block;
+ background: url('../images/datepicker/arw-back.gif') top right no-repeat;
+ padding: 0 !important;
+}
+/* Opera needs the rules to be this specific otherwise it doesn't change the cursor back to pointer after you have disabled and re-enabled a link */
+div.dp-popup div.dp-nav-prev a, div.dp-popup div.dp-nav-next a {
+ cursor: pointer;
+}
+div.dp-popup div.dp-nav-prev a.disabled, div.dp-popup div.dp-nav-next a.disabled {
+ cursor: default;
+}
+div.dp-popup div.dp-nav-next {
+ position: absolute;
+ top: 6px;
+ right: 6px;
+ width: 6px;
+ height: 9px;
+ line-height: 9px !important;
+ display: block;
+}
+div.dp-popup div.dp-nav-next a {
+ float: right;
+ width: 6px;
+ height: 9px;
+ line-height: 9px !important;
+ display: block;
+ background: url('../images/datepicker/arw-fwd.gif') top right no-repeat;
+ padding: 0 !important;
+}
+div.dp-popup a.disabled, div.dp-popup div.dp-nav-next a.disabled, div.dp-popup div.dp-nav-prev a.disabled {
+ cursor: default;
+ background-position: bottom left;
+
+}
+div.dp-popup td {
+ cursor: pointer;
+}
+div.dp-popup td.disabled {
+ cursor: default;
+}
View
BIN  _flash/graph.swf
Binary file not shown
View
30 _js/arena-report/arena-game.js
@@ -0,0 +1,30 @@
+function initializeArenaGame(startTime, matchLength, offset){
+
+ $("#arenaGameTable .masthead .numericSort").addClass("{sorter: 'numeric'}")
+
+ //truncate vars
+ $(".truncateMe").each(function(){
+ var truncStr = $(this)[0].innerHTML;
+
+ if(truncStr.length > 15){
+ truncStr = truncStr.substr(0,15);
+ truncStr = truncStr + "...";
+ $(this)[0].innerHTML = truncStr;
+ }
+
+ });
+
+
+ $("#arenaGameTable").tablesorter();
+
+ dateLocalization();
+
+ $("#matchStartTime").html( new Date((startTime*1) + (offset*1)).asUTCTime());
+
+ var matchMins = Math.floor(matchLength / 60);
+ var matchSecs = matchLength - (matchMins*60)
+
+ $("#matchLength").html(matchMins + " " + Date.minutes + " " + matchSecs + " " + Date.seconds);
+
+
+}
View
417 _js/arena-report/graph.js
@@ -0,0 +1,417 @@
+var unfilteredTable;
+var unfilteredTableRows;
+var noSearchResults = "";
+var arenaSeason;
+var TimeZoneOffset = 0;
+var g; //holds references to dom objects
+var fil; //holds filter stuff
+var DOM_READY = false;
+var limitData = null;
+var linkBattlegroup = "";
+
+
+function initializeArenaReportGraph(noSearchResultsTxt, seasonStart, seasonEnd, timezoneOffset, highestRating, lowestRating, battleGroup, strCurrent){
+
+ //run date localization strings.js
+ dateLocalization();
+
+ TimeZoneOffset = timezoneOffset * 1; //make sure its int
+ noSearchResults = noSearchResultsTxt;
+ linkBattlegroup = battleGroup;
+
+ //store dom elements
+ g = {
+ ratingLeft: $("#textRatingLeft"),
+ ratingRight: $("#textRatingRight"),
+ details: $("#containerDetails"),
+ delta: $("#containerDelta"),
+ ratingChangeInterval: $("#textRatingChangeInterval"),
+ changeAvg: $("#textRatingChangeAverage"),
+ matchHighlight: $("#matchHighlight"),
+ ratingChange: $("#textRatingChange"),
+ textDate: $("#textDate"),
+ currResults: $("#currResults"),
+ totalResults: $("#totalResults"),
+ textOpponent: $("#textOpponent"),
+ textRatingNew: $("#textRatingNew"),
+ textStartDate: $("#textStartDate"),
+ textGamesPlayed: $("#textGamesPlayed"),
+ textEndDate: $("#textEndDate"),
+ arenaFlash: $("#arenaFlash")
+ };
+
+ fil = {
+ opponentVal: $("#opponentVal"),
+ ratingMin: $("#ratingMin"),
+ ratingMax: $("#ratingMax"),
+ ratingChange: $("#ratingChange"),
+ ratingLogic: $("#ratingLogic"),
+ dateStart: $("#dateStart"),
+ dateEnd: $("#dateEnd")
+ };
+
+
+ arenaSeason = { start: new Date(seasonStart*1).asString(),
+ end: (seasonEnd == "today") ? (new Date()).asString() : new Date(Date.fromString(seasonEnd)).asString(),
+ highestRating: highestRating,
+ lowestRating: lowestRating
+ };
+
+ $("#blueStartDate")[0].innerHTML = arenaSeason.start;
+ $("#blueEndDate")[0].innerHTML = (seasonEnd == "today") ? strCurrent : arenaSeason.end;
+
+ formatDatesInTable();
+
+ //date picker - start, bind events
+ $(fil.dateStart).datePicker({ startDate: arenaSeason.start, endDate: arenaSeason.end, verticalOffset: 10, horizontalOffset: 100 })
+ .html(arenaSeason.start).trigger('change')
+ .click(function(){ $(fil.dateStart).dpDisplay() });
+ //bind clicks
+ $('#dateStartLink').click(function(){ $(fil.dateStart).dpDisplay()});
+ $('#tdDateStart').click(function(){ $(fil.dateStart).dpDisplay() });
+
+ //date picker - end, bind events
+ $(fil.dateEnd).datePicker({ startDate: arenaSeason.start, endDate: arenaSeason.end, verticalOffset: 10, horizontalOffset: 100})
+ .html(arenaSeason.end).trigger('change')
+ .click(function(){ $(fil.dateEnd).dpDisplay() });
+ //bind clicks
+ $('#dateEndLink').click(function(){ $('#dateEnd').dpDisplay() });
+ $('#tdDateEnd').click(function(){ $('#dateEnd').dpDisplay() });
+
+ //make table sortable and pageable
+ var sorterObj = $("#matchTable").tablesorter().tablesorterPager({container: $("#pager")});
+
+ unfilteredTable = new Object(sorterObj[0]);
+ unfilteredTableRows = unfilteredTable.config.rowsCopy;
+
+ $("#textTotalGames").html(unfilteredTableRows.length); //add 1 for the "first game"
+
+ /*var searchTimer; //for timeout
+ $("#opponentVal").keyup(function() {
+ //console.log("opponentVal --- runFilters");
+ if(searchTimer != null){
+ //console.log("clear timeout");
+ clearTimeout(searchTimer);
+ }
+ searchTimer = setTimeout("runFilters()", 100);
+ });*/
+
+ //if there is an opponent in the url, get its value and run a filter against those opponents
+ var currUrl = location.href;
+ if(currUrl.indexOf("_opp") > -1){
+ currUrl = currUrl.substr(currUrl.indexOf("_opp=") + 5);
+
+ if(currUrl.indexOf("&") != -1){
+ currUrl = currUrl.substr(0,currUrl.indexOf("&"));
+ }
+
+ currUrl = currUrl.replace(/\+/g," ");
+ $(fil.opponentVal)[0].value = currUrl.replace(/\%20/g," ");
+ runFilters();
+ }
+
+ $("#pageSize").bgiframe();
+
+ DOM_READY = true;
+
+ //call limit data again if it was called before dom was ready
+ if(limitData != null){
+ LimitData(limitData.dateleft,limitData.dateright,limitData.gamesplayed,limitData.ratingchange,limitData.ratingleftchange, limitData.ratingrightchange)
+ }
+
+
+
+ //fixFlashFocus();
+
+}
+
+/*************************************
+ FILTERS
+*************************************/
+function runFilters()
+{
+ var searchVals = {
+ opponentVal: $.trim($(fil.opponentVal)[0].value).toLowerCase(),
+ startDate: Date.fromString($(fil.dateStart).html()).asString(),
+ endDate: Date.fromString($(fil.dateEnd).html()).asString(),
+ minRating: $(fil.ratingMin)[0].value*1,
+ maxRating: $(fil.ratingMax)[0].value*1,
+ ratingChange: $.trim($(fil.ratingChange)[0].value)*1,
+ ratingLogic: $(fil.ratingLogic)[0].value
+ };
+
+ var newRows = [];
+ var rowhtml = "";
+
+ //skip opponent filter if the field is blank
+ if(searchVals.opponentVal != ""){
+ newRows = filterOpponent(unfilteredTableRows,searchVals.opponentVal);
+ }else{
+ newRows = unfilteredTableRows;
+ }
+
+ //filter dates (only filter if dates have changed)
+ if(!((searchVals.startDate == arenaSeason.start) && (searchVals.endDate == arenaSeason.end))){
+ newRows = filterDate(newRows, new Date(searchVals.startDate), new Date(searchVals.endDate))
+ }
+
+ //filter ratings (only run filter if rating is different)
+ if(!((searchVals.minRating == arenaSeason.lowestRating) && (searchVals.maxRating == arenaSeason.highestRating))){
+ newRows = filterRating(newRows, searchVals.minRating, searchVals.maxRating);
+ }
+
+ if((searchVals.ratingLogic != "all") && !(isNaN(searchVals.ratingChange))){
+ newRows = filterRatingChange(newRows, searchVals.ratingLogic, searchVals.ratingChange);
+ }
+
+ $(g.currResults)[0].innerHTML = newRows.length.toString();
+ $(g.totalResults)[0].innerHTML = unfilteredTableRows.length.toString();
+
+ //if(newRows.length == unfilteredTableRows.length){
+ // $.tablesorterPager.appender(unfilteredTable,unfilteredTableRows);
+ //}else{
+ //if there are no rows, show an empty row with a message
+ if(newRows.length == 0){
+ rowhtml = "<tr><td colspan=\"4\">"+noSearchResults+"</td></tr>";
+ newRows = [$(rowhtml)];
+ }else{
+ //make html rows (need for trigger("update")
+ $(newRows).each(function(i){
+ rowhtml += "<tr>"+$(this).html()+"</tr>";
+ });
+ }
+
+
+ $("#matchTable tbody")[0].innerHTML = rowhtml;
+ $("#matchTable").trigger("update");
+ $.tablesorterPager.appender(unfilteredTable,newRows);
+
+ //rebind tooltip
+ bindToolTips();
+}
+
+function resetFilters(){
+ $(fil.opponentVal)[0].value = "";
+ $(fil.ratingMin)[0].value = arenaSeason.lowestRating;
+ $(fil.ratingMax)[0].value = arenaSeason.highestRating;
+ $(fil.ratingChange)[0].value = "";
+ $(fil.ratingLogic)[0].value = "all";
+
+ $(fil.dateStart).html(arenaSeason.start);
+ $(fil.dateEnd).html(arenaSeason.end);
+
+ runFilters();
+}
+
+function filterOpponent(rows, filterVal){
+ var emptyArr = [];
+
+ $(rows).each(function(i){
+ var currOpponent = $(this).find("td:first > span").html().toLowerCase();
+
+ if(currOpponent.indexOf(filterVal) != -1){
+ emptyArr.push($(this));
+ }
+ });
+ return emptyArr;
+}
+
+function filterDate(rows, startDate, endDate){
+ var emptyArr = [];
+
+ $(rows).each(function(i){
+ var currDate = new Date($(this).find("td:eq(3) > span").html().toLowerCase()*1);
+ if((currDate >= startDate) && (currDate <= endDate)){
+ emptyArr.push($(this));
+ }
+ });
+ return emptyArr;
+}
+
+function filterRating(rows, minRating, maxRating){
+ var emptyArr = [];
+
+ $(rows).each(function(i){
+ var currRating = $(this).find("td:eq(1)").html()*1;
+ if((currRating >= minRating) && (currRating <= maxRating)){
+ emptyArr.push($(this));
+ }
+ });
+ return emptyArr;
+}
+
+function filterRatingChange(rows, logicType, ratingChange){
+ if(ratingChange == ""){
+ return rows;
+ }
+
+ var emptyArr = [];
+
+ $(rows).each(function(i){
+ var currRatingChange = $(this).find("td:eq(2) > span").html();
+ currRatingChange = currRatingChange.replace(/\+/g,"")*1;
+ switch(logicType){
+ case "eq":
+ if(currRatingChange == ratingChange) emptyArr.push($(this));
+ break;
+ case "gt":
+ if(currRatingChange > ratingChange) emptyArr.push($(this));
+ break;
+ case "gte":
+ if(currRatingChange >= ratingChange) emptyArr.push($(this));
+ break;
+ case "lt":
+ if(currRatingChange < ratingChange) emptyArr.push($(this));
+ break;
+ case "lte":
+ if(currRatingChange <= ratingChange) emptyArr.push($(this));
+ break;
+ }
+ });
+ return emptyArr;
+}
+/*************************************
+ END FILTERS
+*************************************/
+function fixFlashFocus(){
+ if(!$.browser.msie){
+ $("#graphContainer").focus(); //set element to focus to fix safari/chrome bug
+ }
+}
+
+
+function PrintResults(opponent,ratingnew,ratingchange,date) {
+
+ $(g.details)[0].style.display = "block";
+ $(g.details)[0].style.visibility = "visible";
+
+ $(g.delta)[0].style.display = "none";
+ $(g.delta)[0].style.visibility = "hidden";
+
+ $(g.textRatingNew)[0].innerHTML = ratingnew;
+ $(g.textOpponent)[0].innerHTML = opponent;
+
+ $(g.textDate)[0].innerHTML = '<span class="detailsBlueItalic">' + new Date((date*1) + TimeZoneOffset).asUTCTime() + '</span>';
+
+ if (ratingchange >= 0) {
+ $(g.ratingChange)[0].innerHTML = "+"+ratingchange;
+ $(g.ratingChange).attr("class","detailsRatingChangeGreen");
+ }else {
+ $(g.ratingChange)[0].innerHTML = ratingchange;
+ $(g.ratingChange).attr("class","detailsRatingChangeRed").html(ratingchange);
+ }
+}
+
+
+
+function LimitData(dateleft,dateright,gamesplayed,ratingchange,totalgames, ratingleftchange, ratingrightchange) {
+ //dom isnt ready, so values cant be set until it is, store the values
+ if(!DOM_READY){
+ limitData = {
+ dateleft: dateleft,
+ dateright: dateright,
+ gamesplayed: gamesplayed,
+ ratingchange: ratingchange,
+ ratingleftchange: ratingleftchange,
+ ratingrightchange: ratingrightchange
+ };
+
+ }else{
+ var dateRange = {
+ start: new Date(dateleft*1 + TimeZoneOffset).asUTCTime(),
+ end: new Date(dateright*1 + TimeZoneOffset).asUTCTime()
+ };
+
+ $(g.textStartDate)[0].innerHTML = "<span class='detailsBlueItalic'>"+ dateRange.start + "</span>";
+ $(g.textEndDate)[0].innerHTML = "<span class='detailsBlueItalic'>"+ dateRange.end + "</span>";
+
+ $(g.textGamesPlayed)[0].innerHTML = gamesplayed;
+
+ if (ratingchange >= 0) {
+ $(g.ratingChangeInterval).attr("class","limitRatingChangeGreen");
+ $(g.ratingChangeInterval)[0].innerHTML = ratingchange.toString();
+ $(g.changeAvg).attr("class","limitAverageChangeGreen")
+ $(g.changeAvg)[0].innerHTML = Math.round(100*ratingchange/gamesplayed)/100;
+ }
+ else {
+ $(g.ratingChangeInterval).attr("class","limitRatingChangeRed")
+ $(g.ratingChangeInterval)[0].innerHTML = ratingchange;
+ $(g.changeAvg).attr("class","limitAverageChangeRed")
+ $(g.changeAvg)[0].innerHTML = Math.round(100*ratingchange/gamesplayed)/100;
+ }
+ $(g.ratingLeft)[0].innerHTML = ratingleftchange;
+ $(g.ratingRight)[0].innerHTML = ratingrightchange;
+ }
+
+ fixFlashFocus();
+}
+
+function FnHideGameDetails() {
+ //$(g.details).attr("style","visibility: hidden; display: none");
+ //$(g.delta).attr("style","visibility: visible; display: block");
+
+ //fixFlashFocus();
+
+ var detailElement = document.getElementById("containerDetails");
+ var deltaElement = document.getElementById("containerDelta");
+
+ deltaElement.style.display = "block";
+ deltaElement.style.visibility = "visible";
+
+ detailElement.style.display = "none";
+ detailElement.style.visibility = "hidden";
+
+}
+
+function FnShowGameDetails() {
+ //$(g.details).attr("style","visibility: visible; display: block");
+ //$(g.delta).attr("style","visibility: hidden; display: none");
+
+ //fixFlashFocus();
+}
+
+function OpenReportPage(id) {
+ window.location = "/arena-game.xml?b=" + linkBattlegroup + "&gid="+ id;
+}
+
+function FnHighlightInFlash(id) {
+ thisMovie("arenaflashFlash").fromJSHighlightMatch(id);
+ $(g.matchHighlight).show();
+}
+
+function FnClearHighlightInFlash() {
+ thisMovie("arenaflashFlash").fromJSClearHighlightMatch();
+ $(g.matchHighlight).hide();
+}
+
+function FnViewRecentInFlash() {
+ thisMovie("arenaflashFlash").fromJSViewRecent();
+}
+
+function FnViewSeasonInFlash() {
+ thisMovie("arenaflashFlash").fromJSViewSeason();
+}
+
+//called from flash when problem loading the xml
+function errorLoadingFlash(){
+ $("#matchHolder").hide();
+ $("#graphContainer").hide();
+
+ $("#errorLoadingArenaData").attr("style","display: block");
+}
+
+
+function FnEmptyXML() {
+ //$("#graphContainer").hide();
+ //$("#graphNone").show();
+}
+
+function FnGetGameStart(){
+ return $("#gameStartVal").html();
+}
+
+function formatDatesInTable(){
+ $("#matchTable .timeFormat").each(function(){
+ $(this)[0].innerHTML = new Date(($(this).html()*1) + TimeZoneOffset).asUTCTime();
+ });
+}
View
10 _js/arena-report/opposing-teams.js
@@ -0,0 +1,10 @@
+function initializeOpposingTeams(){
+
+ //add class to headers for proper sorting
+ $("#teamsTable .masthead .numericSort").addClass("{sorter: 'numeric'}")
+
+
+ $("#teamsTable").tablesorter().tablesorterPager({container: $("#pager")}); ;
+
+
+}
View
276 _layout/arena/arena-game.xsl
@@ -0,0 +1,276 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="html" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
+
+<xsl:include href="../includes.xsl"/>
+
+<xsl:variable name="pathWinner" select="/page/game/team[@result = 'win']" />
+<xsl:variable name="pathLoser" select="/page/game/team[@result = 'loss']" />
+
+<xsl:variable name="urlTeamSelected" select="concat('../../arena-team-game-chart.xml?r=',
+ document('../../team-info-last.xml')/page/arenaTeamCommand/@realm,
+ '&amp;t=',
+ document('../../team-info-last.xml')/page/arenaTeamCommand/@teamName,
+ '&amp;ts=', document('../../team-info-last.xml')/page/arenaTeamCommand/@teamSize)" />
+<xsl:variable name="isTeamSelected" select="document('../../team-info-last.xml')/page/arenaTeam/@teamSize" />
+
+<xsl:template match="page/game">
+ <xsl:choose>
+ <!-- show message for blank data -->
+ <xsl:when test="not(/page/game/team)">
+ <div id="dataElement">
+ <div class="parchment-top">
+ <div class="parchment-content">
+ <div class="list">
+ <div class="full-list notab">
+ <div class="info-pane" style="height: 300px;">
+ <div style="height: 200px; padding: 10px; text-align:center;">
+ <xsl:value-of select="$loc/strs/arena/str[@id='error.nodata']"/>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <link rel="stylesheet" href="_css/arena-report.css" />
+ <!--<script type="text/javascript" src="shared/global/third-party/jquery/jquery.uitablefilter.js"></script>-->
+ <script type="text/javascript" src="_js/arena-report/arena-game.js"></script>
+ <script type="text/javascript">
+ $(document).ready(function(){
+ initializeArenaGame(
+ "<xsl:value-of select="/page/game/@matchStartTime" />",
+ "<xsl:value-of select="/page/game/@matchLength" />",
+ "<xsl:value-of select="/page/game/@realmOffset" />"
+ );
+ });
+ </script>
+
+ <div id="dataElement">
+ <div class="parchment-top">
+ <xsl:call-template name="arenaGameHolder" />
+ </div>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+<xsl:template name="arenaGameHolder">
+ <div class="parchment-content">
+ <div class="list">
+ <div class="full-list notab">
+ <div class="info-pane">
+ <xsl:call-template name="arenaGameContent" />
+ </div>
+ </div>
+ </div>
+ </div>
+</xsl:template>
+
+
+<xsl:template name="arenaGameContent">
+ <xsl:variable name="battleGroup" select="/page/game/@battleGroup" />
+ <div class="profile-wrapper">
+ <blockquote>
+ <b class="iarenateams">
+ <xsl:choose>
+ <xsl:when test="string-length($isTeamSelected) &gt; 0">
+ <h4><a href="{$urlTeamSelected}"><xsl:value-of select="$loc/strs/arena/str[@id='match-history']"/></a></h4>
+ </xsl:when>
+ <xsl:otherwise>
+ <h4><xsl:value-of select="$loc/strs/arena/str[@id='match-history']"/></h4>
+ </xsl:otherwise>
+ </xsl:choose>
+ <h3>
+ <xsl:apply-templates mode="printf" select="$loc/strs/arenaReport/str[@id='reportHeader']">
+ <xsl:with-param name="param1" select="@teamSize" />
+ </xsl:apply-templates>
+ </h3>
+ </b>
+ </blockquote>
+ </div>
+
+ <div class="arenareport-header-double">
+ <div class="arenareport-header-double-moldingleft">
+ <div class="arenareport-header-double-flash-l">
+ <xsl:attribute name="id">teamiconWinner</xsl:attribute>
+ <xsl:call-template name="flash">
+ <xsl:with-param name="id" select="'teamiconWinner'"/>
+ <xsl:with-param name="src" select="'images/icons/team/pvpemblems.swf'"/>
+ <xsl:with-param name="bgcolor" select="concat('#',$pathWinner/@emblemBackground)"/>
+ <xsl:with-param name="wmode" select="'transparent'"/>
+ <xsl:with-param name="width" select="'78'"/>
+ <xsl:with-param name="height" select="'78'"/>
+ <xsl:with-param name="quality" select="'high'"/>
+ <xsl:with-param name="noflash" select="concat('&lt;div class=teamicon-noflash&gt;&lt;a target=_blank href=http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&gt;&lt;img src=images/',$lang,'/getflash.png class=p/&gt;&lt;/a&gt;&lt;/div&gt;')"/>
+ <xsl:with-param name="flashvars" select="concat('totalIcons=1&#38;totalIcons=1&#38;startPointX=4&#38;initScale=100&#38;overScale=100&#38;largeIcon=1&#38;iconColor1=',$pathWinner/@emblemIconColor,'&#38;iconName1=images/icons/team/pvp-banner-emblem-',$pathWinner/@emblemIconStyle,'.png&#38;bgColor1=',$pathWinner/@emblemBackground,'&#38;borderColor1=',$pathWinner/@emblemBorderColor,'&#38;teamUrl1=')"/>
+ </xsl:call-template>
+ </div>
+ <div class="arenareport-header-double-rating-l">+<xsl:value-of select="$pathWinner/@ratingDelta" /></div>
+ <div class="arenareport-header-double-ratingnew-l"><xsl:value-of select="$pathWinner/@ratingNew" /></div>
+ <div class="arenareport-header-double-txt-l">
+ <div class="reldiv">
+ <div class="arenareport-winner1-l"><xsl:value-of select="$pathWinner/@name" /></div>
+ <div class="arenareport-winner2-l"><xsl:value-of select="$pathWinner/@name" /></div>
+ </div>
+ </div>
+ <div style="position: absolute; color: white; margin: 125px 0 0 25px;">
+ <div class="reldiv">
+ <div class="arenareport-pathwinner1"><xsl:value-of select="$pathWinner/@realm" /></div>
+ <div class="arenareport-pathwinner2"><xsl:value-of select="$pathWinner/@realm" /></div>
+ </div>
+ </div>
+ </div>
+ <div class="arenareport-header-double-moldingright">
+ <div class="reldiv">
+ <div class="arenareport-header-double-flash-r">
+ <xsl:attribute name="id">teamiconLoser</xsl:attribute>
+ <xsl:call-template name="flash">
+ <xsl:with-param name="id" select="'teamiconLoser'"/>
+ <xsl:with-param name="src" select="'images/icons/team/pvpemblems.swf'"/>
+ <xsl:with-param name="bgcolor" select="concat('#',$pathLoser/@emblemBackground)"/>
+ <xsl:with-param name="wmode" select="'transparent'"/>
+ <xsl:with-param name="width" select="'78'"/>
+ <xsl:with-param name="height" select="'78'"/>
+ <xsl:with-param name="quality" select="'high'"/>
+ <xsl:with-param name="noflash" select="concat('&lt;div class=teamicon-noflash&gt;&lt;a target=_blank href=http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&gt;&lt;img src=images/',$lang,'/getflash.png class=p/&gt;&lt;/a&gt;&lt;/div&gt;')"/>
+ <xsl:with-param name="flashvars" select="concat('totalIcons=1&#38;totalIcons=1&#38;startPointX=4&#38;initScale=100&#38;overScale=100&#38;largeIcon=1&#38;iconColor1=',$pathLoser/@emblemIconColor,'&#38;iconName1=images/icons/team/pvp-banner-emblem-',$pathLoser/@emblemIconStyle,'.png&#38;bgColor1=',$pathLoser/@emblemBackground,'&#38;borderColor1=',$pathLoser/@emblemBorderColor,'&#38;teamUrl1=')"/>
+ </xsl:call-template>
+ </div>
+ <div class="arenareport-header-double-rating-r"><xsl:value-of select = "$pathLoser/@ratingDelta" /></div>
+ <div class="arenareport-header-double-ratingnew-r"><xsl:value-of select = "$pathLoser/@ratingNew" /></div>
+ <div class="arenareport-header-double-txt-r">
+ <div class="reldiv">
+ <div class="arenareport-loser1-r"><xsl:value-of select="$pathLoser/@name" /></div>
+ <div class="arenareport-loser2-r"><xsl:value-of select="$pathLoser/@name" /></div>
+ </div>
+ </div>
+ <div style="position: absolute;color: white; margin: 125px 0 0 -170px;">
+ <div class="reldiv">
+ <div class="arenareport-pathloser1"><xsl:value-of select="$pathLoser/@realm" /></div>
+ <div class="arenareport-pathloser2"><xsl:value-of select="$pathLoser/@realm" /></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div style="width: 100%; clear: both; height: 1px;">
+ <div class="reldiv">
+ <div style="margin-top: -60px; width: 100%; position: absolute;">
+ <table>
+ <tr>
+ <td class="halfwidth"></td>
+ <td class="buttonside" valign="top"><div class="buttonleft"/></td>
+ <td class="buttonmid">
+ <div class="buttonmidbg">
+ <div class="reldiv">
+ <div class="arenareport-defeats1"><xsl:value-of select="$loc/strs/arenaReport/str[@id='defeats']"/></div>
+ </div>
+ <div class="arenareport-defeats2"><xsl:value-of select="$loc/strs/arenaReport/str[@id='defeats']"/></div>
+ </div>
+ </td>
+ <td class="buttonside" valign="top">
+ <div class="buttonright"/>
+ </td>
+ <td class="halfwidth"></td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="matchstats">
+ <xsl:value-of select="$loc/strs/arenaReport/str[@id='gameInfo.map']"/>&#160;
+ <span><xsl:value-of select="/page/game/@map" /></span>
+
+ <xsl:value-of select="$loc/strs/arenaReport/str[@id='gameInfo.startTime']"/>&#160;
+ <span id="matchStartTime"><xsl:value-of select="/page/game/@matchStartTime" /></span>
+
+ <xsl:value-of select="$loc/strs/arenaReport/str[@id='gameInfo.matchLength']"/>&#160;
+ <span id="matchLength"><xsl:value-of select="/page/game/@matchLength" /></span>
+ </div>
+
+
+ <div class="data">
+ <table id="arenaGameTable" class="data-table sortTable" cellpadding="0" cellspacing="0" style="width: 100%">
+ <thead>
+ <tr class="masthead">
+ <th style="text-align:left; width: 120px; min-width:120px;">
+ <a><xsl:value-of select="$loc/strs/itemInfo/str[@id='armory.item-info.label.name']"/><span class='sortArw'> </span></a>
+ </th>
+ <th style="text-align:left; width: 250px; white-space:nowrap">
+ <a><xsl:value-of select="$loc/strs/arena/str[@id='team-name']"/><span class='sortArw'> </span></a>
+ </th>
+ <th style="text-align:left; width: 120px;">
+ <a><xsl:value-of select="$loc/strs/unsorted/str[@id='armory.labels.race-class']"/><span class='sortArw'> </span></a>
+ </th>
+ <th class="numericSort" style="text-align:left;">
+ <a class="staticTip" onmouseover="setTipText('{$loc/strs/arena/str[@id='killingblows']}')">
+ <xsl:value-of select="$loc/strs/arena/str[@id='killingblows.short']"/><span class='sortArw'> </span></a>
+ </th>
+ <th class="numericSort" style="text-align:left;">
+ <a class="staticTip" onmouseover="setTipText('{$loc/strs/arena/str[@id='dmgout']}')">
+ <xsl:value-of select="$loc/strs/arena/str[@id='dmgout.short']"/><span class='sortArw'> </span></a>
+ </th>
+ <th class="numericSort" style="text-align:left;">
+ <a class="staticTip" onmouseover="setTipText('{$loc/strs/arena/str[@id='dmgin']}')">
+ <xsl:value-of select="$loc/strs/arena/str[@id='dmgin.short']"/><span class='sortArw'> </span></a>
+ </th>
+ <th class="numericSort" style="text-align:left;">
+ <a class="staticTip" onmouseover="setTipText('{$loc/strs/arena/str[@id='healout']}')">
+ <xsl:value-of select="$loc/strs/arena/str[@id='healout.short']"/><span class='sortArw'> </span></a>
+ </th>
+ <th class="numericSort" style="text-align:left;">
+ <a class="staticTip" onmouseover="setTipText('{$loc/strs/arena/str[@id='healin']}')">
+ <xsl:value-of select="$loc/strs/arena/str[@id='healin.short']"/><span class='sortArw'> </span></a>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <xsl:for-each select="/page/game/team">
+ <xsl:variable name="teamName" select="@name" />
+ <xsl:variable name="isDeleted" select="@deleted" />
+ <xsl:variable name="teamUrl" select="@teamUrl" />
+ <xsl:for-each select="current()/member">
+ <xsl:variable name="classTxt" select="$loc/strs/classes/str[@id=concat('armory.classes.class.',current()/@classId,'.',current()/@genderId)]" />
+ <xsl:variable name="raceTxt" select="$loc/strs/races/str[@id=concat('armory.races.race.',current()/@raceId,'.',current()/@genderId)]" />
+ <xsl:variable name="factionTxt" select="$loc/strs/unsorted/str[@id=concat('armory.labels.faction.',current()/@factionId)]" />
+ <tr>
+ <td><a href="character-sheet.xml?{@url}"><xsl:value-of select="@characterName"/></a></td>
+ <td style="overflow:hidden;">
+ <xsl:choose>
+ <xsl:when test="$isDeleted = 'true'">
+ <a href="javascript:void(0)" class="graphLink delGraphLink staticTip"
+ onmouseover="setTipText('{$loc/strs/arena/str[@id='deletedTeam']}');" />
+ <a href="javascript:void(0)" class="truncateMe graphTxt staticTip deletedTeam"
+ onmouseover="setTipText('{$loc/strs/arena/str[@id='deletedTeam']}');"><xsl:value-of select="$teamName" /></a>
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="arena-team-game-chart.xml?{$teamUrl}" class="graphLink staticTip"
+ onmouseover="setTipText('{$loc/strs/arenaReport/str[@id='viewTeamHistory']}');" />
+ <a class="truncateMe graphTxt staticTip" onmouseover="setTipText('{$loc/strs/arenaReport/str[@id='viewTeamProfile']}');"
+ href="team-info.xml?{$teamUrl}"><xsl:value-of select="$teamName"/></a>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ <td class="centNum">
+ <img class="staticTip" onmouseover="setTipText('{$raceTxt}');" src="images/icons/race/{@raceId}-{@genderId}.gif" />&#160;
+ <img class="staticTip" onmouseover="setTipText('{$classTxt}');" src="images/icons/class/{@classId}.gif" />
+ </td>
+ <td class="rightNum"><xsl:value-of select="@killingBlows" /></td>
+ <td class="rightNum"><xsl:value-of select="@damageDone" /></td>
+ <td class="rightNum"><xsl:value-of select="@damageTaken" /></td>
+ <td class="rightNum"><span style="display:none"><xsl:value-of select="@healingDone" /></span><xsl:value-of select="@healingDone" /></td>
+ <td class="rightNum"><xsl:value-of select="@healingTaken" /></td>
+ </tr>
+ </xsl:for-each>
+ </xsl:for-each>
+ </tbody>
+ </table>
+ </div>
+</xsl:template>
+
+
+</xsl:stylesheet>
View
404 _layout/arena/arenareport-graph.xsl
@@ -0,0 +1,404 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="html" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
+
+<!-- global vars -->
+
+<xsl:variable name="docHeader" select="document(concat('../../team-info.xml?', /page/gameListingChart/arenaTeam/@teamUrl))/page/teamInfo/arenaTeam" />
+<xsl:variable name="season" select="/page/season/@id" />
+<xsl:variable name="teamUrl" select="/page/gameListingChart/arenaTeam/@teamUrl" />
+
+<xsl:include href="../includes.xsl"/>
+<xsl:include href="header.xsl"/>
+
+<xsl:variable name="teamUrlFlash">
+ <xsl:call-template name="search-and-replace">
+ <xsl:with-param name="input" select="$teamUrl" />
+ <xsl:with-param name="search-string" select="'&amp;'" />
+ <xsl:with-param name="replace-string" select="'%26'" />
+ </xsl:call-template>
+</xsl:variable>
+
+<!-- layout call -->
+<xsl:template match="page/gameListingChart"><link rel="stylesheet" href="_css/arena-report.css" /><link rel="stylesheet" href="_css/datepicker.css" />
+
+ <div id="dataElement">
+ <div class="parchment-top">
+ <xsl:call-template name="arenaReportGraphHolder" />
+ </div>
+ </div>
+</xsl:template>
+
+<xsl:template name="arenaReportGraphHolder">
+ <xsl:choose>
+ <xsl:when test="not(/page/gameListingChart/arenaTeam)">
+ <div class="parchment-content">
+ <div class="list">
+ <div class="full-list notab">
+ <div class="info-pane" style="height: 300px;">
+ <div style="height: 200px; padding: 10px; text-align:center;">
+ <xsl:value-of select="$loc/strs/arena/str[@id='error.nodata']"/>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <div class="parchment-content">
+ <div class="list">
+ <xsl:call-template name="tabs">
+ <xsl:with-param name="tabGroup" select="'arenaTeam'" />
+ <xsl:with-param name="currTab" select="'matchHistory'" />
+ <xsl:with-param name="subTab" select="''" />
+ <xsl:with-param name="tabUrlAppend" select="/page/gameListingChart/arenaTeam/@teamUrl" />
+ <xsl:with-param name="subtabUrlAppend" select="''" />
+ </xsl:call-template>
+ <div class="full-list">
+ <div class="info-pane">
+ <xsl:call-template name="arenaReportGraphContent" />
+ </div>
+ </div>
+ </div>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+<xsl:template name="arenaReportGraphContent">
+
+ <!-- call team header -->
+ <xsl:call-template name="arenareport-header">
+ <xsl:with-param name="parchtitle" select="'Match History'"/>
+ <xsl:with-param name="teamSize" select="/page/gameListingChart/arenaTeam/@teamSize"/>
+ <xsl:with-param name="whichPage" select="'team'"/>
+ <xsl:with-param name="docHeader" select="/page/gameListingChart/arenaTeam" />
+ </xsl:call-template>
+
+ <!-- match history graph title -->
+ <div class="filterTitle">
+ <xsl:value-of select="$loc/strs/arenaReport/str[@id='matchhistorygraphfor']"/>
+ <span class="detailsBlueItalicDates">
+ (<span id="blueStartDate" /> - <span id="blueEndDate" />)
+ </span>
+ </div>
+ <xsl:choose>
+ <xsl:when test="not(/page/gameListingChart/games/game)">
+ <div id="graphNone">
+ <xsl:value-of select="$loc/strs/arenaReport/str[@id='nogames']"/>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="gameGraph" />
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+
+
+<xsl:template name="gameGraph">
+
+ <script type="text/javascript" src="_js/arena-report/graph.js"></script>
+
+ <script type="text/javascript">
+ $(document).ready(function(){
+ //"no search results" text, season start date, season end date
+ initializeArenaReportGraph(
+ "<xsl:value-of select="$loc/strs/unsorted/str[@id='armory.search.label.noSearchResults']" />",
+ "<xsl:value-of select="/page/season/@start" />",
+ "<xsl:value-of select="/page/season/@end" />",
+ "<xsl:value-of select="/page/gameListingChart/games/game/@realmOffset" />",
+ "<xsl:value-of select="/page/gameListingChart/arenaTeam/@highestRating" />",
+ "<xsl:value-of select="/page/gameListingChart/arenaTeam/@lowestRating" />",
+ "<xsl:value-of select="/page/gameListingChart/arenaTeam/@battleGroup" />",
+ "<xsl:value-of select="$loc/strs/arena/str[@id='current']"/>"
+ );
+ });
+ </script>
+ <span id="gameStartVal" style="display:none; width: 0; height: 0;"><xsl:value-of select="/page/season/@start" /></span>
+ <span id="serverOffset" style="display:none; width: 0; height: 0;"><xsl:value-of select="/page/gameListingChart/games/game/@realmOffset" /></span>
+
+
+ <!-- flash graph -->
+ <div id="graphContainer">
+ <div id="infoBubbleHolder">
+
+ <div id="rightBubble" style="white-space:nowrap">
+ <div id="textEndDate" style="white-space:nowrap"></div>
+ <span class="detailsBrownItalic" style="white-space:nowrap"><xsl:value-of select="$loc/strs/arenaReport/str[@id='ratingcolon']"/></span>
+ <span id="textRatingRight" class="detailsBrownItalicLarge" style="white-space:nowrap"/>
+ </div>
+
+ <div style="width: 340px; height: 39px; left: 279px; position: absolute;">
+ <div id="containerDetails">
+ <div style="position: absolute; margin: 9px 0 0 8px;">
+ <span class="detailsBrownItalic" style="padding-right: 5px; white-space:nowrap;">
+ <xsl:value-of select="$loc/strs/arenaReport/str[@id='datecolon']"/>
+ </span>
+ <span id="textDate" class="bold detailsBlueItalic" style="white-space:nowrap;"/>
+ </div>
+ <div style="position: absolute; margin: 27px 0 0 8px;">
+ <span class="detailsBrownItalic" style="padding-right: 5px; white-space:nowrap;">
+ <xsl:value-of select="$loc/strs/arenaReport/str[@id='opponentcolon']"/>
+ </span>
+ <span id="textOpponent" class="bold detailsBlueItalic"/>
+ </div>
+ <div style="position: absolute; margin: 15px 0 0 165px; width: 150px; text-align: right; height: 30px; line-height: 22px;">
+ <span id="textRatingNew" style="white-space:nowrap"/>
+ </div>
+ <div style="position: absolute; margin: 11px 0 0 290px; width: 50px; text-align: right; height: 30px;line-height: 22px;;">
+ <span id="textRatingChange" class="detailsRatingChangeGreen" style="white-space:nowrap"/>
+ </div>
+ </div>
+ <div id="containerDelta" style="white-space:nowrap">
+ <div style="position: absolute; margin: 9px 0 0 8px;">
+ <span class="detailsBlueItalic" style="white-space:nowrap;"><xsl:value-of select="$loc/strs/arenaReport/str[@id='gamesdisplayed']"/></span>
+ <span id="textGamesPlayed" class="bold detailsBrown" style="white-space:nowrap;"/>&#xa0;
+ <span class="bold detailsBrown" style="white-space:nowrap;"><xsl:value-of select="$loc/strs/arenaReport/str[@id='of']"/></span>&#xa0;
+ <span id="textTotalGames" class="bold detailsBrown" style="white-space:nowrap;"/>
+ </div>
+ <div style="position: absolute; margin: 26px 0 0 8px; white-space:nowrap;">
+ <span class="detailsBlueItalic staticTip" onmouseover="setTipText('{$loc/strs/arenaReport/str[@id='netchange.selection']}')"
+ style="white-space:nowrap;"><xsl:value-of select="$loc/strs/arenaReport/str[@id='netchange.selection.short']"/></span>
+ <span id="textRatingChangeInterval" class="bold" style="white-space:nowrap;"/>
+ <span class="limitAverageBrown" style="padding-left: 10px;">
+ (
+ <xsl:apply-templates mode="printf" select="$loc/strs/arenaReport/str[@id='averagechange']">
+ <xsl:with-param name="param1">
+ <span id="textRatingChangeAverage" style="white-space:nowrap;"/>
+ </xsl:with-param>
+ </xsl:apply-templates>
+ )
+ </span>
+ </div>
+ </div>
+ </div>
+
+ <div id="leftBubble" style="white-space:nowrap">
+ <div id="textStartDate" style="white-space:nowrap;"></div>
+ <span class="detailsBrownItalic" style="white-space:nowrap;"><xsl:value-of select="$loc/strs/arenaReport/str[@id='ratingcolon']"/></span>
+ <span id="textRatingLeft" style="white-space:nowrap;" class="detailsBrownItalicLarge"/>
+ </div>
+ </div>
+
+
+ <div id="arenaFlashOuter">
+ <xsl:call-template name="flash">
+ <xsl:with-param name="id" select="'arenaflash'"/>
+ <xsl:with-param name="src" select="'_flash/graph.swf'"/>
+ <xsl:with-param name="base" select="''"/>
+ <xsl:with-param name="wmode" select="'transparent'"/>
+ <xsl:with-param name="width" select="'875'"/>
+ <xsl:with-param name="height" select="'470'"/>
+ <xsl:with-param name="quality" select="'autohigh'"/>
+ <xsl:with-param name="flashvars" select="concat('arenaSeason=', $season, '&amp;teamSize=',
+ /page/gameListingChart/arenaTeam/@teamSize, '&amp;teamRealm=',
+ /page/gameListingChart/arenaTeam/@realm,'&amp;teamName=',/page/gameListingChart/arenaTeam/@name)"/>
+ <xsl:with-param name="noflash" select="concat('&lt;div class=teamicon-noflash&gt;&lt;a target=_blank href=http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&gt;&lt;img src=images/',$lang,'/getflash.png class=p/&gt;&lt;/a&gt;&lt;/div&gt;')"/>
+ </xsl:call-template>
+ </div>
+
+
+ <div id="graphBottom">
+ <a id="matchHighlight" class="detailsBlueItalic" style="margin: 0 25px 0 0; display: none;" href="javascript:FnClearHighlightInFlash();">
+ <xsl:value-of select="$loc/strs/arenaReport/str[@id='clearmatchhighlight']"/>
+ </a>
+ <a class="detailsBlueItalic" style="margin: 0 15px 0 0;" href="javascript:FnViewRecentInFlash();">
+ <xsl:value-of select="$loc/strs/arenaReport/str[@id='viewrecentgames']"/>
+ </a>
+ <a class="detailsBlueItalic" style="margin: 0 15px 0 0;" href="javascript:FnViewSeasonInFlash();">
+ <xsl:value-of select="$loc/strs/arenaReport/str[@id='viewcompleteseason']"/>
+ </a>
+ </div>
+ </div>
+
+ <div id="matchHolder">
+ <!-- show sortable table -->
+ <xsl:call-template name="matchTable" />
+ </div>
+
+ <div id="errorLoadingArenaData" style="display: none;">
+ <xsl:value-of select="$loc/strs/guildBank/str[@id='errorcontent']"/>
+ </div>
+</xsl:template>
+
+<xsl:template name="matchTable">
+ <div class="filterTitle">
+ <xsl:value-of select="$loc/strs/arenaReport/str[@id='matchhistoryfilters']"/>
+ </div>
+
+ <div class="filtercontainer">
+ <div id="opponentFilter" class="filterBox">
+ <xsl:value-of select="$loc/strs/arena/str[@id='opponent']" /><br />
+ <input id="opponentVal" type="text" size="30" maxlength="30" value="" class="filterInput" style="width: 200px;"/>
+ </div>
+ <div id="dateRange" class="filterBox">
+ <xsl:value-of select="$loc/strs/arenaReport/str[@id='filter.dateRange']" /><br />
+ <span id="dateStart" class="filterInput"></span>
+ <a id="dateStartLink" class="calIcon" href="javascript:void(0)"> </a>
+ <span class="inlineTxt"> - </span>
+ <span id="dateEnd" class="filterInput"></span>
+ <a id="dateEndLink" class="calIcon" href="javascript:void(0)"> </a>
+ </div>
+
+ <div id="rating" class="filterBox">
+ <xsl:value-of select="$loc/strs/arenaReport/str[@id='filter.ratingBetween']" /><br />
+ <input id="ratingMin" type="text" maxlength="4" value="{/page/gameListingChart/arenaTeam/@lowestRating}" class="filterInput" />
+ <span class="inlineTxt"> - </span>
+ <input id="ratingMax" type="text" maxlength="4" value="{/page/gameListingChart/arenaTeam/@highestRating}" class="filterInput" />
+ </div>
+
+ <div id="ratingChangeBox" class="filterBox">
+ <xsl:value-of select="$loc/strs/arenaReport/str[@id='filter.ratingChange']" /><br />
+ <select id="ratingLogic" style="width: 60px; margin-right: 5px; float: left;">
+ <option value="all"><xsl:value-of select="$loc/strs/arenaReport/str[@id='filter.all']" /></option>
+ <option value="eq">=</option>
+ <option value="gt">&gt;</option>
+ <option value="gte">&gt;=</option>
+ <option value="lt">&lt;</option>
+ <option value="lte">&lt;=</option>
+ </select>
+ <input id="ratingChange" type="text" maxlength="4" value="" class="filterInput" />
+ </div>
+ <div class="clear"></div>
+
+ <div id="filterButtonHolder">
+ <a id="runFilterButton" href="javascript:void(0)" onclick="runFilters();">
+ <span class="btnRight"><xsl:value-of select="$loc/strs/guildBank/str[@id='runfilters']"/></span>
+ </a>
+ <a id="resetFilterButton" href="javascript:void(0)" onclick="resetFilters();">
+ <xsl:value-of select="$loc/strs/guildBank/str[@id='resetfilters']"/>
+ </a>
+ </div>
+
+ <div class="clear"></div>
+ </div>
+
+ <div id="pager" class="pager page-body" style="text-align:right;">
+ <form id="pagingForm" style="margin: 0; padding: 0; display: inline;" onsubmit="return false;">
+ <div id="searchTypeHolder"></div>
+ <div style="float: left; margin-left: 5px;">
+ <!-- Page X of X -->
+ <xsl:apply-templates mode="printf" select="$loc/strs/itemsOptions/str[@id='armory.search.paging']">
+ <xsl:with-param name="param1">
+ <input id="pagingInput" type="text" />
+ </xsl:with-param>
+ <xsl:with-param name="param2">
+ <span id="totalPages"></span>
+ </xsl:with-param>
+ </xsl:apply-templates>
+ </div>
+ <div style="float: left; margin-left: 25px; line-height: 24px; height: 24px;">
+ <!-- showing X of X results -->
+ <xsl:apply-templates mode="printf" select="$loc/strs/itemsOptions/str[@id='armory.search.showing']">
+ <xsl:with-param name="param1">
+ <span id="currResults" class="bold"><xsl:value-of select="count(/page/gameListingChart/games/game)" /></span>
+ </xsl:with-param>
+ <xsl:with-param name="param2">
+ <span id="totalResults" class="bold"><xsl:value-of select="count(/page/gameListingChart/games/game)" /></span>
+ </xsl:with-param>
+ </xsl:apply-templates>
+ </div>
+ <div id="pageSelector" style="float: right">
+ <a class="firstPg firstPg-on" href="javascript:void(0)"> </a>
+ <a class="prevPg prevPg-on" href="javascript:void(0)"> </a>
+ <a id="pageSelect1" class="p" href="javascript:void(0)"> </a>
+ <a id="pageSelect2" class="p" href="javascript:void(0)"> </a>
+ <a id="pageSelect3" class="p" href="javascript:void(0)"> </a>
+ <a class="nextPg nextPg-on" href="javascript:void(0)"> </a>
+ <a class="lastPg lastPg-on" href="javascript:void(0)"> </a>
+ </div>
+ <xsl:value-of select="$loc/strs/arena/str[@id='resultsPerPage']"/>
+ <select id="pageSize">
+ <option selected="selected" value="10">10</option>
+ <option value="20">20</option>
+ <option value="30">30</option>
+ <option value="40">40</option>
+ </select>
+ </form>
+ </div>
+
+ <div class="data">
+ <table id="matchTable" class="data-table sortTable" cellpadding="0" cellspacing="0" style="width: 100%">
+ <thead>
+ <tr class="masthead">
+ <th style="text-align:left; width: 400px;"><a><xsl:value-of select="$loc/strs/arena/str[@id='opponent']"/><span class='sortArw'> </span></a></th>
+ <th style="text-align:left; width: 120px;"><a><xsl:value-of select="$loc/strs/arena/str[@id='newrating']"/><span class='sortArw'> </span></a></th>
+ <th style="text-align:left;">
+ <a class="staticTip" onmouseover="setTipText('{$loc/strs/arena/str[@id='overallchange.tooltip']}')">
+ <xsl:value-of select="$loc/strs/arena/str[@id='overallchange']"/><span class='sortArw'> </span></a>
+ </th>
+ <th style="text-align: left; width: 270px;">
+ <a style="padding-left: 10px;"><xsl:value-of select="$loc/strs/arena/str[@id='date']"/><span class='sortArw'> </span></a>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <xsl:for-each select="/page/gameListingChart/games/game">
+ <tr>
+ <td>
+ <span style="display: none;"><xsl:value-of select="@ot" /></span>
+ <xsl:choose>
+ <xsl:when test="@deleted = 'true'">
+ <a href="javascript:void(0)" class="graphLink delGraphLink staticTip"
+ onmouseover="setTipText('{$loc/strs/arena/str[@id='deletedTeam']}');" />
+ <a href="javascript:void(0)" class="graphTxt staticTip deletedTeam"
+ onmouseover="setTipText('{$loc/strs/arena/str[@id='deletedTeam']}');"><xsl:value-of select="@ot" /></a>
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="arena-team-game-chart.xml?{@teamUrl}" class="graphLink staticTip"
+ onmouseover="setTipText('{$loc/strs/arenaReport/str[@id='viewTeamHistory']}');" />
+ <a class="graphTxt staticTip" onmouseover="setTipText('{$loc/strs/arenaReport/str[@id='viewTeamProfile']}');"
+ href="team-info.xml?{@teamUrl}"><xsl:value-of select="@ot" /></a>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ <td class="rightNum"><xsl:value-of select="@r" /></td>
+ <td class="rightNum">
+ <!-- calc change -->
+ <xsl:choose>
+ <xsl:when test="position() = 1">
+ <xsl:call-template name="ratingChange">
+ <xsl:with-param name="ratingNum" select="current()/@r - 0" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="lastPos" select="position() - 1" />
+ <xsl:call-template name="ratingChange">
+ <xsl:with-param name="ratingNum" select="current()/@r - /page/gameListingChart/games/game[$lastPos]/@r" />
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ <td style="font-weight: normal;">
+ <span style="display: none;"><xsl:value-of select="@st" /></span>
+ <span class="timeFormat"><xsl:value-of select="@st" /></span>
+ <a class="staticTip goToMatchReport" onmouseover="setTipText('{$loc/strs/arena/str[@id='goToMatchReport']}')"
+ href="arena-game.xml?gid={@id}&amp;r={/page/gameListingChart/arenaTeam/@realmName}"> </a>
+ <a class="staticTip findMatch" onmouseover="setTipText('{$loc/strs/arena/str[@id='findMatch']}')"
+ href="javascript:void(0)" onclick="FnHighlightInFlash('{@id}')"></a>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </tbody>
+ </table>
+ </div>
+
+</xsl:template>
+
+
+<!-- shows +/- and color for rating change -->
+<xsl:template name="ratingChange">
+ <xsl:param name="ratingNum" />
+ <span style="font-weight: bold; color: #336600; text-align:right">
+ <xsl:if test="$ratingNum &lt; 0">
+ <xsl:attribute name="style">font-weight: bold; color: #CC0000;</xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$ratingNum &gt; 0">+</xsl:if>
+ <xsl:value-of select="$ratingNum" />
+ </span>
+</xsl:template>
+
+</xsl:stylesheet>
View
212 _layout/arena/opposing-teams.xsl
@@ -0,0 +1,212 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="html" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
+
+<!-- global vars -->
+<xsl:variable name="season" select="/page/season/@id" />
+<xsl:variable name="teamUrl" select="/page/arenaGameOpposingTeamsReport/arenaTeam/@teamUrl" />
+
+<xsl:include href="../includes.xsl"/>
+<xsl:include href="header.xsl"/>
+
+<xsl:variable name="teamUrlFlash">
+ <xsl:call-template name="search-and-replace">
+ <xsl:with-param name="input" select="$teamUrl" />
+ <xsl:with-param name="search-string" select="'&amp;'" />
+ <xsl:with-param name="replace-string" select="'%26'" />
+ </xsl:call-template>
+</xsl:variable>
+
+<!-- layout call -->
+<xsl:template match="page/arenaGameOpposingTeamsReport">
+
+ <xsl:choose>
+ <xsl:when test="not(/page/arenaGameOpposingTeamsReport/arenaTeam )">
+ <div id="dataElement">
+ <div class="parchment-top">
+ <div class="parchment-content">
+ <div class="list">
+ <div class="full-list notab">
+ <div class="info-pane" style="height: 300px;">
+ <div style="height: 200px; padding: 10px; text-align:center;">
+ <xsl:value-of select="$loc/strs/arena/str[@id='error.nodata']"/>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <link rel="stylesheet" href="_css/arena-report.css" />
+ <link rel="stylesheet" href="_css/datepicker.css" />
+ <script type="text/javascript" src="_js/arena-report/opposing-teams.js"></script>
+ <script type="text/javascript">
+ $(document).ready(function(){
+ initializeOpposingTeams();
+ });
+ </script>
+
+ <div id="dataElement">
+ <div class="parchment-top">
+ <xsl:call-template name="opponentHistoryHolder" />
+ </div>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="opponentHistoryHolder">
+ <div class="parchment-content">
+ <div class="list">
+ <xsl:call-template name="tabs">
+ <xsl:with-param name="tabGroup" select="'arenaTeam'" />
+ <xsl:with-param name="currTab" select="'opponentHistory'" />
+ <xsl:with-param name="subTab" select="''" />
+ <xsl:with-param name="tabUrlAppend" select="/page/arenaGameOpposingTeamsReport/arenaTeam/@teamUrl" />
+ <xsl:with-param name="subtabUrlAppend" select="''" />
+ </xsl:call-template>
+ <div class="full-list">
+ <div class="info-pane">
+ <xsl:call-template name="opponentHistoryContent" />
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</xsl:template>
+
+
+<xsl:template name="opponentHistoryContent">
+ <xsl:call-template name="arenareport-header">
+ <xsl:with-param name="docHeader" select="/page/arenaGameOpposingTeamsReport/arenaTeam"/>
+ <xsl:with-param name="whichPage" select="'team'"/>
+ <xsl:with-param name="teamSize" select="/page/arenaGameOpposingTeamsReport/arenaTeam/@teamSize"/>
+ </xsl:call-template>
+
+ <div id="pager" class="pager page-body" style="text-align:right;">
+ <form id="pagingForm" style="margin: 0; padding: 0; display: inline;" onsubmit="return false;">
+ <div id="searchTypeHolder"></div>
+ <div style="float: left; margin-left: 5px;">
+ <xsl:apply-templates mode="printf" select="$loc/strs/itemsOptions/str[@id='armory.search.paging']">
+ <xsl:with-param name="param1">
+ <input id="pagingInput" type="text" />
+ </xsl:with-param>
+ <xsl:with-param name="param2">
+ <span id="totalPages"></span>
+ </xsl:with-param>
+ </xsl:apply-templates>
+ </div>
+ <div style="float: left; margin-left: 25px; line-height: 24px; height: 24px;">
+ <!-- showing X of X results -->
+ <xsl:apply-templates mode="printf" select="$loc/strs/itemsOptions/str[@id='armory.search.showing']">
+ <xsl:with-param name="param1">
+ <span id="currResults" class="bold"><xsl:value-of select="count(/page/arenaGameOpposingTeamsReport/opposingTeam )" /></span>
+ </xsl:with-param>
+ <xsl:with-param name="param2">
+ <span id="totalResults" class="bold"><xsl:value-of select="count(/page/arenaGameOpposingTeamsReport/opposingTeam )" /></span>
+ </xsl:with-param>
+ </xsl:apply-templates>
+ </div>
+ <div id="pageSelector" style="float: right">
+ <a class="firstPg firstPg-on" href="javascript:void(0)"> </a>
+ <a class="prevPg prevPg-on" href="javascript:void(0)"> </a>
+ <a id="pageSelect1" class="p" href="javascript:void(0)"> </a>
+ <a id="pageSelect2" class="p" href="javascript:void(0)"> </a>
+ <a id="pageSelect3" class="p" href="javascript:void(0)"> </a>
+ <a class="nextPg nextPg-on" href="javascript:void(0)"> </a>
+ <a class="lastPg lastPg-on" href="javascript:void(0)"> </a>
+ </div>
+ <xsl:value-of select="$loc/strs/arena/str[@id='resultsPerPage']"/>
+ <select id="pageSize">
+ <option selected="selected" value="10">10</option>
+ <option value="20">20</option>
+ <option value="30">30</option>
+ <option value="40">40</option>
+ </select>
+ </form>
+ </div>
+
+
+ <div class="data">
+ <table id="teamsTable" class="data-table sortTable" cellpadding="0" cellspacing="0" style="width: 100%">
+ <thead>
+ <tr class="masthead">
+ <th style="text-align:left; width: 260px;"><a><xsl:value-of select="$loc/strs/arena/str[@id='opponent']"/><span class='sortArw'> </span></a></th>
+ <th style="text-align:left; width: 200px;">
+ <a><xsl:value-of select="$loc/strs/unsorted/str[@id='armory.labels.realm']"/><span class='sortArw'> </span></a>
+ </th>
+ <th class="numericSort">
+ <a class="staticTip" onmouseover="setTipText('{$loc/strs/arena/str[@id='totalgames']}')">
+ <xsl:value-of select="$loc/strs/arena/str[@id='totalgames.short']"/><span class='sortArw'> </span></a>
+ </th>
+ <th class="numericSort">
+ <a class="staticTip" onmouseover="setTipText('{$loc/strs/arena/str[@id='wins']}')">
+ <xsl:value-of select="$loc/strs/arena/str[@id='wins.short']"/><span class='sortArw'> </span></a>
+ </th>
+ <th class="numericSort">
+ <a class="staticTip" onmouseover="setTipText('{$loc/strs/arena/str[@id='losses']}')">
+ <xsl:value-of select="$loc/strs/arena/str[@id='losses.short']"/><span class='sortArw'> </span></a>
+ </th>
+ <th class="numericSort"><a><xsl:value-of select="$loc/strs/arena/str[@id='winp']"/><span class='sortArw'> </span></a></th>
+ <th>
+ <a class="staticTip" onmouseover="setTipText('{$loc/strs/arena/str[@id='overallchange.tooltip']}')">
+ <xsl:value-of select="$loc/strs/arena/str[@id='overallchange']"/><span class='sortArw'> </span></a>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <xsl:for-each select="/page/arenaGameOpposingTeamsReport/opposingTeam">
+ <tr>
+ <td valign="middle">
+ <span style="display: none;"><xsl:value-of select="@teamName" /></span>
+ <xsl:choose>
+ <xsl:when test="@deleted = 'true'">
+ <a href="javascript:void(0)" class="graphLink delGraphLink staticTip"
+ onmouseover="setTipText('{$loc/strs/arena/str[@id='deletedTeam']}');" />
+ <a href="javascript:void(0)" class="graphTxt staticTip deletedTeam"
+ onmouseover="setTipText('{$loc/strs/arena/str[@id='deletedTeam']}');"><xsl:value-of select="@teamName" /></a>
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="arena-team-game-chart.xml?{@teamUrl}" class="graphLink staticTip"
+ onmouseover="setTipText('{$loc/strs/arenaReport/str[@id='viewTeamHistory']}');" />
+ <a class="graphTxt staticTip" onmouseover="setTipText('{$loc/strs/arenaReport/str[@id='viewTeamProfile']}');"
+ href="team-info.xml?{@teamUrl}"><xsl:value-of select="@teamName" /></a>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ <td><xsl:value-of select="@realm" /></td>
+ <td class="rightNum"><span style="display: none;"><xsl:value-of select="@games" /></span><xsl:value-of select="@games" /></td>
+ <td class="rightNum"><xsl:value-of select="@wins" /></td>
+ <td class="rightNum"><xsl:value-of select="@losses" /> </td>
+ <td class="rightNum"><xsl:value-of select="@winPer" />%</td>
+ <td class="rightNum">
+ <span style="display: none;"><xsl:value-of select="@rd" /></span>
+ <a href="arena-team-game-chart.xml?{/page/arenaGameOpposingTeamsReport/arenaTeam/@teamUrl}&amp;_opp={@teamName}"
+ class="matchReportDetails staticTip" onmouseover="setTipText('{$loc/strs/arena/str[@id='viewmatchhistory']}');" />
+ <xsl:call-template name="ratingChange"><xsl:with-param name="ratingNum" select="@rd" /></xsl:call-template>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </tbody>
+ </table>
+ </div>
+
+</xsl:template>
+
+<!-- shows +/- and color for rating change -->
+<xsl:template name="ratingChange">
+ <xsl:param name="ratingNum" />
+ <span class="graphTxt" style="font-weight: bold; color: #336600; text-align:right;">
+ <xsl:if test="$ratingNum &lt; 0">
+ <xsl:attribute name="style">font-weight: bold; color: #CC0000;</xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$ratingNum &gt; 0">+</xsl:if>
+ <xsl:value-of select="$ratingNum" />
+ </span>
+</xsl:template>
+
+</xsl:stylesheet>
View
13 _layout/nav/tabs.xml
@@ -27,6 +27,12 @@
</tabGroup>
<tabGroup id="arenaTeam">
<tab href="team-info.xml" id="teamInfo" key="armory.arenatab.teamprofile"/>
+ <tab href="arena-team-game-chart.xml" id="matchHistory" key="armory.arenatab.matchhistory">
+ <exclude region="CN"/>
+ </tab>
+ <tab href="arena-team-report-opposing-teams.xml" id="opponentHistory" key="armory.arenatab.opponenthistory">
+ <exclude region="CN"/>
+ </tab>
</tabGroup>
<tabGroup id="dungeons_and_factions">
<tab href="factions.xml" id="factions" key="armory.tabs.factions">
@@ -65,4 +71,11 @@
</tab>
<tab href="arena-calculator.xml" id="arenaCalculator" key="armory.arenatab.calc"/>
</tabGroup>
+ <tabGroup id="auctionHouse">
+ <tab href="#summary" id="summary" key="auction.tabs.summary" onclick="Auction.openPage('summary');"/>
+ <tab href="#search" id="search" key="auction.tabs.browseAuctions" onclick="Auction.openPage('search');"/>
+ <tab href="#bids" id="bids" key="auction.tabs.myBids" onclick="Auction.openPage('bids');"/>
+ <tab href="#auctions" id="auctions" key="auction.tabs.myAuctions" onclick="Auction.openPage('auctions');"/>
+ <tab href="#create" id="create" key="auction.tabs.createAuction" onclick="Auction.openPage('create');"/>
+ </tabGroup>
</tabGroups>
View
98 arena-game.php
@@ -0,0 +1,98 @@
+<?php
+
+/**
+ * @package World of Warcraft Armory
+ * @version Release Candidate 1
+ * @revision 271
+ * @copyright (c) 2009-2010 Shadez
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ **/
+
+define('__ARMORY__', true);
+define('load_arenateams_class', true);
+define('load_characters_class', true);
+if(!@include('includes/armory_loader.php')) {
+ die('<b>Fatal error:</b> unable to load system files.');
+}
+header('Content-type: text/xml');
+$page_fail = false;
+if(isset($_GET['gid'])) {
+ $gID = (int) $_GET['gid'];
+ $arenateams->SetGameID($gID);
+}
+$game_data = $arenateams->GetGameInfo();
+if($arenateams->GetGameID() === false || !is_array($game_data)) {
+ // Load XSLT template
+ $xml->LoadXSLT('error/error.xsl');
+ $xml->XMLWriter()->startElement('page');
+ $xml->XMLWriter()->writeAttribute('globalSearch', 1);
+ $xml->XMLWriter()->writeAttribute('lang', $armory->_locale);
+ $xml->XMLWriter()->startElement('errorhtml');
+ $xml->XMLWriter()->endElement(); //errorhtml
+ $xml->XMLWriter()->endElement(); //page
+ echo $xml->StopXML();
+ exit;
+}
+if($arenateams->GetGameID() > 0 && $armory->armoryconfig['useCache'] == true && !isset($_GET['skipCache'])) {
+ $cache_id = $utils->GenerateCacheId('arena-game', $arenateams->GetGameID(), $armory->currentRealmInfo['name']);
+ if($cache_data = $utils->GetCache($cache_id, 'arena')) {
+ echo $cache_data;
+ echo sprintf('<!-- Restored from cache; id: %s -->', $cache_id);
+ exit;
+ }
+}
+// Load XSLT template
+$xml->LoadXSLT('arena/arena-game.xsl');
+$xml->XMLWriter()->startElement('page');
+$xml->XMLWriter()->writeAttribute('globalSearch', 1);
+$xml->XMLWriter()->writeAttribute('lang', $armory->_locale);
+$xml->XMLWriter()->writeAttribute('requestUrl', 'arena-game.xml');
+$xml->XMLWriter()->startElement('game');
+if(is_array($game_data['gameData'])) {
+ foreach($game_data['gameData'] as $game_key => $game_value) {
+ $xml->XMLWriter()->writeAttribute($game_key, $game_value);
+ }
+}
+foreach($game_data as $chart) {
+ if(isset($chart['teamData'])) {
+ $xml->XMLWriter()->startElement('team');
+ foreach($chart['teamData'] as $team_key => $team_value) {
+ $xml->XMLWriter()->writeAttribute($team_key, $team_value);
+ }
+ if(isset($chart['members']) && is_array($chart['members'])) {
+ foreach($chart['members'] as $tmp_memeber) {
+ $xml->XMLWriter()->startElement('member');
+ foreach($tmp_memeber as $member_key => $member_value) {
+ $xml->XMLWriter()->writeAttribute($member_key, $member_value);
+ }
+ $xml->XMLWriter()->endElement(); //member
+ }
+ }
+ $xml->XMLWriter()->endElement(); //team
+ }
+}
+$xml->XMLWriter()->endElement(); //game
+$xml->XMLWriter()->endElement(); //page
+$xml_cache_data = $xml->StopXML();
+echo $xml_cache_data;
+if($armory->armoryconfig['useCache'] == true && !isset($_GET['skipCache'])) {
+ // Write cache to file
+ $cache_data = $utils->GenerateCacheData($arenateams->GetGameID(), $arenateams->arenateamid, 'arena-game');
+ $cache_handler = $utils->WriteCache($cache_id, $cache_data, $xml_cache_data, 'arena');
+}
+exit;
+?>
View
114 arena-team-game-chart.php
@@ -0,0 +1,114 @@
+<?php
+
+/**
+ * @package World of Warcraft Armory
+ * @version Release Candidate 1
+ * @revision 271
+ * @copyright (c) 2009-2010 Shadez
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ **/
+
+define('__ARMORY__', true);
+define('load_arenateams_class', true);
+define('load_characters_class', true);
+if(!@include('includes/armory_loader.php')) {
+ die('<b>Fatal error:</b> unable to load system files.');
+}
+header('Content-type: text/xml');
+if(!isset($_GET['ts'])) {
+ $current_type = 2;
+}
+else {
+ $current_type = (int) $_GET['ts'];
+}
+$page_fail = false;
+if(isset($_GET['t'])) {
+ $arenateams->teamname = $utils->escape($_GET['t']);
+}
+elseif(isset($_GET['select'])) {
+ $arenateams->teamname = $utils->escape($_GET['select']);
+}
+$isTeam = $arenateams->IsTeam();
+if(!$isTeam || !$arenateams->teamname) {
+ // Load XSLT template
+ $xml->LoadXSLT('error/error.xsl');
+ $xml->XMLWriter()->startElement('page');
+ $xml->XMLWriter()->writeAttribute('globalSearch', 1);
+ $xml->XMLWriter()->writeAttribute('lang', $armory->_locale);
+ $xml->XMLWriter()->startElement('errorhtml');
+ $xml->XMLWriter()->endElement(); //errorhtml
+ $xml->XMLWriter()->endElement(); //page
+ echo $xml->StopXML();
+ exit;
+}
+if($arenateams->teamname && $isTeam && $armory->armoryconfig['useCache'] == true && !isset($_GET['skipCache'])) {
+ $cache_id = $utils->GenerateCacheId('arena-team-game-chart', $arenateams->teamname, $armory->currentRealmInfo['name']);
+ if($cache_data = $utils->GetCache($cache_id, 'arena')) {
+ echo $cache_data;
+ echo sprintf('<!-- Restored from cache; id: %s -->', $cache_id);
+ exit;
+ }
+}
+// Load XSLT template
+$xml->LoadXSLT('arena/arenareport-graph.xsl');
+$xml->XMLWriter()->startElement('page');
+$xml->XMLWriter()->writeAttribute('globalSearch', 1);
+$xml->XMLWriter()->writeAttribute('lang', $armory->_locale);
+$xml->XMLWriter()->writeAttribute('requestUrl', 'arena-team-game-chart.xml');
+$arenateams->_initTeam();
+$team_info = $arenateams->GetArenaTeamInfo();
+$xml->XMLWriter()->startElement('gameListingChart');
+$xml->XMLWriter()->startElement('arenaTeam');
+foreach($team_info['data'] as $team_key => $team_value) {
+ $xml->XMLWriter()->writeAttribute($team_key, $team_value);
+}
+$xml->XMLWriter()->startElement('emblem');
+foreach($team_info['emblem'] as $emblem_key => $emblem_value) {
+ $xml->XMLWriter()->writeAttribute($emblem_key, $emblem_value);
+}
+$xml->XMLWriter()->endElement(); //emblem
+$xml->XMLWriter()->endElement(); //arenaTeam
+$xml->XMLWriter()->startElement('games');
+$games_chart = $arenateams->BuildGameChart();
+if(is_array($games_chart)) {
+ foreach($games_chart as $games) {
+ $xml->XMLWriter()->startElement('game');
+ if(is_array($games)) {
+ foreach($games as $game_key => $game_value) {
+ $xml->XMLWriter()->writeAttribute($game_key, $game_value);
+ }
+ }
+ $xml->XMLWriter()->endElement(); //game
+ }
+}
+$xml->XMLWriter()->endElement(); //games
+$xml->XMLWriter()->endElement(); //gameListingChart
+$xml->XMLWriter()->startElement('season');
+$xml->XMLWriter()->writeAttribute('end', 'today');
+$xml->XMLWriter()->writeAttribute('id', 8);
+$xml->XMLWriter()->writeAttribute('start', 1265068800000);
+$xml->XMLWriter()->endElement(); //season
+$xml->XMLWriter()->endElement(); //page
+$xml_cache_data = $xml->StopXML();
+echo $xml_cache_data;
+if($armory->armoryconfig['useCache'] == true && !isset($_GET['skipCache'])) {
+ // Write cache to file
+ $cache_data = $utils->GenerateCacheData($arenateams->teamname, $arenateams->arenateamid, 'arena-team-game-chart');
+ $cache_handler = $utils->WriteCache($cache_id, $cache_data, $xml_cache_data, 'arena');
+}
+exit;
+?>
View
112 arena-team-report-opposing-teams.php
@@ -0,0 +1,112 @@
+<?php
+
+/**
+ * @package World of Warcraft Armory
+ * @version Release Candidate 1
+ * @revision 271
+ * @copyright (c) 2009-2010 Shadez
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ **/
+
+define('__ARMORY__', true);
+define('load_arenateams_class', true);
+define('load_characters_class', true);
+if(!@include('includes/armory_loader.php')) {
+ die('<b>Fatal error:</b> unable to load system files.');
+}
+header('Content-type: text/xml');
+if(!isset($_GET['ts'])) {
+ $current_type = 2;
+}
+else {
+ $current_type = (int) $_GET['ts'];
+}
+$page_fail = false;
+if(isset($_GET['t'])) {
+ $arenateams->teamname = $utils->escape($_GET['t']);
+}
+elseif(isset($_GET['select'])) {
+ $arenateams->teamname = $utils->escape($_GET['select']);
+}
+$isTeam = $arenateams->IsTeam();
+if(!$isTeam || !$arenateams->teamname) {
+ // Load XSLT template
+ $xml->LoadXSLT('error/error.xsl');
+ $xml->XMLWriter()->startElement('page');
+ $xml->XMLWriter()->writeAttribute('globalSearch', 1);
+ $xml->XMLWriter()->writeAttribute('lang', $armory->_locale);
+ $xml->XMLWriter()->startElement('errorhtml');
+ $xml->XMLWriter()->endElement(); //errorhtml
+ $xml->XMLWriter()->endElement(); //page
+ echo $xml->StopXML();
+ exit;
+}
+if($arenateams->teamname && $isTeam && $armory->armoryconfig['useCache'] == true && !isset($_GET['skipCache'])) {
+ $cache_id = $utils->GenerateCacheId('arena-team-report-opposing-teams', $arenateams->teamname, $armory->currentRealmInfo['name']);
+ if($cache_data = $utils->GetCache($cache_id, 'arena')) {
+ echo $cache_data;
+ echo sprintf('<!-- Restored from cache; id: %s -->', $cache_id);
+ exit;
+ }
+}
+// Load XSLT template
+$xml->LoadXSLT('arena/opposing-teams.xsl');
+$xml->XMLWriter()->startElement('page');
+$xml->XMLWriter()->writeAttribute('globalSearch', 1);
+$xml->XMLWriter()->writeAttribute('lang', $armory->_locale);
+$xml->XMLWriter()->writeAttribute('requestUrl', 'arena-team-report-opposing-teams.xml');
+$arenateams->_initTeam();
+$team_info = $arenateams->GetArenaTeamInfo();
+$xml->XMLWriter()->startElement('arenaGameOpposingTeamsReport');
+$xml->XMLWriter()->startElement('arenaTeam');
+foreach($team_info['data'] as $team_key => $team_value) {
+ $xml->XMLWriter()->writeAttribute($team_key, $team_value);
+}
+$xml->XMLWriter()->startElement('emblem');
+foreach($team_info['emblem'] as $emblem_key => $emblem_value) {
+ $xml->XMLWriter()->writeAttribute($emblem_key, $emblem_value);
+}
+$xml->XMLWriter()->endElement(); //emblem
+$xml->XMLWriter()->endElement(); //arenaTeam
+$games_chart = $arenateams->BuildOpposingTeamList();
+if(is_array($games_chart)) {
+ foreach($games_chart as $games) {
+ $xml->XMLWriter()->startElement('opposingTeam');
+ if(is_array($games)) {
+ foreach($games as $game_key => $game_value) {
+ $xml->XMLWriter()->writeAttribute($game_key, $game_value);
+ }
+ }
+ $xml->XMLWriter()->endElement(); //opposingTeam
+ }
+}
+$xml->XMLWriter()->endElement(); //arenaGameOpposingTeamsReport
+$xml->XMLWriter()->startElement('season');
+$xml->XMLWriter()->writeAttribute('end', 'today');
+$xml->XMLWriter()->writeAttribute('id', 8);
+$xml->XMLWriter()->writeAttribute('start', 1265068800000);
+$xml->XMLWriter()->endElement(); //season
+$xml->XMLWriter()->endElement(); //page
+$xml_cache_data = $xml->StopXML();
+echo $xml_cache_data;
+if($armory->armoryconfig['useCache'] == true && !isset($_GET['skipCache'])) {
+ // Write cache to file
+ $cache_data = $utils->GenerateCacheData($arenateams->teamname, $arenateams->arenateamid, 'arena-team-report-opposing-teams');
+ $cache_handler = $utils->WriteCache($cache_id, $cache_data, $xml_cache_data, 'arena');
+}
+exit;
+?>
View
BIN  images/datepicker/arw-back.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/datepicker/arw-fwd.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
238 includes/classes/class.arenateams.php
@@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release Candidate 1
- * @revision 238
+ * @revision 271
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
@@ -36,6 +36,7 @@
public $teamstats;
public $players;
public $guid;
+ private $gameid = false;
public function _initTeam() {
if(!$this->teamname) {
@@ -75,6 +76,7 @@ public function GetArenaTeamInfo() {
$arenateaminfo['data']['lastSeasonRanking'] = 0;
$arenateaminfo['data']['name'] = $this->teamname;
$arenateaminfo['data']['realm'] = $this->currentRealmInfo['name'];
+ $arenateaminfo['data']['realmName'] = sprintf($this->currentRealmInfo['name']);
$arenateaminfo['data']['realmUrl'] = sprintf('b=%s&r=%s&ts=%d', urlencode($this->armoryconfig['defaultBGName']), urlencode($this->currentRealmInfo['name']), $this->teamtype);
$arenateaminfo['data']['relevance'] = 0;
$arenateaminfo['data']['season'] = 0;
@@ -321,5 +323,239 @@ public function CountPageNum($type) {
$result = round($all_teams/20);
return $result;
}
+
+ public function SetGameID($gameid) {
+ if($gameid > 0) {
+ $this->gameid = $gameid;
+ }
+ return true;
+ }
+
+ public function GetGameID() {
+ return $this->gameid;
+ }
+
+ public function GetGameInfo() {
+ if(!$this->gameid || $this->gameid === 0) {
+ $this->Log()->writeError('%s : gameid not provided', __METHOD__);
+ return false;
+ }
+ $game_info = $this->cDB->select("
+ SELECT
+ `armory_game_chart`.`teamid`,
+ `armory_game_chart`.`guid`,
+ `armory_game_chart`.`changeType`,
+ `armory_game_chart`.`ratingChange`,
+ `armory_game_chart`.`teamRating`,
+ `armory_game_chart`.`damageDone`,
+ `armory_game_chart`.`deaths`,
+ `armory_game_chart`.`healingDone`,
+ `armory_game_chart`.`damageTaken`,
+ `armory_game_chart`.`healingTaken`,
+ `armory_game_chart`.`killingBlows`,
+ `armory_game_chart`.`mapId`,
+ `armory_game_chart`.`start`,
+ `armory_game_chart`.`end`,
+ `characters`.`race` AS `raceId`,
+ `characters`.`class` AS `classId`,
+ `characters`.`gender` AS `genderId`,
+ `characters`.`name` AS `characterName`,
+ `arena_team`.`BackgroundColor` AS `emblemBackground`,
+ `arena_team`.`BorderColor` AS `emblemBorderColor`,
+ `arena_team`.`BorderStyle` AS `emblemBorderStyle`,
+ `arena_team`.`EmblemColor` AS `emblemIconColor`,
+ `arena_team`.`EmblemStyle` AS `emblemIconStyle`,
+ `arena_team`.`type`,
+ `arena_team`.`name`
+ FROM `armory_game_chart` AS `armory_game_chart`
+ LEFT JOIN `characters` AS `characters` ON `characters`.`guid`=`armory_game_chart`.`guid`
+ LEFT JOIN `arena_team` AS `arena_team` ON `arena_team`.`arenateamid`=`armory_game_chart`.`teamid`
+ WHERE `armory_game_chart`.`gameid`=?", $this->gameid);
+ if(!$game_info) {
+ $this->Log()->writeError('%s : unable to get data from characters DB for gameID %d', __METHOD__, $this->gameid);
+ return false;
+ }
+ $chart_teams = array();
+ $chart_teams['gameData'] = array(