示例#1
0
$matches = kicker::get_matches(!isset($_GET['show_all']), !isset($_GET['sort_desc']));
$smarty->assign('matches', $matches);
$total_goals = kicker::get_total_goals();
$smarty->assign('total_goals', $total_goals);
$player_names = kicker::get_player_names();
$smarty->assign('player_names', $player_names);
list($player_streaks_c, $player_streaks) = kicker::get_5game_streaks();
$player_form = kicker::get_form($player_streaks);
$substring = 10 * 35;
// how many streaks should be shown
$smarty->assign('player_streaks', $player_streaks);
$smarty->assign('player_streaks_c', $player_streaks_c);
$smarty->assign('player_form', $player_form);
//$smarty->assign('colored', $colored);
$smarty->assign('substring', $substring);
$availabilities = kicker::get_availabilities();
$smarty->assign('availabilities', $availabilities);
$dates = array_keys($elo_trend);
if (count($dates) > 1) {
    $last_date = $dates[count($dates) - 1];
} else {
    $last_date = date('Y-m-d');
}
if (count($dates) > 2) {
    $second_last_date = $dates[count($dates) - 2];
} else {
    $second_last_date = $last_date;
}
if (!isset($elo_trend[$last_date])) {
    $elo_table_act = [];
} else {