]> git.sesse.net Git - ccbs/commitdiff
Make the number of machines settable via the web interface.
authorSteinar H. Gunderson <sesse@samfundet.no>
Mon, 28 Feb 2005 18:18:27 +0000 (18:18 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Mon, 28 Feb 2005 18:18:27 +0000 (18:18 +0000)
html/do-set-active-round.pl
html/templates/show-tournament.tmpl

index 00393ac62b970071a916c4702b633d2731533dfa..4f8caafe682ecae02f0c50338509dd275079d550 100755 (executable)
@@ -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');
index 640946341420440045a4a727029593cb26925bf3..2fd12b22bd4a0e64e1ecb498176d7933bce40e19 100644 (file)
       [% ELSE %]
       <input type="hidden" name="show" value="true" />
       <input type="submit" value="Vis på storskjerm" />
+      Antall maskiner: <input name="nummachines" value="1" size="1" />
       [% END %]
     </p>
   </form>