Skip to content

Commit 8dad0a6

Browse files
committed
Update ship_list.php
Fixed selectors in ship list
1 parent f7eade8 commit 8dad0a6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

htdocs/ship_list.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,17 +229,17 @@ function applyFilter() {
229229
}
230230

231231
function buildSelector($db, $id, $name, $table, $typeField = false) {
232-
$selector = '<br><select id="'.$id.'Pick" name="'.$name.'" onchange="'.$id.'f()"><option value="All">All</option>';
232+
$selector = '<br><select id="'.$id.'Pick" name="'.$name.'" onchange="'.$id.'Pickf()"><option value="All">All</option>';
233233
$db->query('
234234
SELECT DISTINCT '.$name. ($typeField!==false?',' . $typeField: '') . '
235235
FROM '.$table.'
236236
ORDER BY '.$name);
237237
$class = '';
238238
while ($db->nextRecord()) {
239239
if($typeField !== false) {
240-
$class = ' class="' . $id . $db->getInt($typeField) . '"';
240+
$class = 'class="' . $id . $db->getInt($typeField) . '"';
241241
}
242-
$selector .= '<option value="'.$db->getField($name).'"'.$class.'">'
242+
$selector .= '<option '.$class.' value="'.$db->getField($name).'">'
243243
.$db->getField($name).'</option>';
244244
}
245245
$selector .= '</select>';
@@ -303,4 +303,4 @@ function buildShipStats($db) {
303303
}
304304
return $stat;
305305
}
306-
?>
306+
?>

0 commit comments

Comments
 (0)