X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=html%2Fdo-set-active-round.pl;h=5b0376e6b44ea0d908c7bff4b0a3b503e3380df0;hp=4f8caafe682ecae02f0c50338509dd275079d550;hb=9b92b979d4647472f0beefae30c08855a3284966;hpb=f299b49249d2f2499a30e9d31373c9bb946d2555 diff --git a/html/do-set-active-round.pl b/html/do-set-active-round.pl index 4f8caaf..5b0376e 100755 --- a/html/do-set-active-round.pl +++ b/html/do-set-active-round.pl @@ -4,6 +4,8 @@ use ccbs; use strict; use warnings; +ccbs::admin_only(); + my $dbh = ccbs::db_connect(); my $cgi = new CGI; @@ -11,14 +13,15 @@ my $tournament = $cgi->param('tournament'); my $round = $cgi->param('round'); my $parallel = $cgi->param('parallel'); my $num_machines = $cgi->param('nummachines'); +my $players_per_machine = $cgi->param('playerspermachine'); $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 (?,?,?,?,now())', - undef, $tournament, $round, $parallel, $num_machines); + $dbh->do('INSERT INTO bigscreen.active_groups (tournament, round, parallel, num_machines, last_updated, players_per_machine) VALUES (?,?,?,?,now(),?)', + undef, $tournament, $round, $parallel, $num_machines, $players_per_machine); } $dbh->do('NOTIFY active_groups');