]> git.sesse.net Git - ccbs/blob - html/shorttitles.pl
Replace TinyPTC with SDL.
[ccbs] / html / shorttitles.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 # FIXME: This will fail with multiple short titles.
13 my $songs = ccbs::db_fetch_all($dbh, 'SELECT song,title,shorttitle FROM songs NATURAL LEFT JOIN songshorttitles ORDER BY LOWER(title)');
14
15 ccbs::print_header();
16 ccbs::process_template('shorttitles.tmpl', _('Short titles'), {
17         songs => $songs,
18 });
19 $dbh->disconnect;