if (isset($this->division)) {
        $title = JText::sprintf('COM_JOOMLEAGUE_RESULTS_ROUND_RESULTS2', '<i>' . $this->division->name . '</i>');
    }
    JoomleagueHelperHtml::showMatchdaysTitle($title, $this->roundid, $this->config);
    if ($this->showediticon) {
        $link = JoomleagueHelperRoute::getResultsRoute($this->project->id, $this->roundid, $this->model->divisionid, $this->model->mode, $this->model->order, $this->config['result_style_edit']);
        $imgTitle = JText::_('COM_JOOMLEAGUE_RESULTS_ENTER_EDIT_RESULTS');
        $desc = JHTML::image('media/com_joomleague/jl_images/edit.png', $imgTitle, array(' title' => $imgTitle));
        echo ' ';
        echo JHTML::link($link, $desc);
    }
} else {
    //1 request for current round
    // seems to be this shall show a plan of matches of a team???
    JoomleagueHelperHtml::showMatchdaysTitle(JText::_('COM_JOOMLEAGUE_RESULTS_PLAN'), 0, $this->config);
}
?>
		</td>
			<?php 
if ($this->config['show_matchday_dropdown'] == 1) {
    ?>
	            <td class="contentheading" style="text-align:right; font-size: 100%;">
			<?php 
    echo JoomleagueHelperHtml::getRoundSelectNavigation(FALSE);
    ?>
				</td>
    	    <?php 
}
?>
		</tr>
</table>
}
?>

	<!-- Time -->
	<?php 
