]> git.sesse.net Git - ccbs/blobdiff - html/do-set-active-round.pl
The front end can now choose how many players play per machine (1 or 2).
[ccbs] / html / do-set-active-round.pl
index c98a478dc9a1320804cde5020167e50506fdcb58..db32ecea50e3e75f43c453cc9b4a50a8c89b5765 100755 (executable)
@@ -10,14 +10,16 @@ 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');
+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, last_updated) VALUES (?,?,?,now())',
-               undef, $tournament, $round, $parallel);
+       $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');