]> git.sesse.net Git - ccbs/commitdiff
Distinguish the name= on the form elements.
authorSteinar H. Gunderson <sesse@samfundet.no>
Wed, 16 Feb 2005 13:49:00 +0000 (13:49 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Wed, 16 Feb 2005 13:49:00 +0000 (13:49 +0000)
html/show-tournament.pl
html/templates/show-tournament.tmpl

index fd78a3c72f5c00d658b3e782f5f3f00c38713fd2..8e7c9e9ad96bf3d467255552c6d28cd9341cda77 100755 (executable)
@@ -16,7 +16,7 @@ my $songs = ccbs::db_fetch_all($dbh, 'SELECT song,title FROM machinesongs NATURA
 # Swoop all the data in in a big join, then order it over to quasi-sane Perl objects.
 # (round -> parallel -> player -> songs -> title,chosen,score)
 my $scores = ccbs::db_fetch_all($dbh,
-       'SELECT round,parallel,position,playmode,difficulty,songnumber,nick,song,title,chosen,score FROM roundparticipation NATURAL JOIN players NATURAL JOIN scores NATURAL LEFT JOIN songs WHERE tournament=? ORDER BY round,parallel,position,songnumber',
+       'SELECT round,parallel,position,playmode,difficulty,songnumber,player,nick,song,title,chosen,score FROM roundparticipation NATURAL JOIN players NATURAL JOIN scores NATURAL LEFT JOIN songs WHERE tournament=? ORDER BY round,parallel,position,songnumber',
        $id);
 
 my @rounds = ();
index 4c55422b610a786d725da42b35e78baf3569f545..07bba4a718f763da0ebbfdb1bd0fdcde3564d282 100644 (file)
       <th>[% pl.nick %]</th>
         [% FOR s = pl.songs %]
       <td nowrap="nowrap">
-        <input name="score[% s.songnumber %]" value="[% s.score %]" size="5" />
-       <select name="playmode[% s.songnumber %]">
+        <input name="score[% pl.player %]-[% s.songnumber %]" value="[% s.score %]" size="5" />
+       <select name="playmode[% pl.player %]-[% s.songnumber %]">
          <option value=""> </option>
          [% IF s.playmode == 'single' %]
          <option value="single" selected="selected">S</option>
          <option value="double">D</option>
         [% END %]
        </select>
-       <select name="difficulty[% s.songnumber %]">
+       <select name="difficulty[% pl.player %]-[% s.songnumber %]">
          <option value=""> </option>
          [% IF s.difficulty == 'beginner' %]
          <option value="beginner" selected="selected">B</option>
       </td>
           [% IF s.chosen %]
       <td>
-        <select name="song[% s.songnumber %]">
+        <select name="song[% s.player %]-[% s.songnumber %]">
           <option value=""> </option>
             [% FOR ss = songs %]
               [% IF s.song == ss.song %]