Add("Unbekannte Funktion!"); $valid = FALSE; } // ========== ACTIONS END ===================================================== require 'header.php'; // ========== PAGE CONTENT ==================================================== if ($action == ACT_DEFAULT): // ========== VARIANT: default behavior ======================================= echo "

$pagetitle

\n"; $sql = "SELECT eid, ename, make, model, serial, remarks " . "FROM equipment " . "ORDER BY eid"; $sth = $pdo->query($sql); $res = $sth->fetchAll(); echo '', "\n"; echo "\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; foreach ($res as $row) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; // Action buttons echo "\n"; echo "\n"; } // Table summary echo "\n"; echo '', "\n"; echo "\n"; echo "
" . _('Description') . "" . _('Make') . "" . _('Model') . "" . _('Serial') . "" . _('Remarks') . " 
". $row['ename'] ."". $row['make'] ."". $row['model'] ."". $row['serial'] ."". $row['remarks'] .""; echo 'View '; echo 'Edit'; echo "
', sprintf(_('%d records'), count($res)), '
\n"; echo '', _('Add'), "\n"; elseif ($action == ACT_ADD): // ========== VARIANT: add record ============================================= ?>

prepare($sql); $sth->execute([$id]); $equipment = $sth->fetch(PDO::FETCH_OBJ); echo "

", $equipment->ename, "

\n"; // Bootstrap grid echo '
'; echo '
'; echo '
'; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
", _('Make'),"", $equipment->make, "
", _('Model'),"", $equipment->model, "
", _('Serial'),"", $equipment->serial, "
\n"; echo '
'; // Column break echo '
'; ?>

Images and documents go here

Drag and drop your image here or click to select a file.

'; // col echo '
'; // row echo '
'; // container // Buttons at bottom of data area echo '
', "\n"; echo '', _('Edit'), "\n"; echo ' '; echo '', _('Delete'), "\n"; echo ' '; echo '', _('Back'), "\n"; echo "
\n"; elseif ($action == ACT_EDIT): // ========== VARIANT: edit single record ===================================== $sql = "SELECT eid, ename, make, model, serial, remarks " . "FROM equipment " . "WHERE eid=?"; $sth = $pdo->prepare($sql); $sth->execute([$id]); $equipment = $sth->fetch(PDO::FETCH_OBJ); ?>

", _('Unknown function call: Please report to system development!'), "

\n"; endif; // $action == ... // ========== END OF VARIANTS ================================================= include 'footer.php';