-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlockscreen.php
More file actions
308 lines (287 loc) · 17.6 KB
/
Copy pathlockscreen.php
File metadata and controls
308 lines (287 loc) · 17.6 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
305
306
307
308
<?php
ob_start();
session_start();
include ("_init.php");
// Redirect, If User Not Logged In
if (!isset($session->data['username'])) {
if (!$user->isLogged()) {
redirect(root_url() . '/index.php?redirect_to=' . url());
}
$session->data['email'] = user('email');
$session->data['username'] = user('username');
$session->data['ref_url'] = isset($session->data['ref_url']) ? $session->data['ref_url'] : '';
$user->logout();
}
$error = '';
if ($request->server['REQUEST_METHOD'] == 'POST' && isset($request->post['password'])) {
try {
if (!$request->post['password']) {
throw new Exception(trans('error_invalid_password'));
}
if (!$session->data['username']) {
throw new Exception(trans('error_invalid_username'));
}
$email = $session->data['email'];
$password = $request->post['password'];
// Attempt to Log In
if ($user->login($email, $password)) {
$url = $session->data['ref_url'] ? $session->data['ref_url'] : root_url() . '/admin/dashboard.php';
redirect($url);
}
$error = trans('error_invalid_username_or_password');
} catch (Exception $e) {
$error = $e->getMessage();
}
}
?>
<!DOCTYPE html>
<html lang="<?php echo $document->langTag($active_lang);?>">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title><?php echo trans('text_lockscreen');?><?php echo ' | '.store('name') ? store('name') : ''; ?></title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!--Set Favicon-->
<?php if ($store->get('favicon')): ?>
<link rel="shortcut icon" href="assets/zaintechnologyinc/img/logo-favicons/<?php echo $store->get('favicon'); ?>">
<?php else: ?>
<link rel="shortcut icon" href="assets/zaintechnologyinc/img/logo-favicons/nofavicon.png">
<?php endif; ?>
<!-- All CSS -->
<?php if (DEMO || USECOMPILEDASSET) : ?>
<!-- Login Combined CSS -->
<link type="text/css" href="assets/zaintechnologyinc/cssmin/login.css" rel="stylesheet">
<?php else : ?>
<!--begin::Fonts(mandatory for all pages)-->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter:300,400,500,600,700" />
<!--end::Fonts-->
<!--begin::Global Stylesheets Bundle(mandatory for all pages)-->
<link href="assets/sultanui/plugins/global/plugins.bundle.css" rel="stylesheet" type="text/css" />
<link href="assets/sultanui/css/style.bundle.css" rel="stylesheet" type="text/css" />
<!--end::Global Stylesheets Bundle-->
<?php endif; ?>
<!-- All JS -->
<script type="text/javascript">
var baseUrl = "<?php echo root_url(); ?>";
var adminDir = "<?php echo ADMINDIRNAME; ?>";
var refUrl = "<?php echo isset($session->data['ref_url']) ? $session->data['ref_url'] : ''?>";
</script>
<!--begin::Javascript-->
<script>var hostUrl = "assets/sultanui/";</script>
<!--begin::Global Javascript Bundle(mandatory for all pages)-->
<script src="assets/sultanui/plugins/global/plugins.bundle.js"></script>
<script src="assets/sultanui/js/scripts.bundle.js"></script>
<!--end::Global Javascript Bundle-->
<!-- Common JS -->
<script src="assets/zaintechnologyinc/js/common.js"></script>
<!-- Login JS -->
<script src="assets/zaintechnologyinc/js/login.js"></script>
</head>
<!--begin::Body-->
<body id="kt_body" class="app-blank bgi-size-cover bgi-position-center">
<!--begin::Theme mode setup on page load-->
<script>var defaultThemeMode = "light"; var themeMode; if ( document.documentElement ) { if ( document.documentElement.hasAttribute("data-bs-theme-mode")) { themeMode = document.documentElement.getAttribute("data-bs-theme-mode"); } else { if ( localStorage.getItem("data-bs-theme") !== null ) { themeMode = localStorage.getItem("data-bs-theme"); } else { themeMode = defaultThemeMode; } } if (themeMode === "system") { themeMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"; } document.documentElement.setAttribute("data-bs-theme", themeMode); }</script>
<!--end::Theme mode setup on page load-->
<!--begin::Root-->
<div class="d-flex flex-column flex-root" id="kt_app_root">
<!--begin::Page bg image-->
<style>body { background-image: url('assets/sultanui/media/auth/bg10.jpeg'); } [data-bs-theme="dark"] body { background-image: url('assets/sultanui/media/auth/bg10-dark.jpeg'); }</style>
<!--end::Page bg image-->
<!--begin::Authentication - Sign-in -->
<div class="d-flex flex-column flex-lg-row flex-column-fluid">
<!--begin::Aside-->
<div class="d-flex flex-lg-row-fluid">
<!--begin::Content-->
<div class="d-flex flex-column flex-center pb-0 pb-lg-10 p-10 w-100">
<!--begin::Image-->
<img class="theme-light-show mx-auto mw-100 w-150px w-lg-300px mb-10 mb-lg-20" src="assets/sultanui/media/auth/agency.png" alt="" />
<img class="theme-dark-show mx-auto mw-100 w-150px w-lg-300px mb-10 mb-lg-20" src="assets/sultanui/media/auth/agency-dark.png" alt="" />
<!--end::Image-->
<!--begin::Title-->
<h1 class="text-gray-800 fs-2qx fw-bold text-center mb-7">Fast, Efficient and Productive</h1>
<!--end::Title-->
<!--begin::Text-->
<div class="text-gray-600 fs-base text-center fw-semibold">SultanPOS is a fast, efficient,
and productive <a href="#" class="opacity-75-hover text-primary me-1">point-of-sale</a> app that
<br /> streamlines the <a href="#" class="opacity-75-hover text-primary me-1">checkout</a> process and enhances customer experience. This
<br />revolutionary app offers innovative tools for <a href="#" class="opacity-75-hover text-primary me-1">sales management,</a> making it
<br />the ultimate tool for businesses of all sizes.
</div>
<!--end::Text-->
</div>
<!--end::Content-->
</div>
<!--begin::Aside-->
<!--begin::Body-->
<div class="d-flex flex-column-fluid flex-lg-row-auto justify-content-center justify-content-lg-end p-12">
<!--begin::Wrapper-->
<div class="bg-body d-flex flex-column flex-center rounded-4 w-md-600px p-10">
<!--begin::Content-->
<div class="d-flex flex-center flex-column align-items-stretch h-lg-100 w-md-400px">
<!--begin::Wrapper-->
<div class="d-flex flex-center flex-column-fluid pb-15 pb-lg-20" ng-controller="LoginController">
<!--begin::Form-->
<form class="form w-100 lockscreen-credentials" action="" method="post" autocomplete="off">
<!--begin::Heading-->
<div class="text-center mb-11">
<!--begin::Title-->
<h1 class="text-dark fw-bolder mb-3">Account Locked</h1>
<!--end::Title-->
<!--begin::Subtitle-->
<div class="text-gray-500 fw-semibold fs-6">Enter your password to retrieve your session</div>
<!--end::Subtitle=-->
</div>
<!--begin::Heading-->
<!--begin::Separator-->
<div class="separator separator-content my-14">
<span class="w-125px text-gray-500 fw-semibold fs-5"><?php echo $session->data['username'];?></span>
</div>
<!--end::Separator-->
<?php if (isset($error_message)) : ?>
<!--begin::Alert-->
<div class="alert alert-danger d-flex align-items-center p-5">
<!--begin::Icon-->
<span class="svg-icon svg-icon-2hx svg-icon-danger me-3">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path opacity="0.3" d="M22.9558 10.2848L21.3341 8.6398C21.221 8.52901 21.1317 8.39637 21.0715 8.24996C21.0114 8.10354 20.9816 7.94641 20.9841 7.78814V5.4548C20.9826 5.13514 20.9179 4.81893 20.7938 4.52433C20.6697 4.22973 20.4887 3.96255 20.261 3.73814C20.0333 3.51374 19.7636 3.33652 19.4672 3.21668C19.1709 3.09684 18.8538 3.03673 18.5341 3.0398H16.2008C16.0425 3.04229 15.8854 3.01255 15.739 2.95238C15.5925 2.89221 15.4599 2.80287 15.3491 2.6898L13.7158 1.0448C13.2608 0.590273 12.6439 0.334961 12.0008 0.334961C11.3576 0.334961 10.7408 0.590273 10.2858 1.0448L8.64078 2.66647C8.52999 2.77954 8.39735 2.86887 8.25094 2.92904C8.10452 2.98922 7.94739 3.01896 7.78911 3.01647H5.45578C5.13612 3.01799 4.8199 3.08266 4.5253 3.20675C4.23071 3.33085 3.96353 3.51193 3.73912 3.73959C3.51471 3.96724 3.3375 4.237 3.21766 4.53335C3.09781 4.82971 3.0377 5.14682 3.04078 5.46647V7.7998C3.04327 7.95808 3.01353 8.11521 2.95335 8.26163C2.89318 8.40804 2.80385 8.54068 2.69078 8.65147L1.04578 10.2848C0.591249 10.7398 0.335938 11.3567 0.335938 11.9998C0.335938 12.6429 0.591249 13.2598 1.04578 13.7148L2.66745 15.3598C2.78051 15.4706 2.86985 15.6032 2.93002 15.7496C2.99019 15.8961 3.01994 16.0532 3.01745 16.2115V18.5448C3.01897 18.8645 3.08363 19.1807 3.20773 19.4753C3.33182 19.7699 3.5129 20.0371 3.74056 20.2615C3.96822 20.4859 4.23798 20.6631 4.53433 20.7829C4.83068 20.9028 5.14779 20.9629 5.46745 20.9598H7.80078C7.95906 20.9573 8.11619 20.9871 8.2626 21.0472C8.40902 21.1074 8.54166 21.1967 8.65245 21.3098L10.2974 22.9548C10.7525 23.4093 11.3693 23.6646 12.0124 23.6646C12.6556 23.6646 13.2724 23.4093 13.7274 22.9548L15.3608 21.3331C15.4716 21.2201 15.6042 21.1307 15.7506 21.0706C15.897 21.0104 16.0542 20.9806 16.2124 20.9831H18.5458C19.1894 20.9831 19.8066 20.7275 20.2617 20.2724C20.7168 19.8173 20.9724 19.2001 20.9724 18.5565V16.2231C20.97 16.0649 20.9997 15.9077 21.0599 15.7613C21.12 15.6149 21.2094 15.4823 21.3224 15.3715L22.9674 13.7265C23.1935 13.5002 23.3726 13.2314 23.4944 12.9357C23.6162 12.64 23.6784 12.3231 23.6773 12.0032C23.6762 11.6834 23.6119 11.3669 23.4881 11.072C23.3643 10.7771 23.1834 10.5095 22.9558 10.2848Z" fill="currentColor"/>
<path d="M12.0039 15.4998C11.7012 15.4998 11.4109 15.38 11.1969 15.1668C10.9829 14.9535 10.8626 14.6643 10.8626 14.3627V13.9382C10.8467 13.2884 10.9994 12.6456 11.306 12.0718C11.6126 11.4981 12.0627 11.013 12.6126 10.6634C12.7969 10.561 12.9505 10.4114 13.0575 10.2302C13.1645 10.049 13.221 9.84266 13.2213 9.63242C13.2213 9.31073 13.0931 9.00223 12.8648 8.77476C12.6365 8.5473 12.3268 8.41951 12.0039 8.41951C11.6811 8.41951 11.3714 8.5473 11.1431 8.77476C10.9148 9.00223 10.7865 9.31073 10.7865 9.63242C10.7865 9.93399 10.6663 10.2232 10.4523 10.4365C10.2382 10.6497 9.94792 10.7695 9.64522 10.7695C9.34253 10.7695 9.05223 10.6497 8.83819 10.4365C8.62415 10.2232 8.50391 9.93399 8.50391 9.63242C8.50763 9.02196 8.67214 8.42317 8.98099 7.89592C9.28984 7.36868 9.7322 6.93145 10.2639 6.62796C10.7955 6.32447 11.3978 6.16535 12.0105 6.16651C12.6233 6.16767 13.225 6.32908 13.7554 6.63458C14.2859 6.94009 14.7266 7.37899 15.0335 7.9074C15.3403 8.43582 15.5025 9.03522 15.5039 9.64569C15.5053 10.2562 15.3458 10.8563 15.0414 11.3861C14.7369 11.9159 14.2983 12.3568 13.7692 12.6647C13.5645 12.8132 13.4003 13.0101 13.2913 13.2378C13.1824 13.4655 13.1322 13.7167 13.1453 13.9685V14.3931C13.1373 14.6894 13.0136 14.9708 12.8004 15.1776C12.5872 15.3843 12.3014 15.4999 12.0039 15.4998Z" fill="currentColor"/>
<path d="M12.0026 18.9998C12.6469 18.9998 13.1693 18.4775 13.1693 17.8332C13.1693 17.1888 12.6469 16.6665 12.0026 16.6665C11.3583 16.6665 10.8359 17.1888 10.8359 17.8332C10.8359 18.4775 11.3583 18.9998 12.0026 18.9998Z" fill="currentColor"/>
</svg>
</span>
<!--end::Icon-->
<!--begin::Wrapper-->
<div class="d-flex flex-column">
<!--begin::Title-->
<h4 class="mb-1">Alert</h4>
<!--end::Title-->
<!--begin::Content-->
<span><?php echo $error_message ; ?></span>
<!--end::Content-->
</div>
<!--end::Wrapper-->
</div>
<!--end::Alert-->
<br/>
<?php endif; ?>
<!--begin::Input group=-->
<div class="fv-row mb-8">
<!--begin::Password-->
<input class="form-control bg-transparent" type="password" name="password" placeholder="Password" autocomplete="off" autofocus>
<!--end::Password-->
</div>
<!--end::Wrapper-->
<!--begin::Submit button-->
<div class="d-grid mb-10">
<button type="submit" class="btn btn-primary">
<!--begin::Indicator label-->
<span class="indicator-label">Sign In</span>
<!--end::Indicator label-->
<!--begin::Indicator progress-->
<span class="indicator-progress">Please wait...
<span class="spinner-border spinner-border-sm align-middle ms-2"></span></span>
<!--end::Indicator progress-->
</button>
</div>
<!--end::Submit button-->
<!--begin::SignIn-->
<div class="text-gray-500 text-center fw-semibold fs-6">Or want to
<a href="index.php" class="link-primary">Sign In</a> as Different User.</div>
<!--end::SignIn-->
</form>
<!--end::Form-->
</div>
<!--end::Wrapper-->
<!--begin::Footer-->
<div class="d-flex flex-stack">
<!--begin::Languages-->
<div class="me-10">
<!--begin::Toggle-->
<button class="btn btn-flex btn-link btn-color-gray-700 btn-active-color-primary rotate fs-base" data-kt-menu-trigger="click" data-kt-menu-placement="bottom-start" data-kt-menu-offset="0px, 0px">
<img data-kt-element="current-lang-flag" class="w-20px h-20px rounded me-3" src="assets/sultanui/media/flags/united-states.svg" alt="" />
<span data-kt-element="current-lang-name" class="me-1">English</span>
<!--begin::Svg Icon | path: icons/duotune/arrows/arr072.svg-->
<span class="svg-icon svg-icon-5 svg-icon-muted rotate-180 m-0">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.4343 12.7344L7.25 8.55005C6.83579 8.13583 6.16421 8.13584 5.75 8.55005C5.33579 8.96426 5.33579 9.63583 5.75 10.05L11.2929 15.5929C11.6834 15.9835 12.3166 15.9835 12.7071 15.5929L18.25 10.05C18.6642 9.63584 18.6642 8.96426 18.25 8.55005C17.8358 8.13584 17.1642 8.13584 16.75 8.55005L12.5657 12.7344C12.2533 13.0468 11.7467 13.0468 11.4343 12.7344Z" fill="currentColor" />
</svg>
</span>
<!--end::Svg Icon-->
</button>
<!--end::Toggle-->
<!--begin::Menu-->
<div class="menu menu-sub menu-sub-dropdown menu-column menu-rounded menu-gray-800 menu-state-bg-light-primary fw-semibold w-200px py-4 fs-7" data-kt-menu="true" id="kt_auth_lang_menu">
<!--begin::Menu item-->
<div class="menu-item px-3">
<a href="#" class="menu-link d-flex px-5" data-kt-lang="English">
<span class="symbol symbol-20px me-4">
<img data-kt-element="lang-flag" class="rounded-1" src="assets/sultanui/media/flags/united-states.svg" alt="" />
</span>
<span data-kt-element="lang-name">English</span>
</a>
</div>
<!--end::Menu item-->
<!--begin::Menu item-->
<div class="menu-item px-3">
<a href="#" class="menu-link d-flex px-5" data-kt-lang="Spanish">
<span class="symbol symbol-20px me-4">
<img data-kt-element="lang-flag" class="rounded-1" src="assets/sultanui/media/flags/spain.svg" alt="" />
</span>
<span data-kt-element="lang-name">Spanish</span>
</a>
</div>
<!--end::Menu item-->
<!--begin::Menu item-->
<div class="menu-item px-3">
<a href="#" class="menu-link d-flex px-5" data-kt-lang="German">
<span class="symbol symbol-20px me-4">
<img data-kt-element="lang-flag" class="rounded-1" src="assets/sultanui/media/flags/germany.svg" alt="" />
</span>
<span data-kt-element="lang-name">German</span>
</a>
</div>
<!--end::Menu item-->
<!--begin::Menu item-->
<div class="menu-item px-3">
<a href="#" class="menu-link d-flex px-5" data-kt-lang="Japanese">
<span class="symbol symbol-20px me-4">
<img data-kt-element="lang-flag" class="rounded-1" src="assets/sultanui/media/flags/japan.svg" alt="" />
</span>
<span data-kt-element="lang-name">Japanese</span>
</a>
</div>
<!--end::Menu item-->
<!--begin::Menu item-->
<div class="menu-item px-3">
<a href="#" class="menu-link d-flex px-5" data-kt-lang="French">
<span class="symbol symbol-20px me-4">
<img data-kt-element="lang-flag" class="rounded-1" src="assets/sultanui/media/flags/france.svg" alt="" />
</span>
<span data-kt-element="lang-name">French</span>
</a>
</div>
<!--end::Menu item-->
</div>
<!--end::Menu-->
</div>
<!--end::Languages-->
<!--begin::Links-->
<div class="d-flex fw-semibold text-muted fs-base gap-1">
© <?=date('Y')?> <a href="https://sultans.group/">Sultan Technologies</a>, v<?php echo settings('version'); ?>
</div>
<!--end::Links-->
</div>
<!--end::Footer-->
</div>
<!--end::Content-->
</div>
<!--end::Wrapper-->
</div>
<!--end::Body-->
</div>
<!--end::Authentication - Sign-in-->
</div>
<!--end::Root-->
<noscript>You need to have javascript enabled in order to use <strong><?php echo store('name');?></strong>.</noscript>
</body>
<!--end::Body-->
</html>