]> git.sesse.net Git - ccbs/blobdiff - html/tournaments.pl
Add list over tournaments.
[ccbs] / html / tournaments.pl
diff --git a/html/tournaments.pl b/html/tournaments.pl
new file mode 100755 (executable)
index 0000000..1f00a95
--- /dev/null
@@ -0,0 +1,11 @@
+#! /usr/bin/perl
+
+use ccbs;
+use strict;
+use warnings;
+
+my $dbh = ccbs::db_connect();
+my $tournaments = ccbs::db_fetch_all($dbh, 'SELECT * FROM tournaments');
+
+ccbs::print_header();
+ccbs::process_template('tournaments.tmpl', 'Turneringer', { tournaments => $tournaments });