-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·146 lines (105 loc) · 5.05 KB
/
index.php
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<?php
require "loginheader.php";
include "includes/functions.php";
include "includes/wits.inc.php";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>WITS - Dashboard</title>
</head>
<body>
<!--Main Navigation-->
<?php
//includes default header navigation
include_once('includes/header.inc.php');
?>
<!--Main Navigation-->
<!--Main Layout-->
<main>
<div class="container-fluid" style="margin-top:20px;">
<div class="card">
<div class="card-header">
Location Status:
</div>
<div class="card-body">
<?php
$locations = dash_displayLocations();
foreach($locations as $location){
if($location['locationStatus'] == 1)
{
echo '<a href="location.php?id=' . $location['locationID'] .'" class="btn btn-success">' . $location['locationName'] .'</a> ';
}
elseif($location['locationStatus'] == 2)
{
echo '<a href="location.php?id=' . $location['locationID'] .'" class="btn btn-danger" data-toggle="tooltip" data-placement="top" title="Inactive">' . $location['locationName'] .'</a> ';
}
elseif($location['locationStatus'] == 3)
{
echo '<a href="location.php?id=' . $location['locationID'] .'" class="btn btn-warning" data-toggle="tooltip" data-placement="top" title="Pending">' . $location['locationName'] .'</a> ';
}
else
{
echo "Error!";
}
}
next($locations);
?>
</div>
</div>
</br>
<div class="row">
<div class="col">
<div class="card">
<div class="card-header">
<a href="inventory.php" class="btn btn-light">Inventory</a>
</div>
<div class="card-body">
<h4 class="card-title">New Items</h4>
<?php
$topItems = dash_displayTop3Items();
foreach($topItems as $item){
echo '<hr>';
echo '<p class="card-text"><a href="inventory.php?item=' . $item['inventoryID'] .'">'.$item['inventoryID'].'</a>'. " - " . $item['inventoryName'] .'</p>';
}
next($locations);
?>
</div>
</div>
</div>
<div class="col">
<div class="card" >
<div class="card-header">
<a href="orders.php" class="btn btn-light">Orders</a>
</div>
<div class="card-body">
<h4 class="card-title">New Orders</h4>
<?php
$topItems = dash_displayTop3Orders();
foreach($topItems as $item){
echo '<hr>';
echo '<p class="card-text"><a href="orders.php?id='.$item['orderID'].'">'.$item['orderID'].'</a>'. " - " . $item['orderDate'].'</a>'. " - $" . $item['orderTotal'] .'</p>';
}
next($locations);
?>
</div>
</div>
</div>
</div>
</br>
</div>
<!-- main container -->
</main>
<!--Main Layout-->
</body>
</html>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js" integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh"
crossorigin="anonymous"></script>
<script type="text/javascript">
$(document).ready(function () {
$('[data-toggle="tooltip"]').tooltip();
});
</script>