From: Steinar H. Gunderson Date: Mon, 14 Feb 2005 18:16:42 +0000 (+0000) Subject: Added backend for setting paid/not paid. X-Git-Url: https://git.sesse.net/?p=ccbs;a=commitdiff_plain;h=581c820151f988c2470c03d56dbca071432180ca;ds=inline Added backend for setting paid/not paid. --- diff --git a/html/do-set-paid.pl b/html/do-set-paid.pl new file mode 100755 index 0000000..7ac795d --- /dev/null +++ b/html/do-set-paid.pl @@ -0,0 +1,19 @@ +#! /usr/bin/perl + +use ccbs; +use strict; +use warnings; + +my $dbh = ccbs::db_connect(); +my $cgi = new CGI; + +my $tournament = $cgi->param('tournament'); +my $player = $cgi->param('player'); +my $paid = $cgi->param('paid'); + +$dbh->do('UPDATE tournamentparticipation SET paid=? WHERE tournament=? AND player=?', + undef, $paid, $tournament, $player); + +ccbs::print_see_other('registration.pl?id=' . $tournament); + +$dbh->disconnect; diff --git a/html/templates/registration.tmpl b/html/templates/registration.tmpl index cc41a21..539ccb6 100644 --- a/html/templates/registration.tmpl +++ b/html/templates/registration.tmpl @@ -48,6 +48,7 @@

+ [% IF r.paid %]