-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvehiclelist.php
More file actions
84 lines (79 loc) · 2.14 KB
/
vehiclelist.php
File metadata and controls
84 lines (79 loc) · 2.14 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
<?php
include 'core/core.inc.php';
if (!isset($_SESSION['user_id'])) {
header("Location: login.php");
}
include 'core/vehicle.db.php';
$v = new Vehicle($host, $db_name, $db_user, $db_pass);
if (isset($_GET['del'])) {
$v->delete($_GET['del']);
header("Location: vehiclelist.php");
}
$vehiclelist = $v->fetch_by_id(1, 1);
?>
<!DOCTYPE html>
<html>
<head>
<title>Dashboard</title>
<meta name="og:title" property="og:title" content="TATA Sponge Limited :: History"/>
<?php
include 'core/meta.php';
?>
<link rel="stylesheet" href="css/core.css">
</head>
<body>
<?php
require "core/top_nav.php";
?>
<div class="container-fluid">
<div class="row">
<div class="col col-lg-3 side_nav">
<?php
$active = "vehiclelist";
require "core/side_nav.php";
?>
</div>
<div class="col-md-9">
<nav class="navbar navbar-light bg-light">
<a class="navbar-brand">Vehicle List</a>
</nav>
<table class="table table-striped table-hover" id="list_table">
<thead class="thead-dark">
<tr>
<th scope="col">Number</th>
<th scope="col">Type</th>
<th scope="col">Last Issue</th>
<th scope="col">Location</th>
<th scope="col">Operation</th>
</tr>
<tbody>
<?php foreach ($vehiclelist as $key => $value): ?>
<tr>
<th scope="row"><?=$value['no'];?></th>
<td><?=$value['type'];?> (<?=$value['subtype'];?>)</td>
<td><?=$value['status'];?></td>
<td><?=$value['location'];?></td>
<td>
<center>
<a data-toggle="tooltip" href="vehiclelist.php?del=<?=$value['no'];?>" title="Delete">
<img src="images/delete.png" width="20px">
</a>
</center>
</td>
</tr>
<?php endforeach ?>
</tbody>
</table>
</div>
</div>
</div>
</body>
<?php include_once 'core/basic_java.inc.php'; ?>
<link rel="stylesheet" type="text/css" href="DataTables/datatables.min.css"/>
<script type="text/javascript" src="DataTables/datatables.min.js"></script>
<script type="text/javascript">
$(document).ready( function () {
$('#list_table').DataTable();
} );
</script>
</html>