More work an webgui
This commit is contained in:
+17
-4
@@ -208,6 +208,11 @@ require 'header.php';
|
||||
if ($action == ACT_DEFAULT):
|
||||
// ========== VARIANT: default behavior =======================================
|
||||
|
||||
$sort = array(
|
||||
1 => 'ename',
|
||||
2 => 'ename DESC'
|
||||
);
|
||||
|
||||
$sql = "SELECT eid, ename, manufacturer, model, serial, remarks,"
|
||||
. " TIMESTAMPDIFF(MONTH, purchdate, NOW()) AS age_mon "
|
||||
. "FROM equipment WHERE vid=? "
|
||||
@@ -221,18 +226,26 @@ echo "<h1>$pagetitle</h1>\n";
|
||||
// Filter
|
||||
?>
|
||||
|
||||
<form method="post">
|
||||
<form method="post" action="<?=$g_scriptname?>">
|
||||
<div id="filter" class="card">
|
||||
<div class="card-header">Filter</div>
|
||||
<div class="card-body">
|
||||
<label>Category</label>
|
||||
<select>
|
||||
<label for="flt_category">Category</label>
|
||||
<select id="flt_category" name="flt_category">
|
||||
<?php
|
||||
foreach ($opt_ecat as $k => $v) {
|
||||
echo '<option value="', $k,'">', $v, '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<label for="flt_manuf">Manufacturer</label>
|
||||
<select id="flt_category" name="flt_category">
|
||||
<?php
|
||||
foreach ($opt_manufacturer as $k => $v) {
|
||||
echo '<option value="', $k,'">', $v, '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<button class="btn btn-sm btn-primary" title="<?=_('Apply')?>">Go</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -292,7 +305,7 @@ elseif ($action == ACT_ADD):
|
||||
// ========== VARIANT: add record =============================================
|
||||
?>
|
||||
<h2><?=_('Add Equipment')?></h2>
|
||||
<form method="post">
|
||||
<form method="post" action="<?=$g_scriptname?>">
|
||||
<div class="mb-3">
|
||||
<label for="ename" class="form-label"><?=_('Name')?></label>
|
||||
<input type="text" class="form-control" id="ename" name="ename">
|
||||
|
||||
Reference in New Issue
Block a user