-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdashboard.php
More file actions
166 lines (146 loc) · 4.99 KB
/
dashboard.php
File metadata and controls
166 lines (146 loc) · 4.99 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
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<?php
include 'db.php';
$total_products = mysqli_fetch_assoc(mysqli_query($conn,"SELECT COUNT(*) as total FROM products"))['total'];
$low_stock_count = mysqli_fetch_assoc(mysqli_query($conn,"SELECT COUNT(*) as total FROM products WHERE quantity <= reorder_level"))['total'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dashboard</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css" rel="stylesheet">
<style>
body {
background: linear-gradient(135deg, #f8f9fa, #e9ecef);
font-family: 'Segoe UI', sans-serif;
}
.navbar {
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.dashboard-title {
text-align: center;
margin-top: 30px;
margin-bottom: 20px;
}
.dashboard-title h1 {
font-weight: 700;
font-size: 2.5rem;
}
.dashboard-title .tagline {
color: #6c757d;
font-size: 1.2rem;
}
.dashboard-cards .card {
border-radius: 15px;
box-shadow: 0 6px 12px rgba(0,0,0,0.1);
transition: transform 0.3s, box-shadow 0.3s;
}
.dashboard-cards .card:hover {
transform: translateY(-8px);
box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}
.dashboard-cards .card-body {
text-align: center;
}
.dashboard-cards .card-body i {
font-size: 2.5rem;
margin-bottom: 10px;
color: #fff;
}
.btn-dashboard {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
font-weight: 600;
border-radius: 12px;
transition: transform 0.2s, box-shadow 0.2s;
}
.btn-dashboard:hover {
transform: scale(1.05);
box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}
@media(max-width:768px){
.dashboard-buttons .col-md-3 {
flex: 0 0 45%;
margin-bottom: 15px;
}
.dashboard-cards .col-md-3 {
flex: 0 0 80%;
margin-bottom: 20px;
}
}
</style>
</head>
<body>
<nav class="navbar bg-dark">
<div class="container-fluid justify-content-center">
<span class="navbar-brand mb-0 h1 text-white">
Manage Smart. Stock Smart.
</span>
</div>
</nav>
<div class="dashboard-title">
<h1>Stock Management System</h1>
<p class="tagline">Manage Your Inventory Efficiently & Smoothly</p>
</div>
<div class="container dashboard-cards mb-5">
<div class="row g-4 justify-content-center">
<div class="col-md-3">
<div class="card bg-primary text-white">
<div class="card-body">
<i class="bi bi-box-seam"></i>
<h5 class="card-title mt-2">Total Products</h5>
<p class="card-text fs-4 fw-bold"><?php echo $total_products; ?></p>
</div>
</div>
</div>
<div class="col-md-3">
<div class="card bg-danger text-white">
<div class="card-body">
<i class="bi bi-exclamation-triangle"></i>
<h5 class="card-title mt-2">Low Stock</h5>
<p class="card-text fs-4 fw-bold"><?php echo $low_stock_count; ?></p>
</div>
</div>
</div>
</div>
</div>
<div class="container dashboard-buttons">
<div class="row g-4 justify-content-center">
<div class="col-md-3">
<a href="products.php" class="btn btn-primary w-100 py-3 btn-dashboard">
<i class="bi bi-card-list"></i> Product List
</a>
</div>
<div class="col-md-3">
<a href="add_product.php" class="btn btn-success w-100 py-3 btn-dashboard">
<i class="bi bi-plus-circle"></i> Add Product
</a>
</div>
<div class="col-md-3">
<a href="stock_in.php" class="btn btn-info w-100 py-3 text-white btn-dashboard">
<i class="bi bi-box-arrow-in-down"></i> Stock In
</a>
</div>
<div class="col-md-3">
<a href="stock_out.php" class="btn btn-danger w-100 py-3 btn-dashboard">
<i class="bi bi-box-arrow-in-down"></i> Stock Out
</a>
</div>
<div class="col-md-3">
<a href="low_stock.php" class="btn btn-danger w-100 py-3 btn-dashboard">
<i class="bi bi-exclamation-circle"></i> Low Stock Alert
</a>
</div>
<div class="col-md-3">
<a href="suppliers.php" class="btn btn-info w-100 py-3 text-white btn-dashboard">
<i class="bi bi-box-arrow-in-down"></i> suppliers
</a>
</div>
</div>
</div>
</body>
</html>