/**
  * Method to get the list
  *
  * @access public
  * @return array
  */
 function getData(&$params)
 {
     if (!class_exists('JoomleagueModelResults')) {
         require_once JLG_PATH_SITE . DS . 'models' . DS . 'results.php';
     }
     $model =& JLGModel::getInstance('Results', 'JoomleagueModel');
     $model->setProjectId($params->get('p'));
     $project =& $model->getProject();
     switch ($params->get('round_selection', 0)) {
         case 0:
             // latest
             $roundid = modJLGResultsHelper::getLatestRoundId($project->id);
             break;
         case 1:
             // next
             $roundid = modJLGResultsHelper::getNextRoundId($project->id);
             break;
         case 2:
             //manual
             $roundid = (int) $params->get('id') ? (int) $params->get('id') : $model->getCurrentRound();
             break;
     }
     if (!$roundid) {
         $roundid = $model->getCurrentRound();
     }
     $model->set('divisionid', (int) $params->get('division_id'));
     $model->set('roundid', $roundid);
     $round = modJLGResultsHelper::getRound($project->id, $roundid);
     $matches = $model->getMatches();
     uasort($matches, array('modJLGResultsHelper', '_cmpDate'));
     $matches = array_slice($matches, 0, $params->get('limit', 10));
     $teams = $model->getTeamsIndexedByPtid();
     return array('project' => $project, 'round' => $round, 'matches' => $matches, 'teams' => $teams);
 }
Ejemplo n.º 2
0
							<td colspan="<?php 
                echo $colspan;
                ?>
"></td>
						<?php 
            }
            ?>
						<td colspan="2" class="mod_jl_results_score<?php 
            echo $params->get('moduleclass_sfx');
            ?>
">
							<?php 
            if ($params->get('scorelink', 1)) {
                ?>
								<a href="<?php 
                echo modJLGResultsHelper::getScoreLink($match, $list['project']);
                ?>
">
							<?php 
            }
            ?>
							<?php 
            if ($match->alt_decision) {
                ?>
								<span class="<?php 
                echo $matchresultclass1;
                ?>
"><?php 
                echo (int) $match->team1_result_decision;
                ?>
</span>&nbsp;-&nbsp;<span class="<?php 
Ejemplo n.º 3
0
<?php

/**
 * Joomleague
 * @subpackage	Module-Results
 *
 * @copyright	Copyright (C) 2006-2015 joomleague.at. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 * @link		http://www.joomleague.at
 */
defined('_JEXEC') or die;
require_once dirname(__FILE__) . '/helper.php';
require_once JPATH_SITE . '/components/com_joomleague/joomleague.core.php';
$list = modJLGResultsHelper::getData($params);
$document = JFactory::getDocument();
$document->addStyleSheet(JUri::base() . 'modules/mod_joomleague_results/assets/css/mod_joomleague_results.css');
require JModuleHelper::getLayoutPath('mod_joomleague_results');