From c7283b6a8ab12956329719e4b73f4cbe9450a681 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Thu, 17 Feb 2005 19:20:31 +0000 Subject: [PATCH] Add front end for resetting the song chooser. --- html/randomsongs.pl | 16 ++++++++++++++++ html/templates/index.tmpl | 1 + html/templates/randomsongs.tmpl | 11 +++++++++++ 3 files changed, 28 insertions(+) create mode 100755 html/randomsongs.pl create mode 100755 html/templates/randomsongs.tmpl diff --git a/html/randomsongs.pl b/html/randomsongs.pl new file mode 100755 index 0000000..daa36cb --- /dev/null +++ b/html/randomsongs.pl @@ -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; diff --git a/html/templates/index.tmpl b/html/templates/index.tmpl index ccb16c2..06f4e32 100644 --- a/html/templates/index.tmpl +++ b/html/templates/index.tmpl @@ -10,5 +10,6 @@ diff --git a/html/templates/randomsongs.tmpl b/html/templates/randomsongs.tmpl new file mode 100755 index 0000000..f8ff24f --- /dev/null +++ b/html/templates/randomsongs.tmpl @@ -0,0 +1,11 @@ +[%# vim:set filetype=html: %] +
+

For øyeblikket er [% num_used %] sanger satt som + brukt i sangvelgeren. Nullstiller du sangvelgeren, går den tilbake + til 0 og alle sanger kan potensielt trekkes ut når du lager en ny + gruppe.

+ +
+

+
+
-- 2.39.2