|
@@ -98,39 +98,31 @@ SQL;
|
|
|
foreach ($rows as $row) {
|
|
foreach ($rows as $row) {
|
|
|
$players_id[] = array($row['player'], $row['value'] . " [" . $row['player'] . "]");
|
|
$players_id[] = array($row['player'], $row['value'] . " [" . $row['player'] . "]");
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- $snippets[2] .= <<<HTML
|
|
|
|
|
- <form id="player-edit">
|
|
|
|
|
- <div class="form-group">
|
|
|
|
|
- <label for="player-edit">... or edit existing player</label>
|
|
|
|
|
- <table class="table">
|
|
|
|
|
- <thead>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>Player</th><th>Edit</th><th>Remove</th>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </thead>
|
|
|
|
|
- <tbody>
|
|
|
|
|
|
|
+ foreach ($players_id as $player) {
|
|
|
|
|
+ $snippets[2] .= <<<HTML
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <form id="player_edit_${player[0]}">
|
|
|
|
|
+ <label for="player_edit_${player[0]}">... or edit existing player</label>
|
|
|
|
|
+ <ul class="list-group list-group-flush">
|
|
|
HTML;
|
|
HTML;
|
|
|
|
|
|
|
|
- foreach ($players_id as $player) {
|
|
|
|
|
- $snippets[2] .= "\n\t\t\t\t\t<tr>";
|
|
|
|
|
- $snippets[2] .= "\n\t\t\t\t\t\t<td>$player[1]";
|
|
|
|
|
- $snippets[2] .= "<input type=\"hidden\" name=\"player\" value=\"$player[0]\" form=\"player-edit\"></td><td>";
|
|
|
|
|
- $snippets[2] .= "<input type=\"hidden\" name=\"maintainer\" value=\"$maintainer[0]\" form=\"player-edit\">";
|
|
|
|
|
- $snippets[2] .= "<button class=\"btn btn-primary\" name=\"action\" value=\"e\" form=\"player-edit\">Edit</button></td>";
|
|
|
|
|
- $snippets[2] .= "<td><button class=\"btn btn-danger\" name=\"action\" value=\"x\" form=\"player-edit\">Remove</button></td>\n\t\t\t\t\t</tr>";
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- $snippets[2] .= <<<HTML
|
|
|
|
|
- \n </tbody>
|
|
|
|
|
- </table>
|
|
|
|
|
|
|
+ $snippets[2] .= "\n\t\t\t\t\t\t<li>$player[1]";
|
|
|
|
|
+ $snippets[2] .= "<input type=\"hidden\" name=\"player\" value=\"$player[0]\" form=\"player_edit_${$player[0]}\"></td><td>";
|
|
|
|
|
+ $snippets[2] .= "<input type=\"hidden\" name=\"maintainer\" value=\"$maintainer[0]\" form=\"player_edit${$player[0]}\">";
|
|
|
|
|
+ $snippets[2] .= "<button class=\"btn btn-primary pull-right\" name=\"action\" value=\"e\" form=\"player_edit_${$player[0]}\">Edit</button>";
|
|
|
|
|
+ $snippets[2] .= "<button class=\"btn btn-danger pull-right \" name=\"action\" value=\"x\" form=\"player_edit_${$player[0]}\">Remove</button>\n\t\t\t\t\t</li>";
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ $snippets[2] .= <<<HTML
|
|
|
|
|
+ \n </ul>
|
|
|
|
|
+ </form>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <p> </p>
|
|
|
|
|
+ <a href="./index.php"><button class="btn btn-info">Ready</button></a>
|
|
|
</div>
|
|
</div>
|
|
|
- </form>
|
|
|
|
|
- <div>
|
|
|
|
|
- <p> </p>
|
|
|
|
|
- <a href="./index.php"><button class="btn btn-info">Ready</button></a>
|
|
|
|
|
- </div>
|
|
|
|
|
HTML;
|
|
HTML;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if ( $screen == 3 ) {
|
|
if ( $screen == 3 ) {
|