From 17fb1bf2b14db43f9e9e9342ed355169a60099cb Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 19 Feb 2005 01:31:19 +0000 Subject: [PATCH 1/1] Added a front end for setting the active tournament. --- html/set-active-tournament.pl | 18 +++++++++++++++ html/templates/index.tmpl | 8 +++++++ html/templates/set-active-tournament.tmpl | 28 +++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100755 html/set-active-tournament.pl create mode 100644 html/templates/set-active-tournament.tmpl 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.

    + +
    +

    + + +

    +
    + +
    -- 2.39.2