From f299b49249d2f2499a30e9d31373c9bb946d2555 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 28 Feb 2005 18:18:27 +0000 Subject: [PATCH] Make the number of machines settable via the web interface. --- html/do-set-active-round.pl | 5 +++-- html/templates/show-tournament.tmpl | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/html/do-set-active-round.pl b/html/do-set-active-round.pl index 00393ac..4f8caaf 100755 --- a/html/do-set-active-round.pl +++ b/html/do-set-active-round.pl @@ -10,14 +10,15 @@ my $cgi = new CGI; my $tournament = $cgi->param('tournament'); my $round = $cgi->param('round'); my $parallel = $cgi->param('parallel'); +my $num_machines = $cgi->param('nummachines'); $dbh->{AutoCommit} = 0; $dbh->do('DELETE FROM bigscreen.active_groups WHERE tournament=? AND round=? AND parallel=?', undef, $tournament, $round, $parallel); if ($cgi->param('show') eq 'true') { - $dbh->do('INSERT INTO bigscreen.active_groups (tournament, round, parallel, num_machines, last_updated) VALUES (?,?,?,1,now())', - undef, $tournament, $round, $parallel); + $dbh->do('INSERT INTO bigscreen.active_groups (tournament, round, parallel, num_machines, last_updated) VALUES (?,?,?,?,now())', + undef, $tournament, $round, $parallel, $num_machines); } $dbh->do('NOTIFY active_groups'); diff --git a/html/templates/show-tournament.tmpl b/html/templates/show-tournament.tmpl index 6409463..2fd12b2 100644 --- a/html/templates/show-tournament.tmpl +++ b/html/templates/show-tournament.tmpl @@ -106,6 +106,7 @@ [% ELSE %] + Antall maskiner: [% END %]

-- 2.39.2