8 my $id = $cgi->param('id');
10 my $dbh = ccbs::db_connect();
12 my $tournament = $dbh->selectrow_hashref('SELECT * FROM tournaments NATURAL JOIN seasons NATURAL JOIN countries NATURAL JOIN machines NATURAL JOIN scoringsystems WHERE tournament=?', undef, $id);
13 my $registered = ccbs::db_fetch_all($dbh, 'SELECT * FROM tournamentparticipation NATURAL JOIN players WHERE tournament=? ORDER BY LOWER(nick)', $id);
14 my $available = ccbs::db_fetch_all($dbh, 'SELECT * FROM players WHERE player NOT IN ( SELECT player FROM tournamentparticipation WHERE tournament=? ) ORDER BY LOWER(nick)', $id);
17 ccbs::process_template('registration.tmpl', $tournament->{'tournamentname'}, {
18 tournament => $tournament,
19 registered => $registered,
20 available => $available