Work on webgui and add flags to equipment
This commit is contained in:
+13
-7
@@ -310,21 +310,21 @@ $sth = $pdo->prepare($sql);
|
||||
$sth->execute([$vid]);
|
||||
$res = $sth->fetchAll(PDO::FETCH_NUM);
|
||||
echo '<table class="table table-sm">', "\n";
|
||||
echo '<tr><td colspan="2">', _('Storage type') , "</td>";
|
||||
echo '<tr><td colspan="3">', _('Storage type') , "</td>";
|
||||
foreach ($res as $row) {
|
||||
echo "<tr><td>", $stype[$row[0]], "</td><td>", $row[1], "</td></tr>\n";
|
||||
echo "<tr><td> </td><td>", $stype[$row[0]], "</td><td>", $row[1], "</td></tr>\n";
|
||||
}
|
||||
|
||||
// Boxes
|
||||
$sth = $pdo->prepare("SELECT COUNT(*) FROM box INNER JOIN storage USING (sid) WHERE vid=?");
|
||||
$sth->execute([$user->vid]);
|
||||
echo '<tr><td>', _('Boxes'), '</td><td>', $sth->fetchColumn(), "</td></tr>\n";
|
||||
echo '<tr><td> </td><td>', _('Boxes'), '</td><td>', $sth->fetchColumn(), "</td></tr>\n";
|
||||
|
||||
// Equipment
|
||||
$sth = $pdo->prepare("SELECT COUNT(*) FROM equipment WHERE vid=?");
|
||||
$sth->execute([$user->vid]);
|
||||
echo '<tr><td colspan="2">', _('Equipment') , "</td>";
|
||||
echo '<tr><td>', _('Count'), '</td><td>', $sth->fetchColumn(), "</td></tr>\n";
|
||||
echo '<tr><td colspan="3">', _('Equipment') , "</td>";
|
||||
echo '<tr><td> </td><td>', _('Count'), '</td><td>', $sth->fetchColumn(), "</td></tr>\n";
|
||||
|
||||
// Inventory
|
||||
// All items from vessel storage and all items from boxes in vessel storage
|
||||
@@ -337,8 +337,14 @@ $sth = $pdo->prepare($sql);
|
||||
$sth->bindValue(':vid', $user->vid, PDO::PARAM_INT);
|
||||
$sth->execute();
|
||||
|
||||
echo '<tr><td colspan="2">', _('Inventory') , "</td>";
|
||||
echo '<tr><td>', _('Count'), '</td><td>', $sth->fetchColumn(), "</td></tr>\n";
|
||||
echo '<tr><td colspan="3">', _('Inventory') , "</td>";
|
||||
echo '<tr><td> </td><td>', _('Count'), '</td><td>', $sth->fetchColumn(), "</td></tr>\n";
|
||||
|
||||
// Documents
|
||||
$sth = $pdo->query("SELECT COUNT(*) FROM document");
|
||||
echo '<tr><td colspan="3">', _('Documents') , "</td>";
|
||||
echo '<tr><td> </td><td>', _('Count'), '</td><td>', $sth->fetchColumn(), "</td></tr>\n";
|
||||
|
||||
|
||||
echo "</table>\n";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user