+form_create_numeric('rowspp', _('Number of rows per page'), $rowspp, 5, 100, 1);
+
+/*
>
-
- */
+
// limit global settings for captain only
-if ($user->role == 'captain'):
-?>
-
=_('global for all users')?>
+if ($user->role == 'captain') {
+ echo '
', _('global for all users'), "
\n";
+
+ $currsym = $pdo->query("SELECT valstr FROM settings WHERE userid=0 AND sno=4")->fetchColumn();
+ $maximgx = $pdo->query("SELECT valint FROM settings WHERE userid=0 AND sno=20")->fetchColumn();
+ $maximgy = $pdo->query("SELECT valint FROM settings WHERE userid=0 AND sno=21")->fetchColumn();
+
+/*
>
@@ -155,8 +157,11 @@ if ($user->role == 'captain'):
>
-
diff --git a/webgui/storage.php b/webgui/storage.php
index 70e2d18..14eafc7 100644
--- a/webgui/storage.php
+++ b/webgui/storage.php
@@ -206,16 +206,13 @@ echo '
', _('Add Storage'), "
\n";
?>
*/
form_create_text('sname', _('Name'), 40);
form_create_select('stype', _('Type'), $opt_stype);
?>
-
-
=_('Back')?>
+
prepare($sql);
$sth->execute([$id]);
$storage = $sth->fetch(PDO::FETCH_OBJ);
-echo '
', _('Storage'), ': ', $storage->sname, "
\n";
+echo '
', sprintf(_('Storage: %s'), h($storage->sname)), "
\n";
echo '
', "\n";
echo '| ', _('Typ')," | ", $opt_stype[$storage->stype], " |
\n";
@@ -238,7 +235,7 @@ echo '| ', _('Capacity')," | ", $storage->capacity, ' ', $storage->c
echo ' |
|---|
| ', _('Location (x, y, z)')," | (", $storage->x, ', ', $storage->y, ', ', $storage->z, ") |
\n";
echo '| ', _('Width (wx, wy, wz)')," | (", $storage->wx, ', ', $storage->wy, ', ', $storage->wz, ") |
\n";
echo '| ', _('Angle')," | ", $storage->angle, "° |
\n";
-echo '| ', _('Color')," | ", $storage->color, " |
\n";
+echo '| ', _('Color')," | ", format_color($storage->color), " |
\n";
echo '| ', _('Remarks')," | ", h($storage->remarks), " |
\n";
echo "
\n";
@@ -311,7 +308,8 @@ elseif ($action == ACT_EDIT):
echo '
', _('Edit Storage'), "
\n";
-$sql = "SELECT sid, sname, stype, x, y, z, wx, wy, wz, angle, capacity, capaunit, remarks "
+$sql = "SELECT sid, sname, stype, x, y, z, wx, wy, wz, angle, capacity, "
+ . "color, capaunit, remarks "
. "FROM storage "
. "WHERE sid=?";
$sth = $pdo->prepare($sql);
@@ -326,19 +324,20 @@ $storage = $sth->fetch(PDO::FETCH_OBJ);
name, 40);
form_create_select('stype', _('Type'), $opt_stype, $storage->stype);
?>