-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
304 lines (276 loc) · 12.3 KB
/
index.php
File metadata and controls
304 lines (276 loc) · 12.3 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
<?php
ob_start();
session_start();
include "./config/config.php";
$current_page = substr($_SERVER["SCRIPT_NAME"], strrpos($_SERVER["SCRIPT_NAME"], "/") + 1);
?>
<!doctype html>
<html lang="en" data-layout="vertical" data-sidebar="dark" data-sidebar-size="lg" data-preloader="disable"
data-theme="default" data-topbar="light" data-bs-theme="light">
<head>
<meta charset="utf-8">
<title><?= $title ?> - Best Learning Management System in Bangladesh </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta content="Minimal Admin & Dashboard Template" name="description">
<meta content="Themesbrand" name="author">
<script src="<?= BASE_URL ?>assets/libs/jquery/jquery.min.js"></script>
<!-- App favicon -->
<link rel="shortcut icon" href="assets/images/favicon.ico">
<!-- Fonts css load -->
<link rel="preconnect" href="https://fonts.googleapis.com/">
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin>
<link id="fontsLink"
href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"
rel="stylesheet">
<!-- Layout config Js -->
<!-- Bootstrap Css -->
<link href="<?= BASE_URL ?>assets/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<!-- Icons Css -->
<link href="<?= BASE_URL ?>assets/css/icons.min.css" rel="stylesheet" type="text/css">
<!-- App Css-->
<link href="<?= BASE_URL ?>assets/css/app.min.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="<?= BASE_URL ?>assets/libs/toastr/toastr.min.css">
<!-- Layout config Js -->
<script src="<?= BASE_URL ?>assets/js/layout.js"></script>
<!-- Sweet Alert CSS -->
<link rel="stylesheet" href="<?= BASE_URL ?>assets/libs/sweetalert2/sweetalert2.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css">
</head>
<body>
<header>
<section class="bg-primary">
<div class="container d-flex justify-content-between align-items-center py-2">
<ul class="d-flex align-items-center gap-4 mb-0 list-unstyled">
<li>
<a href="" class="text-white d-flex align-items-center gap-1">
<i class="ph ph-phone-call"></i>
1112222434325
</a>
</li>
<li>
<a href="" class="text-white d-flex align-items-center gap-1">
<i class="ph ph-envelope"></i>
2x5bM@example.com
</a>
</li>
</ul>
<ul class="d-flex align-items-center gap-3 mb-0 list-unstyled">
<li>
<a href="" class="text-white d-flex align-items-center gap-1">
<i class="ph ph-facebook-logo"></i>
</a>
</li>
<li>
<a href="" class="text-white d-flex align-items-center gap-1">
<i class="ph ph-twitter-logo"></i>
</a>
</li>
<li>
<a href="" class="text-white d-flex align-items-center gap-1">
<i class="ph ph-linkedin-logo"></i>
</a>
</li>
</ul>
</div>
</section>
<nav class="navbar navbar-expand-lg bg-light">
<div class="container">
<style>
.navbar-brand {
padding-top: 6px;
padding-bottom: 4px;
}
</style>
<a class="navbar-brand fw-bold" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Courses</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Instructors</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Blog</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown"
aria-expanded="false">
Dropdown
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li>
<hr class="dropdown-divider">
</li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link">
Contact Us
</a>
</li>
</ul>
<div class="d-flex align-items-center gap-3">
<!-- Search Form -->
<form class="d-flex" role="search">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search" />
</form>
<!-- Styles -->
<style>
.icon-btn {
position: relative;
width: 36px;
height: 36px;
border: 2px solid #3762EA;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
transition: background-color 0.3s, border-color 0.3s;
cursor: pointer;
}
.icon-btn:hover {
background-color: #3762EA;
border-color: #2c50c0;
}
.icon-btn:hover i {
color: #fff;
}
.icon-btn i {
font-size: 1rem;
color: #3762EA;
transition: color 0.3s;
}
.count-badge {
position: absolute;
top: -9px;
right: -7px;
background-color: #3762EA;
color: #fff;
font-size: 0.65rem;
padding: 4px 6px;
border-radius: 50%;
font-weight: bold;
line-height: 1;
}
i.bi.bi-heart.fw-bold {
padding-top: 4px;
}
</style>
<!-- Cart Icon -->
<div class="icon-btn" title="View Cart">
<i class="bi bi-cart fw-bold"></i>
<div class="count-badge">3</div>
</div>
<!-- Wishlist Icon -->
<div class="icon-btn" title="Wishlist">
<i class="bi bi-heart fw-bold"></i>
<div class="count-badge">5</div>
</div>
</div>
</div>
</div>
</nav>
</header>
<main></main>
<footer class="bg-dark text-white pt-5 pb-4">
<div class="container text-md-start text-center">
<div class="row">
<!-- Company Info -->
<div class="col-md-3 col-lg-3 col-xl-3 mx-auto mb-4">
<h5 class="text-uppercase fw-bold mb-4">Your Company</h5>
<p>
Short description or tagline goes here. You can include mission, vision or quick info.
</p>
</div>
<!-- Products -->
<div class="col-md-2 col-lg-2 col-xl-2 mx-auto mb-4">
<h6 class="text-uppercase fw-bold mb-4">Products</h6>
<p><a href="#" class="text-white text-decoration-none">Product 1</a></p>
<p><a href="#" class="text-white text-decoration-none">Product 2</a></p>
<p><a href="#" class="text-white text-decoration-none">Product 3</a></p>
<p><a href="#" class="text-white text-decoration-none">Product 4</a></p>
</div>
<!-- Useful links -->
<div class="col-md-3 col-lg-2 col-xl-2 mx-auto mb-4">
<h6 class="text-uppercase fw-bold mb-4">Useful Links</h6>
<p><a href="#" class="text-white text-decoration-none">Pricing</a></p>
<p><a href="#" class="text-white text-decoration-none">Settings</a></p>
<p><a href="#" class="text-white text-decoration-none">Orders</a></p>
<p><a href="#" class="text-white text-decoration-none">Help</a></p>
</div>
<!-- Contact -->
<div class="col-md-4 col-lg-3 col-xl-3 mx-auto mb-md-0 mb-4">
<h6 class="text-uppercase fw-bold mb-4">Contact</h6>
<p><i class="bi bi-house me-2"></i> 1234 Street Name, City</p>
<p><i class="bi bi-envelope me-2"></i> info@example.com</p>
<p><i class="bi bi-phone me-2"></i> +1 234 567 890</p>
<p><i class="bi bi-printer me-2"></i> +1 234 567 891</p>
</div>
</div>
<!-- Social media -->
<div class="text-center mt-4">
<a href="#" class="text-white me-4"><i class="bi bi-facebook"></i></a>
<a href="#" class="text-white me-4"><i class="bi bi-twitter"></i></a>
<a href="#" class="text-white me-4"><i class="bi bi-instagram"></i></a>
<a href="#" class="text-white me-4"><i class="bi bi-linkedin"></i></a>
<a href="#" class="text-white me-4"><i class="bi bi-github"></i></a>
</div>
</div>
<!-- Copyright -->
<div class="text-center text-white mt-4 border-top pt-3">
© 2025 Your Company Name. All Rights Reserved.
</div>
</footer>
<!-- JAVASCRIPT -->
</body>
<script src="<?= BASE_URL ?>assets/libs/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="<?= BASE_URL ?>assets/libs/simplebar/simplebar.min.js"></script>
<script src="<?= BASE_URL ?>assets/js/pages/password-addon.init.js"></script>
<script src="<?= BASE_URL ?>assets/libs/toastr/toastr.min.js"></script>
<script>
function notify(type, msg, position = 'toast-bottom-right') {
if (['success', 'info', 'warning', 'error'].includes(type)) {
toastr.options = {
closeButton: true,
positionClass: position,
progressBar: true
};
toastr[type](msg);
} else {
console.error(`Invalid toastr type: ${type}`);
}
}
<?php if (!empty($errors)):
foreach ($errors as $fieldErrors):
foreach ($fieldErrors as $error):
?>
notify('error', '<?= $error; ?>');
<?php
endforeach;
endforeach;
elseif (isset($error_message)): ?>
notify('error', '<?= $error_message; ?>');
<?php endif; ?>
<?php if (isset($success_message)): ?>
notify('success', '<?= $success_message; ?>');
<?php endif; ?>
// === Custom Toasts ===
<?php if (isset($_SESSION['status'])): ?>
notify('<?= $_SESSION['status']['type']; ?>', '<?= $_SESSION['status']['message']; ?>');
<?php unset($_SESSION['status']);
endif; ?>
</script>
</body>
</html>