Add edit of playmode and difficulty.
authorSteinar H. Gunderson <sesse@samfundet.no>
Wed, 16 Feb 2005 14:37:40 +0000 (14:37 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Wed, 16 Feb 2005 14:37:40 +0000 (14:37 +0000)
html/do-edit-scores.pl

index 8b28303..a56563d 100755 (executable)
@@ -26,6 +26,12 @@ for my $p ($cgi->param()) {
        if ($p =~ /^score(\d+)-(\d+)/) {
                $dbh->do('UPDATE scores SET score=? WHERE tournament=? AND round=? AND parallel=? AND player=? AND songnumber=?', undef,
                        $val, $tournament, $round, $group, $1, $2);
+       } elsif ($p =~ /^playmode(\d+)-(\d+)/) {
+               $dbh->do('UPDATE scores SET playmode=? WHERE tournament=? AND round=? AND parallel=? AND player=? AND songnumber=?', undef,
+                       $val, $tournament, $round, $group, $1, $2);
+       } elsif ($p =~ /^difficulty(\d+)-(\d+)/) {
+               $dbh->do('UPDATE scores SET difficulty=? WHERE tournament=? AND round=? AND parallel=? AND player=? AND songnumber=?', undef,
+                       $val, $tournament, $round, $group, $1, $2);
        }
 }