}
?>

	<!-- 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 
<?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>
<?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 -->
Exemple #4
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);
 }
 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);
 }