function CreatePlayerComboboxes() { $comboboxesCount = 5; $namePattern = "player"; $users = GetAllUsers(); if ($users->error->code != Error::NoError) { Site::DisplayError($users->error, "error-box"); return; } for ($i = 1; $i <= $comboboxesCount; ++$i) { print "<td class=\"align-center\">"; $name = $namePattern . $i; Form::Combobox($name, $name, $users); print "</td>"; } }
require_once $_SERVER['DOCUMENT_ROOT'] . "/include/header.php"; Site::RequiresLoggedInUser("/log-in.php"); ?> <h1>Add or remove champions owned by you</h1> <form method="post" action="/process/manage-champions.php" accept-charset="UTF-8"> <table class="form-table"> <tr> <td> <?php Form::Label("Champion", "champion"); ?> <br /> <?php Form::Combobox("champion", "champion", ChampionFacade::GetAllChampions()); ?> </td> </tr> <tr> <td class="align-center"> <?php Form::SubmitButton("submit", "Add"); ?> <?php Form::SubmitButton("submit", "Remove"); ?> </td> </tr> </table>