]> git.sesse.net Git - ccbs/commitdiff
Added showing/selection of playmode and difficulty.
authorSteinar H. Gunderson <sesse@samfundet.no>
Mon, 14 Feb 2005 23:44:44 +0000 (23:44 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Mon, 14 Feb 2005 23:44:44 +0000 (23:44 +0000)
html/show-tournament.pl
html/templates/show-tournament.tmpl

index b02033d3ac925525fe0da1637791246e5b43a417..fd78a3c72f5c00d658b3e782f5f3f00c38713fd2 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,
 # 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,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,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 = ();
        $id);
 
 my @rounds = ();
index 9dc1083a09b95aa3a0b4234d85ca8c1d857cb9a0..3c1839b248025fe0c8c06213d15a71b6e1e69fb5 100644 (file)
     <tr>
       <th>[% pl.nick %]</th>
         [% FOR s = pl.songs %]
     <tr>
       <th>[% pl.nick %]</th>
         [% FOR s = pl.songs %]
-      <td><input name="score[% s.songnumber %]" value="[% s.score %]" size="5" /></td>
+      <td nowrap="nowrap">
+        <input name="score[% s.songnumber %]" value="[% s.score %]" size="5" />
+       <select name="playmode[% s.songnumber %]">
+         <option value=""> </option>
+         [% IF s.playmode == 'single' %]
+         <option value="single" selected="selected">S</option>
+        [% ELSE %]
+         <option value="single">S</option>
+        [% END %]
+         [% IF s.playmode == 'double' %]
+         <option value="double" selected="selected">D</option>
+        [% ELSE %]
+         <option value="double">D</option>
+        [% END %]
+       </select>
+       <select name="difficulty[% s.songnumber %]">
+         <option value=""> </option>
+         [% IF s.difficulty == 'beginner' %]
+         <option value="beginner" selected="selected">B</option>
+        [% ELSE %]
+         <option value="beginner">B</option>
+        [% END %]
+         [% IF s.difficulty == 'standard' %]
+         <option value="standard" selected="selected">S</option>
+        [% ELSE %]
+         <option value="standard">S</option>
+        [% END %]
+         [% IF s.difficulty == 'difficult' %]
+         <option value="difficult" selected="selected">D</option>
+        [% ELSE %]
+         <option value="difficult">D</option>
+        [% END %]
+         [% IF s.difficulty == 'expert' %]
+         <option value="expert" selected="selected">E</option>
+        [% ELSE %]
+         <option value="expert">E</option>
+        [% END %]
+         [% IF s.difficulty == 'challenge' %]
+         <option value="challenge" selected="selected">C</option>
+        [% ELSE %]
+         <option value="challenge">C</option>
+        [% END %]
+       </select>
+      </td>
           [% IF s.chosen %]
       <td>
         <select name="song[% s.songnumber %]">
           [% IF s.chosen %]
       <td>
         <select name="song[% s.songnumber %]">