X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=html%2Fshorttitles.pl;fp=html%2Fshorttitles.pl;h=c6b93c8dc8f7b0c1d22042451b55eccadeaffc64;hb=c3330be0f0502a8c3ecd0406aeea6b61cf3e78e0;hp=0000000000000000000000000000000000000000;hpb=5993426cc359ecede127053736d97714761b9bad;p=ccbs diff --git a/html/shorttitles.pl b/html/shorttitles.pl new file mode 100755 index 0000000..c6b93c8 --- /dev/null +++ b/html/shorttitles.pl @@ -0,0 +1,19 @@ +#! /usr/bin/perl + +use ccbs; +use strict; +use warnings; + +my $cgi = new CGI; +my $id = $cgi->param('id'); + +my $dbh = ccbs::db_connect(); + +# FIXME: This will fail with multiple short titles. +my $songs = ccbs::db_fetch_all($dbh, 'SELECT song,title,shorttitle FROM songs NATURAL LEFT JOIN songshorttitles ORDER BY LOWER(title)'); + +ccbs::print_header(); +ccbs::process_template('shorttitles.tmpl', 'Korte titler', { + songs => $songs, +}); +$dbh->disconnect;