Shape text using Pango and HarfBuzz; gives us nice ligatures and exotic scripts.
[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 my $selected_player = $cgi->param('player');
10
11 my $dbh = ccbs::db_connect();
12
13 my $tournament = $dbh->selectrow_hashref('SELECT * FROM tournaments NATURAL JOIN seasons NATURAL JOIN countries NATURAL JOIN machines NATURAL JOIN scoringsystems WHERE tournament=?', undef, $id);
14 my $registered = ccbs::db_fetch_all($dbh, 'SELECT * FROM tournamentparticipation NATURAL JOIN players WHERE tournament=? ORDER BY LOWER(nick)', $id);
15 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);
16 my $countries = ccbs::db_fetch_all($dbh, 'SELECT * FROM countries ORDER BY countrycode');
17 my $clubs = ccbs::db_fetch_all($dbh, 'SELECT * FROM clubs ORDER BY clubcode');
18
19 ccbs::print_header();
20 ccbs::process_template('registration.tmpl', $tournament->{'tournamentname'}, {
21         tournament => $tournament,
22         registered => $registered,
23         available => $available,
24         selected_player => $selected_player,
25         countries => $countries,
26         clubs => $clubs
27 });
28 $dbh->disconnect;