function getObjectInfo($id, $language = null) { $info = new JCommentsObjectInfo(); $routerHelper = JPATH_SITE . '/components/com_joomleague/helpers/route.php'; if (is_file($routerHelper)) { require_once $routerHelper; $db = JFactory::getDBO(); $query = "SELECT m.id as matchid,\n\t\t\t\t\t\t\t\tt1.short_name t1name,\n\t\t\t\t\t\t\t\tt2.short_name t2name,\n\t\t\t\t\t\t\t\tm.projectteam1_id,\n\t\t\t\t\t\t\t\tm.projectteam2_id,\n\t\t\t\t\t\t\t\tm.team1_result,\n\t\t\t\t\t\t\t\tm.team2_result,\n\t\t\t\t\t\t\t\tm.modified_by,\n\t\t\t\t\t\t\t\tr.project_id,\n\t\t\t\t\t\t\t\tp.name as projectname" . " FROM #__joomleague_match as m" . " LEFT JOIN #__joomleague_round as r ON r.id=m.round_id" . " INNER JOIN #__joomleague_project_team AS pt1 ON m.projectteam1_id=pt1.id" . " INNER JOIN #__joomleague_project_team AS pt2 ON m.projectteam2_id=pt2.id" . " INNER JOIN #__joomleague_team AS t1 ON pt1.team_id=t1.id" . " INNER JOIN #__joomleague_team AS t2 ON pt2.team_id=t2.id" . " INNER JOIN #__joomleague_project AS p ON pt1.project_id=p.id" . " WHERE m.id = " . $id; $db->setQuery($query); $row = $db->loadObject(); if (!empty($row)) { if (!is_null($row->team1_result) && !is_null($row->team1_result)) { $info->title = $row->projectname . " " . $row->t1name . " vs. " . $row->t2name . " " . $row->team1_result . ":" . $row->team2_result; } else { $info->title = $row->projectname . " " . $row->t1name . " vs. " . $row->t2name; } $info->userid = $row->modified_by; $info->link = JRoute::_(JoomleagueHelperRoute::getMatchReportRoute($row->project_id, $row->matchid)); } } return $info; }
function showReportDecisionIcons(&$game) { //echo '<br /><pre>~'.print_r($game,true).'~</pre><br />'; $output = ''; $report_link = JoomleagueHelperRoute::getMatchReportRoute($game->project_id, $game->id); if ($game->show_report && trim($game->summary) != '' || $game->alt_decision || $game->match_result_type > 0) { if ($game->alt_decision) { $imgTitle = JText::_($game->decision_info); $img = 'media/com_joomleague/jl_images/court.gif'; } else { $imgTitle = JText::_('Has match summary'); $img = 'media/com_joomleague/jl_images/zoom.png'; } $output .= JHTML::_('link', $report_link, JHTML::image(JURI::root() . $img, $imgTitle, array("border" => 0, "title" => $imgTitle)), array("title" => $imgTitle)); } else { $output .= ' '; } return $output; }
echo JText::_('COM_JOOMLEAGUE_MATCHREPORT_DETAILS'); ?> </h2> <table width="98%" align="center" border="0" cellpadding="0" cellspacing="0"> <!-- Prev Match--> <?php if ($this->match->old_match_id > 0) { ?> <tr> <td colspan="3" > <span class="label"><?php echo JText::_('COM_JOOMLEAGUE_MATCHREPORT_OLD_MATCH'); ?> </span> <span><?php echo JHTML::link(JoomleagueHelperRoute::getMatchReportRoute($this->project->id, $this->match->old_match_id), $this->oldmatchtext); ?> </span> </td> </tr> <?php } ?> <!-- Next Match--> <?php if ($this->match->new_match_id > 0) { ?> <tr> <td colspan="3" > <span class="label"><?php echo JText::_('COM_JOOMLEAGUE_MATCHREPORT_NEW_MATCH');
</td> <td class="vs"><?php echo JText::_("COM_JOOMLEAGUE_NEXTMATCH_VS"); ?> </td> <td class="team"><?php if (!is_null($this->teams)) { echo $this->teams[1]->name; } else { echo JText::_("COM_JOOMLEAGUE_NEXTMATCH_UNKNOWNTEAM"); } ?> </td> </tr> </table> <?php $report_link = JoomleagueHelperRoute::getMatchReportRoute($this->project->id, $this->match->id); if (isset($this->match->team1_result) && isset($this->match->team2_result)) { ?> <div class="notice"> <?php $text = JText::_("COM_JOOMLEAGUE_NEXTMATCH_ALREADYPLAYED"); echo JHTML::link($report_link, $text); ?> </div> <?php } ?> <br />
<thead> <tr class="sectiontableheader"> <th colspan=10><?php echo $game->project_name; ?> </th> </tr> </thead> <?php $pr_id = $game->prid; } ?> <?php $class = $k == 0 ? 'sectiontableentry1' : 'sectiontableentry2'; $result_link = JoomleagueHelperRoute::getResultsRoute($game->project_id, $game->roundid); $report_link = JoomleagueHelperRoute::getMatchReportRoute($game->project_id, $game->id); $home = $this->gamesteams[$game->projectteam1_id]; $away = $this->gamesteams[$game->projectteam2_id]; ?> <tr class="<?php echo $class; ?> "> <td><?php echo JHTML::link($result_link, $game->roundcode); ?> </td> <td class="nowrap"><?php echo JHTML::date($date, JText::_('COM_JOOMLEAGUE_MATCHDAYDATE')); ?> </td>
} $url = JUri::base(); if ($refresh == 1) { $textdiv = "<script type=\"text/javascript\" language=\"javascript\">\n\t\t\tvar reloadTimer = null;\n\t\t\twindow.onload = function()\n\t\t\t{\n\t\t\t setReloadTime({$minute});\n\t\t }\n\t\t\tfunction setReloadTime(secs)\n\t\t\t\t{\n\t\t\t\t if (arguments.length == 1) {\n\t\t\t if (reloadTimer) clearTimeout(reloadTimer);\n\t\t\t reloadTimer = setTimeout(\"setReloadTime()\", Math.ceil(parseFloat(secs) * 1000));\n\t\t\t }\n\t\t else {\n\t\t location.reload();\n\t\t }\n\t\t\t}\n\t\t </script> \n<div align=\"center\"><a href=\"javascript:location.reload();\"><img src=\"modules/mod_joomleague_ticker/css/icon_refresh.gif\" border=\"0\" title=\"Refresh\"> <b>Refresh</b></a></div><br>"; } else { $textdiv = ""; } $id = 1; $idstring = ''; $idstring = $id . $params->get('moduleclass_sfx'); foreach ($matches as $match) { $idstring = $id . $params->get('moduleclass_sfx'); if ($mode == 'T') { $textdiv .= '<div id="jlticker' . $idstring . '" class="textdiv">'; } $report_link = JoomleagueHelperRoute::getMatchReportRoute($match->project_id, $match->match_id); // Decide what kind of link method to be added to the teamnames switch ($urlformat) { case 0: $urlfronthome = ""; $urlbackhome = ""; $urlfrontaway = ""; $urlbackaway = ""; break; case 1: $result_link = JoomleagueHelperRoute::getResultsRoute($match->project_id, $match->roundid, $match->division_id); $urlfronthome = '<a href="' . $result_link . '">'; $urlbackhome = "</a>"; $urlfrontaway = '<a href="' . $result_link . '">'; $urlbackaway = "</a>"; break;
function getScoreLink($game, $project) { if (isset($game->team1_result) || $game->alt_decision) { return JoomleagueHelperRoute::getMatchReportRoute($project->slug, $game->id); } else { return JoomleagueHelperRoute::getNextMatchRoute($project->slug, $game->id); } }
$link = JoomleagueHelperRoute::getMatchReportRoute($this->project->slug, $match->id) . '#comments'; } else { $link = JoomleagueHelperRoute::getNextMatchRoute($this->project->slug, $match->id) . '#comments'; } $viewComment = JHTML::link($link, $href_text); echo $viewComment; } else { $imgTitle = JText::_('COM_JOOMLEAGUE_TEAMPLAN_COMMENTS_COUNT_NOCOMMENT'); if ($this->config['show_comments_count'] == 1) { $href_text = JHTML::image(JURI::root() . 'media/com_joomleague/jl_images/discuss.gif', $imgTitle, array(' title' => $imgTitle, ' border' => 0, ' style' => 'vertical-align: middle')); } elseif ($this->config['show_comments_count'] == 2) { $href_text = '<span title="' . $imgTitle . '">(' . $count . ')</span>'; } //Link if (isset($match->team1_result)) { $link = JoomleagueHelperRoute::getMatchReportRoute($this->project->slug, $match->id) . '#comments'; } else { $link = JoomleagueHelperRoute::getNextMatchRoute($this->project->slug, $match->id) . '#comments'; } $viewComment = JHTML::link($link, $href_text); echo $viewComment; } ?> </td> <?php } ?> </tr> <?php if ($hasEvents) { ?>
?> ---- <?php } ?> </td> <td class="statlabel"><?php echo JText::_('COM_JOOMLEAGUE_NEXTMATCH_HIGHEST_LOSS_AWAY'); ?> </td> <td class="valueright"> <?php if ($stat = $this->away_highest_away_def) { ?> <?php echo JHtml::link(JoomleagueHelperRoute::getMatchReportRoute($this->away_highest_away_def->pid, $this->away_highest_away_def->mid), sprintf("%s - %s %s:%s", $stat->hometeam, $stat->awayteam, $stat->homegoals, $stat->awaygoals)); ?> <?php } else { ?> ---- <?php } ?> </td> </tr> <?php } } ?>
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); } echo '</td>'; echo "\n"; break; } } echo '</tr>'; echo "\n"; $k = 1 - $k; $counter++; $temprank = $team->rank; }
/** * return thumb up/down image as link with score as title * * @param object $game * @param int $projectteam_id * @param array attributes * @return string linked image html code */ public function getThumbScore($game, $projectteam_id, $attributes = null) { if (!($img = self::getThumbUpDownImg($game, $projectteam_id, $attributes = null))) { return false; } $txt = $teams[$game->projectteam1_id]->name . ' - ' . $teams[$game->projectteam2_id]->name . ' ' . $game->team1_result . ' - ' . $game->team2_result; $attribs = array('title' => $txt); if (is_array($attributes)) { $attribs = array_merge($attributes, $attribs); } $url = JRoute::_(JoomleagueHelperRoute::getMatchReportRoute($game->project_slug, $game->slug)); return JHTML::link($url, $img); }
$e2 = 'X'; } } $showMatchReportLink = false; if ($result->show_report == 1 || $this->config['force_link_report'] == 1) { $showMatchReportLink = true; } if ($result->show_report == 0 && $e1 == "" && $e2 == "") { $showMatchReportLink = true; } if ($showMatchReportLink) { //if ((($this->config['force_link_report'] == 1) && ($result->show_report == 1) && ($e1 != "") && ($e2 != ""))) { // result with matchreport $title = ""; $arrayString = array(); $link = JoomleagueHelperRoute::getMatchReportRoute($this->project->id, $result->id); if ($e1 != "" && $e2 != "") { $colorStr = "color:" . $this->project->fav_team_text_color . ";"; $bgColorStr = "background-color:" . $this->project->fav_team_color . ";"; if ($this->config['highlight_fav_team'] != 2 || !in_array($team_row->id, $this->favteams) && !in_array($team_col->id, $this->favteams)) { #$resultStr = str_replace( "%TEAMHOME%", # $this->teams[$result->projectteam1_id]->name, # JText::_( 'COM_JOOMLEAGUE_STANDARD_MATCH_REPORT_FORM' ) ); #$title = str_replace( "%TEAMGUEST%", $this->teams[$result->projectteam2_id]->name, $title ); $resultStr = $e1 . $this->overallconfig['seperator'] . $e2 . $ResultType; if ($this->config['highlight_fav_team'] > 0 && $this->project->fav_team_text_color != "" && (in_array($team_row->id, $this->favteams) || in_array($team_col->id, $this->favteams))) { $arrayString = array("style" => $colorStr . $bgColorStr); } else { $arrayString = ""; } } else {
<?php } ?> </tr> </thead> <tbody> <?php $k = 0; $total = array(); $total['startRoster'] = 0; $total['in'] = 0; $total['out'] = 0; $total['playedtime'] = 0; $total_event_stats = array(); foreach ($this->games as $game) { $report_link = JoomleagueHelperRoute::getMatchReportRoute($this->project->slug, $game->id); $teaminfo_home_link = JoomleagueHelperRoute::getTeamInfoRoute($this->project->slug, $this->teams[$game->projectteam1_id]->team_id); $teaminfo_away_link = JoomleagueHelperRoute::getTeamInfoRoute($this->project->slug, $this->teams[$game->projectteam2_id]->team_id); // gespielte zeit $model = $this->getModel(); $timePlayed = 0; $this->assignRef('timePlayed', $model->getTimePlayed($this->teamPlayer->id, $this->project->game_regular_time, $game->id, $this->overallconfig['person_events'])); $timePlayed = $this->timePlayed; ?> <tr class="<?php echo $k == 0 ? $this->config['style_class1'] : $this->config['style_class2']; ?> "> <td class="td_l"><?php echo JHTML::link($report_link, strftime($this->config['games_date_format'], strtotime($game->match_date))); ?>
<?php } else { ?> <td class="statvalue"> ---- </td> <?php } ?> <!-- highest defeat away --> <?php if (!empty($this->highestdef_away)) { ?> <td class="statvalue"> <?php $link = JoomleagueHelperRoute::getMatchReportRoute($this->project->id, $this->highestdef_away->matchid); $highestdef_away_result = $this->highestdef_away->homegoals . $this->overallconfig['seperator'] . $this->highestdef_away->guestgoals; echo JHtml::link($link, $highestdef_away_result); ?> <br> <?php $team1 = JoomleagueHelperRoute::getTeamInfoRoute($this->project->id, $this->highestdef_away->team1_id); $team2 = JoomleagueHelperRoute::getTeamInfoRoute($this->project->id, $this->highestdef_away->team2_id); $match = JHtml::link($team1, $this->highestdef_away->hometeam) . "<br>" . $this->overallconfig['seperator'] . "<br>" . JHtml::link($team2, $this->highestdef_away->guestteam); echo $match; ?> </td> <?php } else { ?> <td class="statvalue">