From: Steinar H. Gunderson Date: Sat, 19 Feb 2005 01:31:19 +0000 (+0000) Subject: Added a front end for setting the active tournament. X-Git-Url: https://git.sesse.net/?p=ccbs;a=commitdiff_plain;h=17fb1bf2b14db43f9e9e9342ed355169a60099cb Added a front end for setting the active tournament. --- diff --git a/html/set-active-tournament.pl b/html/set-active-tournament.pl new file mode 100755 index 0000000..4a17ef2 --- /dev/null +++ b/html/set-active-tournament.pl @@ -0,0 +1,18 @@ +#! /usr/bin/perl + +use ccbs; +use strict; +use warnings; + +my $dbh = ccbs::db_connect(); +my $tournaments = ccbs::db_fetch_all($dbh, 'SELECT * FROM tournaments'); +my $ref = $dbh->selectrow_hashref('SELECT * FROM bigscreen.active_tournament'); +my $active_tournament = (defined($ref)) ? $ref->{'tournament'} : -1; + +ccbs::print_header(); +ccbs::process_template('set-active-tournament.tmpl', 'Sett aktiv turnering', { + tournaments => $tournaments, + active_tournament => $active_tournament + }); + +$dbh->disconnect; diff --git a/html/templates/index.tmpl b/html/templates/index.tmpl index 06f4e32..4b872ad 100644 --- a/html/templates/index.tmpl +++ b/html/templates/index.tmpl @@ -13,3 +13,11 @@
  • Sangvelger
  • + +

    Storskjerm

    + +
    + +
    diff --git a/html/templates/set-active-tournament.tmpl b/html/templates/set-active-tournament.tmpl new file mode 100644 index 0000000..cce163a --- /dev/null +++ b/html/templates/set-active-tournament.tmpl @@ -0,0 +1,28 @@ +[%# vim:set filetype=html: %] +

    Sett aktiv turnering

    + +
    +

    Denne funksjonen styrer hvilken turnering som er aktiv, dvs. hvilken storskjermen + skal vise informasjon fra.

    + +
    +

    + + +

    +
    + +