Exemple #1
0
}
$orderby = jTipsGetParam($_REQUEST, 'filter_order', 'round');
if (empty($orderby)) {
    $orderby = 'round';
}
$params = array('order' => array('type' => 'order', 'direction' => "{$direction},", 'by' => $orderby), 'order1' => array('type' => 'order', 'direction' => 'ASC', 'by' => 'name'), 'join' => array('type' => 'join', 'join_table' => '#__jtips_seasons', 'lhs_table' => '#__jtips_rounds', 'lhs_key' => 'season_id', 'rhs_table' => '#__jtips_seasons', 'rhs_key' => 'id'));
//has the season select been used?
if ($season_id = jTipsGetParam($_REQUEST, 'season_id', false)) {
    $params['season_id'] = $season_id;
}
//if ($status = jTipsGetParam($_REQUEST, 'status', '')) {
//	$params['status'] = $status;
//}
$limit = jTipsGetParam($_REQUEST, 'limit', 25);
$limitstart = jTipsGetParam($_REQUEST, 'limitstart', 0);
$pageNav = new mosPageNav($focus->getCount($params), $limitstart, $limit);
$jRounds = forceArray($focus->loadByParams($params, $limit, $limitstart));
$formData = array('title' => $jLang['_ADMIN_ROUND_TITLE'], 'editTask' => 'edit', 'module' => 'Rounds', 'icon' => 'rounds');
$currentDir = jTipsGetParam($_REQUEST, 'filter_order_Dir', 'desc');
if ($currentDir == 'desc') {
    $dir = 'asc';
} else {
    $dir = 'desc';
}
//The header row
$header = array('', "<a href='javascript:tableOrdering(\"round\", \"{$dir}\", \"list\");'>" . $jLang['_ADMIN_ROUND_ROUND'] . "</a>", "<a href='javascript:tableOrdering(\"name\", \"{$dir}\", \"list\");'>" . $jLang['_ADMIN_ROUND_SEASON'] . "</a>", "<a href='javascript:tableOrdering(\"#__jtips_rounds.start_time\", \"{$dir}\", \"list\");'>" . $jLang['_ADMIN_ROUND_START'] . "</a>", "<a href='javascript:tableOrdering(\"#__jtips_rounds.end_time\", \"{$dir}\", \"list\");'>" . $jLang['_ADMIN_ROUND_END'] . "</a>", $jLang['_ADMIN_ROUND_STATUS']);
//The row data for each for
$data = array();
$i = 0;
foreach ($jRounds as $round) {
    $status = $round->getStatus();