]> git.sesse.net Git - ccbs/blob - html/registration.pl
Added a minimal list over people registered at a tournament.
[ccbs] / html / registration.pl
1 #! /usr/bin/perl
2
3 use ccbs;
4 use strict;
5 use warnings;
6
7 my $cgi = new CGI;
8 my $id = $cgi->param('id');
9
10 my $dbh = ccbs::db_connect();
11
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 $people = ccbs::db_fetch_all($dbh, 'SELECT * FROM tournamentparticipation NATURAL JOIN players WHERE tournament=?', $id);
14
15 ccbs::print_header();
16 ccbs::process_template('registration.tmpl', $tournament->{'tournamentname'}, {
17         people => $people
18 });
19 $dbh->disconnect;