if ($this->config['show_match_time'] == 1) {
    if ($this->match->match_date > 0) {
        ?>
            <tr>
                <td colspan="3" >
                    <span class="label"><?php 
        echo JText::_('COM_JOOMLEAGUE_MATCHREPORT_TIME');
        ?>
</span>
                    <span><?php 
        echo JoomleagueHelperHtml::showMatchTime($this->match, $this->config, $this->overallconfig, $this->project);
        ?>
</span>
                </td>
            </tr>
            <?php 
    }
    ?>

        <!-- present -->
        <?php 
    if ($this->match->time_present > 0) {
        ?>
        <tr>
            <td colspan="3" >
                <span class="label"><?php 
JoomleagueHelperHtml::printColumnHeadingSort(JText::_('COM_JOOMLEAGUE_STATS_ATTENDANCE_RANKING_TOTAL'), "totalattend", null);
?>
                </th>
                <th style="width:16%;text-align:right;">
                <?php 
JoomleagueHelperHtml::printColumnHeadingSort(JText::_('COM_JOOMLEAGUE_STATS_ATTENDANCE_RANKING_AVG'), "avgattend", null);
?>
                </th>
                <th style="width:19%;text-align:right;">
                <?php 
JoomleagueHelperHtml::printColumnHeadingSort(JText::_('COM_JOOMLEAGUE_STATS_ATTENDANCE_RANKING_CAPACITY'), "capacity", null);
?>
                </th>
                <th style="width:20%;text-align:right;">
                <?php 
JoomleagueHelperHtml::printColumnHeadingSort(JText::_('COM_JOOMLEAGUE_STATS_ATTENDANCE_RANKING_UTILISATION'), "utilisation", null);
?>
                </th>
            </tr>
            <?php 
//reorder table according to criteria
if (isset($_REQUEST['order'])) {
    switch ($_REQUEST['order']) {
        case 'name':
            usort($this->attendanceranking, array("JoomleagueModelStats", "teamNameCmp2"));
            break;
        case 'totalattend':
            usort($this->attendanceranking, array("JoomleagueModelStats", "totalattendCmp"));
            break;
        case 'avgattend':
            usort($this->attendanceranking, array("JoomleagueModelStats", "avgattendCmp"));
<?php

defined('_JEXEC') or die('Restricted access');
?>
<table class="contentpaneopen">
	<tr>
		<td class="contentheading"><?php 
$pageTitle = 'COM_JOOMLEAGUE_MATCHREPORT_TITLE';
if (isset($this->round->name)) {
    $matchDate = JoomleagueHelper::getTimestamp($this->match->match_date, 1);
    echo '&nbsp;' . JText::sprintf($pageTitle, $this->round->name, JHTML::date($matchDate, JText::_('COM_JOOMLEAGUE_MATCHREPORT_GAMES_DATE')), JoomleagueHelperHtml::showMatchTime($this->match, $this->config, $this->overallconfig, $this->project));
} else {
    echo '&nbsp;' . JText::sprintf($pageTitle, '', '', '');
}
?>
</td>
	</tr>
</table>
     echo '>';
     $gaa = round($team->getPPP(), 2);
     printf($format, $gaa);
     echo '</td>';
     echo "\n";
     break;
 case 'LASTGAMES':
     echo '<td class="rankingrow lastgames"';
     if ($color != '' && $config['use_background_row_color']) {
         echo 'style="background-color:' . $color . '"';
     }
     echo '>';
     foreach ($this->previousgames[$ptid] as $g) {
         $txt = $this->teams[$g->projectteam1_id]->name . ' [ ' . $g->team1_result . ' - ' . $g->team2_result . ' ] ' . $this->teams[$g->projectteam2_id]->name;
         $attribs = array('title' => $txt);
         if (!($img = JoomleagueHelperHtml::getThumbUpDownImg($g, $ptid, $attribs))) {
             continue;
         }
         switch (JoomleagueHelper::getTeamMatchResult($g, $ptid)) {
             case -1:
                 $attr = array('class' => 'thumblost');
                 break;
             case 0:
                 $attr = array('class' => 'thumbdraw');
                 break;
             case 1:
                 $attr = array('class' => 'thumbwon');
                 break;
         }
         $url = JRoute::_(JoomleagueHelperRoute::getMatchReportRoute($g->project_slug, $g->slug));
         echo JHTML::link($url, $img, $attr);
                    }
                }
            } else {
                echo '-';
            }
            ?>
</td>
		<?php 
        }
        ?>

		<?php 
        if ($this->config['show_thumbs_picture'] & $teamid > 0) {
            ?>
		<td><?php 
            echo JoomleagueHelperHtml::getThumbUpDownImg($match, $this->ptid);
            ?>
</td>
		<?php 
        }
        ?>

		<?php 
        if ($this->config['show_matchreport_column']) {
            ?>
		<td><?php 
            if (!$match->cancel) {
                if (isset($match->team1_result)) {
                    if ($this->config['show_matchreport_image']) {
                        $href_text = JHTML::image($this->config['matchreport_image'], JText::_('COM_JOOMLEAGUE_TEAMPLAN_VIEW_MATCHREPORT'));
                    } else {
 case 'BONUS':
     echo '<th class="headers">';
     echo '<span class="hasTip" title="' . $toolTipTitle . '::' . $toolTipText . '">';
     JoomleagueHelperHtml::printColumnHeadingSort($column_names[$k], "bonus", $this->config);
     echo '</span></th>';
     break;
 case 'START':
     echo '<th class="headers">';
     echo '<span class="hasTip" title="' . $toolTipTitle . '::' . $toolTipText . '">';
     JoomleagueHelperHtml::printColumnHeadingSort($column_names[$k], "start", $this->config);
     echo '</span></th>';
     break;
 case 'QUOT':
     echo '<th class="headers">';
     echo '<span class="hasTip" title="' . $toolTipTitle . '::' . $toolTipText . '">';
     JoomleagueHelperHtml::printColumnHeadingSort($column_names[$k], "quot", $this->config);
     echo '</span></th>';
     break;
 case 'TADMIN':
     echo '<th class="headers">';
     echo '<span class="hasTip" title="' . $toolTipTitle . '::' . $toolTipText . '">';
     echo $column_names[$k];
     echo '</span></th>';
     break;
 case 'GFA':
     echo '<th class="headers">';
     echo '<span class="hasTip" title="' . $toolTipTitle . '::' . $toolTipText . '">';
     echo $column_names[$k];
     echo '</span></th>';
     break;
 case 'GAA':
			<td width="5" class="referees">
			<?php 
                $this->showMatchRefereesAsTooltip($game);
                ?>
			</td>
		<?php 
            }
            ?>

		<?php 
            if ($this->config['show_playground'] || $this->config['show_playground_alert']) {
                ?>
		<!-- show only playground or playgroundalert if playgrund differs from normal -->
			<td>
			<?php 
                JoomleagueHelperHtml::showMatchPlayground($game);
                ?>
			</td>
		<?php 
            }
            ?>

		<?php 
            if ($this->config['show_attendance_column']) {
                ?>
		<!-- show attendance -->
			<td class="right"><?php 
                if ($game->crowd > 0) {
                    echo $game->crowd;
                } else {
                    echo '&nbsp;';
Example #9
0
 function display($tpl = null)
 {
     // Get a reference of the page instance in joomla
     $document = JFactory::getDocument();
     $model = $this->getModel();
     $match = $model->getMatch();
     $config = $model->getTemplateConfig($this->getName());
     $tableconfig = $model->getTemplateConfig("ranking");
     $this->project = $model->getProject();
     $this->config = $config;
     $this->tableconfig = $tableconfig;
     $this->overallconfig = $model->getOverallConfig();
     if (!isset($this->overallconfig['seperator'])) {
         $this->overallconfig['seperator'] = ":";
     }
     $this->match = $match;
     if ($match) {
         $newmatchtext = "";
         if ($match->new_match_id > 0) {
             $ret = $model->getMatchText($match->new_match_id);
             $matchDate = JoomleagueHelper::getMatchDate($ret, JText::_('COM_JOOMLEAGUE_NEXTMATCH_NEXT_MATCHDATE'));
             $matchTime = JoomleagueHelperHtml::showMatchTime($ret, $this->config, $this->overallconfig, $this->project);
             $newmatchtext = $matchDate . " " . $matchTime . ", " . $ret->t1name . " - " . $ret->t2name;
         }
         $this->newmatchtext = $newmatchtext;
         $prevmatchtext = "";
         if ($match->old_match_id > 0) {
             $ret = $model->getMatchText($match->old_match_id);
             $matchDate = JoomleagueHelper::getMatchDate($ret, JText::_('COM_JOOMLEAGUE_NEXTMATCH_PREVIOUS_MATCHDATE'));
             $matchTime = JoomleagueHelperHtml::showMatchTime($ret, $this->config, $this->overallconfig, $this->project);
             $prevmatchtext = $matchDate . " " . $matchTime . ", " . $ret->t1name . " - " . $ret->t2name;
         }
         $this->oldmatchtext = $prevmatchtext;
         $this->teams = $model->getMatchTeams();
         $this->referees = $model->getReferees();
         $this->playground = $model->getPlayground($this->match->playground_id);
         $this->homeranked = $model->getHomeRanked();
         $this->awayranked = $model->getAwayRanked();
         $this->chances = $model->getChances();
         $this->home_highest_home_win = $model->getHomeHighestHomeWin();
         $this->away_highest_home_win = $model->getAwayHighestHomeWin();
         $this->home_highest_home_def = $model->getHomeHighestHomeDef();
         $this->away_highest_home_def = $model->getAwayHighestHomeDef();
         $this->home_highest_away_win = $model->getHomeHighestAwayWin();
         $this->away_highest_away_win = $model->getAwayHighestAwayWin();
         $this->home_highest_away_def = $model->getHomeHighestAwayDef();
         $this->away_highest_away_def = $model->getAwayHighestAwayDef();
         $games = $model->getGames();
         $gamesteams = $model->getTeamsFromMatches($games);
         $this->games = $games;
         $this->gamesteams = $gamesteams;
         $previousx = $this->get('previousx');
         $teams = $this->get('TeamsIndexedByPtid');
         $this->previousx = $previousx;
         $this->allteams = $teams;
     }
     // Set page title
     $titleInfo = JoomleagueHelper::createTitleInfo(JText::_('COM_JOOMLEAGUE_NEXTMATCH_PAGE_TITLE'));
     if (count($this->teams) == 2) {
         if (!empty($this->teams[0])) {
             $titleInfo->team1Name = $this->teams[0]->name;
         }
         if (!empty($this->teams[1])) {
             $titleInfo->team2Name = $this->teams[1]->name;
         }
     }
     if (!empty($this->project)) {
         $titleInfo->projectName = $this->project->name;
         $titleInfo->leagueName = $this->project->league_name;
         $titleInfo->seasonName = $this->project->season_name;
     }
     $division = $model->getDivision(JRequest::getInt('division', 0));
     if (!empty($division) && $division->id != 0) {
         $titleInfo->divisionName = $division->name;
     }
     $this->pagetitle = JoomleagueHelper::formatTitle($titleInfo, $this->config["page_title_format"]);
     $document->setTitle($this->pagetitle);
     parent::display($tpl);
 }
defined('_JEXEC') or die('Restricted access');
if ($this->config['show_sectionheader'] == 1) {
    ?>
	<table width="100%" class="contentpaneopen">
		<tr>
			<td class="contentheading">
				<?php 
    if ($this->roundid > 0) {
        $title = JText::_('COM_JOOMLEAGUE_RESULTS_ROUND_RESULTS');
        if (isset($this->division)) {
            $title = JText::sprintf('COM_JOOMLEAGUE_RESULTS_ROUND_RESULTS2', '<i>' . $this->division->name . '</i>');
        }
        JoomleagueHelperHtml::showMatchdaysTitle($title, $this->roundid, $this->config);
        if ($this->showediticon) {
            $link = JoomleagueHelperRoute::getResultsRoute($this->project->id, $this->roundid);
            $imgTitle = JText::_('COM_JOOMLEAGUE_RESULTS_ENTER_EDIT_RESULTS');
            $desc = JHTML::image('media/com_joomleague/jl_images/edit.png', $imgTitle, array(' title' => $imgTitle));
            echo ' ';
            echo JHTML::link($link, $desc);
        }
    } else {
        //1 request for current round
        // seems to be this shall show a plan of matches of a team???
        JoomleagueHelperHtml::showMatchdaysTitle(JText::_('COM_JOOMLEAGUE_RESULTS_PLAN') . " - " . $team->name, 0, $this->config);
    }
    ?>
			</td>
		</tr>
	</table>
	<?php 
}
        echo $game->team2_result;
        ?>
</td>
				<td nowrap="nowrap"><?php 
        if ($game->show_report == 1) {
            $desc = JHTML::image("media/com_joomleague/jl_images/zoom.png", JText::_('Match Report'), array("title" => JText::_('Match Report')));
            echo JHTML::link($report_link, $desc);
        }
        $k = 1 - $k;
        ?>
</td>
				<?php 
        if ($this->config['show_thumbs_picture']) {
            ?>
				<td><?php 
            echo JoomleagueHelperHtml::getThumbUpDownImg($game, $this->currentteam);
            ?>
</td>
				<?php 
        }
        ?>
			</tr>
			<?php 
    }
    ?>
		</table>
		</td>
	</tr>
</table>
<!-- End of  show matches -->
<?php 
			<td width="5" class="referees">
			<?php 
                $this->showMatchRefereesAsTooltip($game);
                ?>
			</td>
		<?php 
            }
            ?>

		<?php 
            if ($this->config['show_playground'] || $this->config['show_playground_alert']) {
                ?>
		<!-- show only playground or playgroundalert if playground differs from normal -->
			<td>
			<?php 
                JoomleagueHelperHtml::showMatchPlayground($game, $this->config, $this->teams, $this->project);
                ?>
			</td>
		<?php 
            }
            ?>

		<?php 
            if ($this->config['show_attendance_column']) {
                ?>
		<!-- show attendance -->
			<td class="right"><?php 
                if ($game->crowd > 0) {
                    echo $game->crowd;
                } else {
                    echo '&nbsp;';
    }
    JoomleagueHelperHtml::showMatchdaysTitle($title, $this->roundid, $this->config, $this->project, $this->overallconfig);
    if ($this->showediticon) {
        $modalheight = JComponentHelper::getParams('com_joomleague')->get('modal_popup_height', 600);
        $modalwidth = JComponentHelper::getParams('com_joomleague')->get('modal_popup_width', 900);
        $link = JoomleagueHelperRoute::getResultsRoute($this->project->id, $this->roundid, $this->model->divisionid, $this->model->mode, $this->model->order, 'match.display');
        echo ' <a rel="{handler: \'iframe\',size: {x:' . $modalwidth . ',y:' . $modalheight . '}}" href="' . $link . '" class="modal">';
        $imgTitle = JText::_('COM_JOOMLEAGUE_RESULTS_ENTER_EDIT_RESULTS');
        echo JHtml::image('media/com_joomleague/jl_images/edit.png', $imgTitle, array(' title' => $imgTitle));
        echo '</a>';
    }
} else {
    //1 request for current round
    // seems to be this shall show a plan of matches of a team???
    JoomleagueHelperHtml::showMatchdaysTitle(JText::_('COM_JOOMLEAGUE_RESULTS_PLAN'), 0, $this->config, $this->project, $this->overallconfig);
}
?>
		</td>
			<?php 
if ($this->config['show_matchday_dropdown'] == 1) {
    ?>
	            <td class="contentheading" style="text-align:right; font-size: 100%;"> 
			<?php 
    echo JoomleagueHelperHtml::getRoundSelectNavigation(false, $this->project, $this->roundsoptions, $this->roundid);
    ?>
				</td>
    	    <?php 
}
?>
		</tr>
</table>
<?php

defined('_JEXEC') or die('Restricted access');
?>

<!-- START: Contentheading -->
<table width="100%" class="contentpaneopen">
	<tr>
		<td class="contentheading"><?php 
echo JHTML::date($this->match->match_date, JText::_('COM_JOOMLEAGUE_NEXTMATCH_GAMES_DATE')) . " " . JoomleagueHelperHtml::showMatchTime($this->match, $this->config, $this->overallconfig, $this->project);
?>
</td>
	</tr>
</table>

<!-- END: Contentheading -->
 function display($tpl = null)
 {
     // Get a reference of the page instance in joomla
     $document = JFactory::getDocument();
     $version = urlencode(JoomleagueHelper::getVersion());
     $css = 'components/com_joomleague/assets/css/tabs.css?v=' . $version;
     $document->addStyleSheet($css);
     $model = $this->getModel();
     $match = $model->getMatch();
     $config = $model->getTemplateConfig($this->getName());
     $tableconfig = $model->getTemplateConfig("ranking");
     $this->assignRef('project', $model->getProject());
     $this->assignRef('config', $config);
     $this->assignRef('tableconfig', $tableconfig);
     $this->assignRef('overallconfig', $model->getOverallConfig());
     if (!isset($this->overallconfig['seperator'])) {
         $this->overallconfig['seperator'] = ":";
     }
     $this->assignRef('match', $match);
     if ($match) {
         $newmatchtext = "";
         if ($match->new_match_id > 0) {
             $ret = $model->getMatchText($match->new_match_id);
             $matchTime = JoomleagueHelperHtml::showMatchTime($ret, $this->config, $this->overallconfig, $this->project);
             $matchDate = JHTML::date($ret->match_date, JText::_('COM_JOOMLEAGUE_NEXTMATCH_GAMES_DATE'));
             $newmatchtext = $matchDate . " " . $matchTime . ", " . $ret->t1name . " - " . $ret->t2name;
         }
         $this->assignRef('newmatchtext', $newmatchtext);
         $prevmatchtext = "";
         if ($match->old_match_id > 0) {
             $ret = $model->getMatchText($match->old_match_id);
             $matchTime = JoomleagueHelperHtml::showMatchTime($ret, $this->config, $this->overallconfig, $this->project);
             $matchDate = JHTML::date($ret->match_date, JText::_('COM_JOOMLEAGUE_NEXTMATCH_GAMES_DATE'));
             $prevmatchtext = $matchDate . " " . $matchTime . ", " . $ret->t1name . " - " . $ret->t2name;
         }
         $this->assignRef('oldmatchtext', $prevmatchtext);
         $this->assignRef('teams', $model->getMatchTeams());
         $this->assignRef('referees', $model->getReferees());
         $this->assignRef('playground', $model->getPlayground($this->match->playground_id));
         $this->assignRef('homeranked', $model->getHomeRanked());
         $this->assignRef('awayranked', $model->getAwayRanked());
         $this->assignRef('chances', $model->getChances());
         $this->assignRef('home_highest_home_win', $model->getHomeHighestHomeWin());
         $this->assignRef('away_highest_home_win', $model->getAwayHighestHomeWin());
         $this->assignRef('home_highest_home_def', $model->getHomeHighestHomeDef());
         $this->assignRef('away_highest_home_def', $model->getAwayHighestHomeDef());
         $this->assignRef('home_highest_away_win', $model->getHomeHighestAwayWin());
         $this->assignRef('away_highest_away_win', $model->getAwayHighestAwayWin());
         $this->assignRef('home_highest_away_def', $model->getHomeHighestAwayDef());
         $this->assignRef('away_highest_away_def', $model->getAwayHighestAwayDef());
         $games = $model->getGames();
         $gamesteams = $model->getTeamsFromMatches($games);
         $this->assignRef('games', $games);
         $this->assignRef('gamesteams', $gamesteams);
         $previousx =& $this->get('previousx');
         $teams =& $this->get('TeamsIndexedByPtid');
         $this->assignRef('previousx', $previousx);
         $this->assignRef('allteams', $teams);
         $this->assignRef('matchcommentary', $model->getMatchCommentary());
     }
     $this->assign('show_debug_info', JComponentHelper::getParams('com_joomleague')->get('show_debug_info', 0));
     // Set page title
     $pageTitle = JText::_('COM_JOOMLEAGUE_NEXTMATCH_PAGE_TITLE');
     if (isset($this->teams)) {
         $pageTitle .= ": " . $this->teams[0]->name . " " . JText::_("COM_JOOMLEAGUE_NEXTMATCH_VS") . " " . $this->teams[1]->name;
     }
     $document->setTitle($pageTitle);
     parent::display($tpl);
 }