From f441216a623854ca492d416d0ebe825ae07ab40d Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 14 Feb 2005 19:44:08 +0000 Subject: [PATCH] Added preliminary backend for creating rounds and groups. --- html/do-start-round.pl | 27 +++++++++++++++++++++++++++ html/templates/show-tournament.tmpl | 10 ++++++++++ 2 files changed, 37 insertions(+) create mode 100755 html/do-start-round.pl diff --git a/html/do-start-round.pl b/html/do-start-round.pl new file mode 100755 index 0000000..5cd6779 --- /dev/null +++ b/html/do-start-round.pl @@ -0,0 +1,27 @@ +#! /usr/bin/perl + +use ccbs; +use strict; +use warnings; + +my $dbh = ccbs::db_connect(); +my $cgi = new CGI; + +my $tournament = $cgi->param('tournament'); +my $round = $cgi->param('round'); +my $num_random = $cgi->param('numrandom'); +my $num_chosen = $cgi->param('numchosen'); +my $num_groups = $cgi->param('numgroups'); +my $num_qual = $cgi->param('numqual'); + +$dbh->do('INSERT INTO rounds (tournament, round, randomsongs, chosensongs, numqualifying) VALUES (?, ?, ?, ?, ?)', + undef, $tournament, $round, $num_random, $num_chosen, $num_qual); + +for my $i (1..$num_groups) { + $dbh->do('INSERT INTO groups (tournament, round, parallel) VALUES (?, ?, ?)', + undef, $tournament, $round, $i); +} + +ccbs::print_see_other('show-tournamelt.pl?id=' . $tournament); + +$dbh->disconnect; diff --git a/html/templates/show-tournament.tmpl b/html/templates/show-tournament.tmpl index ad3a8e9..1ae4de1 100644 --- a/html/templates/show-tournament.tmpl +++ b/html/templates/show-tournament.tmpl @@ -33,8 +33,18 @@ Antall som går videre fra hver gruppe + + Antall tilfeldige sanger + + + + Antall selvvalgte sanger + + + + -- 2.39.2