$direction = jTipsGetParam($_REQUEST, 'filter_order_Dir', 'asc'); if (empty($direction)) { $direction = 'asc'; } $orderby = jTipsGetParam($_REQUEST, 'filter_order', 'name'); if (empty($orderby)) { $orderby = 'name'; } $parameters = array('order' => array('type' => 'order', 'direction' => $direction, 'by' => $orderby)); //has the season select been used? if ($season_id = jTipsGetParam($_REQUEST, 'season_id', false)) { $parameters['season_id'] = $season_id; } //jTipsDebug($params); //die(); $jTeams = forceArray($jTeam->loadByParams($parameters, $limit, $limitstart)); $pageNav = new mosPageNav($jTeam->getCount(), $limitstart, $limit); $data = array(); $i = 0; foreach ($jTeams as $team) { $data[$team->id] = array(makeListLink($team->name, $i++), $team->location, $team->getSeasonName(), $team->points); } //Build the Season filter dropdown $jSeason = new jSeason($database); $jSeasons = forceArray($jSeason->loadByParams()); $options = array(jTipsHTML::makeOption('', $jLang['_ADMIN_USERS_SELECT_SEASON'])); foreach ($jSeasons as $season) { $options[] = jTipsHTML::makeOption($season->id, $season->name); } $filters = array($jLang['_ADMIN_SEASON_SELECT'] => jTipsHTML::selectList($options, 'season_id', "id='season_id' class='inputbox' onChange='this.form.submit();'", 'value', 'text', jTipsGetParam($_REQUEST, 'season_id', ''))); jTipsAdminDisplay::ListView($formData, $header, $data, $pageNav, 'list', $filters);