better preselected angeltypes

This commit is contained in:
Philip Häusler 2014-08-23 15:47:06 +02:00
parent d60c2f0c40
commit 66f166399c
1 changed files with 4 additions and 1 deletions

View File

@ -34,8 +34,11 @@ function guest_register() {
$angel_types_source = sql_select("SELECT * FROM `AngelTypes` ORDER BY `name`"); $angel_types_source = sql_select("SELECT * FROM `AngelTypes` ORDER BY `name`");
$angel_types = array(); $angel_types = array();
foreach ($angel_types_source as $angel_type) foreach ($angel_types_source as $angel_type) {
$angel_types[$angel_type['id']] = $angel_type['name'] . ($angel_type['restricted'] ? " (restricted)" : ""); $angel_types[$angel_type['id']] = $angel_type['name'] . ($angel_type['restricted'] ? " (restricted)" : "");
if (! $angel_type['restricted'])
$selected_angel_types[] = $angel_type['id'];
}
if (isset($_REQUEST['submit'])) { if (isset($_REQUEST['submit'])) {
$ok = true; $ok = true;