]> git.sesse.net Git - ccbs/commitdiff
The front end can now choose how many players play per machine (1 or 2).
authorSteinar H. Gunderson <sesse@samfundet.no>
Fri, 4 Mar 2005 22:38:17 +0000 (22:38 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Fri, 4 Mar 2005 22:38:17 +0000 (22:38 +0000)
html/do-set-active-round.pl
html/templates/show-tournament.tmpl

index 4f8caafe682ecae02f0c50338509dd275079d550..db32ecea50e3e75f43c453cc9b4a50a8c89b5765 100755 (executable)
@@ -11,14 +11,15 @@ my $tournament = $cgi->param('tournament');
 my $round = $cgi->param('round');
 my $parallel = $cgi->param('parallel');
 my $num_machines = $cgi->param('nummachines');
 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->{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');
 }
 
 $dbh->do('NOTIFY active_groups');
index b91f94c6e204c7981f5524acb576696fa7915dcb..a5faa7ca632c170d1cb923cb9ec6f0a1107885d6 100644 (file)
       <input type="hidden" name="show" value="true" />
       <input type="submit" value="Vis på storskjerm" />
       Antall maskiner: <input name="nummachines" value="1" size="1" />
       <input type="hidden" name="show" value="true" />
       <input type="submit" value="Vis på storskjerm" />
       Antall maskiner: <input name="nummachines" value="1" size="1" />
+      Antall spillere per maskin: <input name="playerspermachine" value="1" size="1" />
       [% END %]
     </p>
   </form>
       [% END %]
     </p>
   </form>