} else {
                if ($action == 'delete_seasons') {
                    $seasons_id = isset($_POST['seasons_id']) ? $_POST['seasons_id'] : null;
                    foreach ($seasons_id as $season_id) {
                        if ($season_id && $game_model->is_provider_season($provider_id, $season_id)) {
                            $game_model->delete_season($season_id);
                        }
                    }
                }
            }
        }
    }
}
$seasons['future']['seasons'] = $game_model->get_future_seasons($provider_id);
$seasons['current']['seasons'] = $game_model->get_current_seasons($provider_id);
$seasons['past']['seasons'] = $game_model->get_past_seasons($provider_id);
// Приводим даты в порядок
foreach ($seasons as &$season_type) {
    foreach ($season_type['seasons'] as &$season) {
        if ($season['season_sdate']) {
            $season['season_sdate'] = date('d-m-Y', $season['season_sdate']);
        }
        if ($season['season_edate']) {
            $season['season_edate'] = date('d-m-Y', $season['season_edate']);
        }
    }
}
$seasons['future']['print_count'] = count($seasons['future']['seasons']);
$seasons['future']['print_name'] = 'Будущие сезоны';
$seasons['current']['print_count'] = count($seasons['current']['seasons']);
$seasons['current']['print_name'] = 'Текущие сезоны';