]> git.sesse.net Git - ccbs/blobdiff - html/randomsongs.pl
Add front end for resetting the song chooser.
[ccbs] / html / randomsongs.pl
diff --git a/html/randomsongs.pl b/html/randomsongs.pl
new file mode 100755 (executable)
index 0000000..daa36cb
--- /dev/null
@@ -0,0 +1,16 @@
+#! /usr/bin/perl
+
+use ccbs;
+use strict;
+use warnings;
+
+my $dbh = ccbs::db_connect();
+
+my $ref = $dbh->selectrow_hashref('SELECT COUNT(*) AS num_used FROM randomsongsused');
+
+ccbs::print_header();
+ccbs::process_template('randomsongs.tmpl', 'Sangvelger', {
+               num_used => $ref->{'num_used'}
+       });
+
+$dbh->disconnect;