-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.php
More file actions
110 lines (85 loc) · 3.64 KB
/
search.php
File metadata and controls
110 lines (85 loc) · 3.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?php
include 'code/config.php';
page_protect();
require('code/db.php');
require('code/employee_db.php');
require('code/equipment_db.php');
$employee_name = $_SESSION['employee_name'];
$employeeID = $_SESSION['employee_id'];
$RS_user_level = get_emp_level($employeeID);
$employee_level = $RS_user_level['level'];
$rs_eqipment = getAllItems();
print_r($rs);
?>
<?php include_once 'include/html-head.php' ?>
<?php include_once 'include/html-header.php' ?>
<main>
<div class="row m-3">
<div class="col-12">
<div class="card">
<div class="card-header">
<h3 class="text-center">Equipment</h3>
<div class="d-grid gap-2 d-md-flex justify-content-md-end">
<button type="button" class="btn btn-sm btn-success"
data-bs-toggle="modal"
data-bs-target="#AddCustomerModal">Add New Item
</button>
</div>
</div>
<div class="card-body table-responsive">
<table id="items-tbl" class="table table-sm table-striped">
<thead class="table-dark">
<tr>
<th>ID</th>
<th>Name</th>
<th>Category</th>
<th>Manufacturer</th>
<th>location</th>
<th>Serial</th>
<th>Active</th>
<th>Available</th>
<th>Loanable</th>
<th>status</th>
<th class="text-center">action</th>
</tr>
</thead>
<tbody>
<?php foreach ($rs_eqipment as $equipment): ?>
<tr>
<td><?= $equipment['equipment_id']; ?></td>
<td><?= $equipment['product_name']; ?></td>
<td><?= $equipment['category']; ?></td>
<td><?= $equipment['manufacturer']; ?></td>
<td><?= $equipment['location']; ?></td>
<td><?= $equipment['serial']; ?></td>
<td><?= $equipment['active'] ?></td>
<td><?= $equipment['available'] ?></td>
<td><?= $equipment['loanable'] ?></td>
<td><?= $equipment['status'] ?></td>
<td class="text-center">
<a href="equipment-details.php?action=view&equipment_id=<?= $equipment['equipment_id']; ?>"
class="btn btn-icon btn-primary btn-sm"
title="Open"><i class="fa fa-folder-open"></i></a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div><!-- end col -->
</div>
</main>
<?php include "include/jquery-imports.php"; ?>
<script>
var buttonCommon = {
exportOptions: {
format: {}
}
};
$('#items-tbl').DataTable({
searching: true,
ordering: true,
paging: true,
});
</script>
<?php include_once 'include/html-footer.php' ?>