Compare commits

...

4 Commits

Author SHA1 Message Date
747a67b691 2024.2.27 2024-02-27 10:39:21 +07:00
b938db9e5d redirect after login 2024-02-27 10:37:41 +07:00
1ec8049068 fix path 2024-02-27 10:32:09 +07:00
848dcb5caf fix variable Admin.php 2024-02-27 07:12:02 +07:00
8 changed files with 26 additions and 8 deletions

View File

@ -2,6 +2,11 @@
# CHANGELOG # CHANGELOG
## 2024.2.27
- fix path notification
- redirect to dashboard if already login
## 2024.2.26 ## 2024.2.26
- Clean Unused JS and CSS - Clean Unused JS and CSS

View File

@ -76,10 +76,10 @@ if ($_app_stage != 'Live') {
define('U', APP_URL . '/index.php?_route='); define('U', APP_URL . '/index.php?_route=');
// notification message // notification message
if (file_exists($root_path . $UPLOAD_PATH . DIRECTORY_SEPARATOR . "notifications.json")) { if (file_exists($UPLOAD_PATH . DIRECTORY_SEPARATOR . "notifications.json")) {
$_notifmsg = json_decode(file_get_contents($root_path . $UPLOAD_PATH . DIRECTORY_SEPARATOR . 'notifications.json'), true); $_notifmsg = json_decode(file_get_contents($UPLOAD_PATH . DIRECTORY_SEPARATOR . 'notifications.json'), true);
} }
$_notifmsg_default = json_decode(file_get_contents($root_path . $UPLOAD_PATH . DIRECTORY_SEPARATOR . 'notifications.default.json'), true); $_notifmsg_default = json_decode(file_get_contents($UPLOAD_PATH . DIRECTORY_SEPARATOR . 'notifications.default.json'), true);
//register all plugin //register all plugin
foreach (glob(File::pathFixer($PLUGIN_PATH . DIRECTORY_SEPARATOR . '*.php')) as $filename) { foreach (glob(File::pathFixer($PLUGIN_PATH . DIRECTORY_SEPARATOR . '*.php')) as $filename) {

View File

@ -51,7 +51,7 @@ class Admin
if ($id) { if ($id) {
return ORM::for_table('tbl_users')->find_one($id); return ORM::for_table('tbl_users')->find_one($id);
} else { } else {
return []; return null;
} }
} }
} }

View File

@ -5,6 +5,10 @@
* by https://t.me/ibnux * by https://t.me/ibnux
**/ **/
if(Admin::getID()){
r2(U.'dashboard');
}
if (isset($routes['1'])) { if (isset($routes['1'])) {
$do = $routes['1']; $do = $routes['1'];
} else { } else {

View File

@ -274,7 +274,7 @@ switch ($action) {
} catch (Throwable $e) { } catch (Throwable $e) {
} }
try { try {
$c->delete(); if($c) $c->delete();
} catch (Exception $e) { } catch (Exception $e) {
} catch (Throwable $e) { } catch (Throwable $e) {
} }

View File

@ -4,5 +4,10 @@
* by https://t.me/ibnux * by https://t.me/ibnux
**/ **/
if(Admin::getID()){
r2(APP_URL.'/index.php?_route=dashboard'); r2(U.'dashboard');
}if(User::getID()){
r2(U.'home');
}else{
r2(U.'login');
}

View File

@ -5,6 +5,10 @@
* by https://t.me/ibnux * by https://t.me/ibnux
**/ **/
if(User::getID()){
r2(U.'home');
}
if (isset($routes['1'])) { if (isset($routes['1'])) {
$do = $routes['1']; $do = $routes['1'];
} else { } else {

View File

@ -1,3 +1,3 @@
{ {
"version": "2024.2.26" "version": "2024.2.27"
} }