Exemplo n.º 1
0
    if (!empty($_POST['terms'])) {
        if ($_POST['terms'] == _('Acepto')) {
            $db->query("INSERT INTO league_terms VALUES({$current_user->user_id}, 'nivea')");
        } else {
            header("location: /");
            exit;
        }
    }
    $accepted_terms = $db->get_row("SELECT count(*) as t FROM league_terms WHERE user_id={$current_user->user_id} AND vendor='nivea'")->t == 1;
}
/* }}} */
$sites = $db->get_results("select * from subs where visible order by id asc");
$args = compact('league', 'accepted_terms', 'sites');
Haanga::Load('league/layout-header.tpl', $args);
if (isset($_GET['match'])) {
    $match = new Match(intval($_GET['match']));
    if ($match->read() && $match->league_id == $league->id) {
        $match->print_summary();
    }
} else {
    foreach ($league->get_pages($league->per_page) as $m) {
        $match = new Match($m->id);
        $match->read();
        $match->print_summary();
    }
    echo '<div class="pages-ad">';
    do_pages_reverse($league->total, $league->per_page);
    echo '</div>';
}
echo '</body></html>';
/* vim:set noet ci pi sts=0 sw=4 ts=4: */