Add Alert Page

This commit is contained in:
Ibnu Maksum
2024-02-23 14:20:12 +07:00
parent 6de63bed63
commit c6a203b1f0
12 changed files with 88 additions and 25 deletions

View File

@ -101,7 +101,6 @@ if (isset($_SESSION['notify'])) {
unset($_SESSION['ntype']);
}
// Routing Engine
$req = _get('_route');
$routes = explode('/', $req);

View File

@ -26,19 +26,16 @@ switch ($do) {
$d->last_login = date('Y-m-d H:i:s');
$d->save();
_log($username . ' ' . Lang::T('Login Successful'), $d['user_type'], $d['id']);
r2(U . 'dashboard');
_alert(Lang::T('Login Successful'),'success', "dashboard");
} else {
_msglog('e', Lang::T('Invalid Username or Password'));
_log($username . ' ' . Lang::T('Failed Login'), $d['user_type']);
r2(U . 'admin');
_alert(Lang::T('Invalid Username or Password'),'danger', "admin");
}
} else {
_msglog('e', Lang::T('Invalid Username or Password'));
r2(U . 'admin');
_alert(Lang::T('Invalid Username or Password'),'danger', "admin");
}
} else {
_msglog('e', Lang::T('Invalid Username or Password'));
r2(U . 'admin');
_alert(Lang::T('Invalid Username or Password'),'danger', "admin");
}
break;

View File

@ -26,7 +26,7 @@ switch ($do) {
$d->last_login = date('Y-m-d H:i:s');
$d->save();
_log($username . ' ' . Lang::T('Login Successful'), 'User', $d['id']);
r2(U . 'home');
_alert(Lang::T('Login Successful'),'success', "home");
} else {
_msglog('e', Lang::T('Invalid Username or Password'));
_log($username . ' ' . Lang::T('Failed Login'), 'User');
@ -64,6 +64,7 @@ switch ($do) {
r2(U . 'login', 'e', Lang::T('Voucher activation failed'));
}
} else {
_alert(Lang::T('Login Successful'),'success', "dashboard");
r2(U . 'login', 'e', Lang::T('Voucher activation failed') . '.');
}
}

View File

@ -9,4 +9,4 @@ if (session_status() == PHP_SESSION_NONE) session_start();
Admin::removeCookie();
User::removeCookie();
session_destroy();
header('location: index.php');
_alert(Lang::T('Logout Successful'),'warning', "login");

View File

@ -450,5 +450,9 @@
"Report_Viewer": "Report Viewer",
"Super_Administrator": "Super Administrator",
"Send_To": "Send To",
"Resend": "Resend"
"Resend": "Resend",
"Alert": "Alert",
"success": "success",
"Click_Here": "Click Here",
"danger": "danger"
}