- {if $_bill['status'] == 'on'}
+ {if $_bill['status'] == 'on' && $_bill['prepaid'] != 'yes'}
From 7f72b0c34a6266d64c4e9aa7c4d9814e56ab4702 Mon Sep 17 00:00:00 2001
From: iBNu Maksum
Date: Fri, 25 Oct 2024 14:05:57 +0700
Subject: [PATCH 52/54] cannot deactivate postpaid
---
system/autoload/Admin.php | 12 +++++++-----
system/lan/english.json | 3 ++-
ui/ui/customer/dashboard.tpl | 2 +-
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/system/autoload/Admin.php b/system/autoload/Admin.php
index 0b13542e..bbad49be 100644
--- a/system/autoload/Admin.php
+++ b/system/autoload/Admin.php
@@ -40,7 +40,7 @@ class Admin
$isValid = self::validateToken($_SESSION['aid'], $_COOKIE['aid']);
if (!$isValid) {
self::removeCookie();
- _alert(Lang::T('Token has expired. Please log in again.'), 'danger', "admin");
+ _alert(Lang::T('Token has expired. Please log in again.') . '.'.$_SESSION['aid'], 'danger', "admin");
return 0;
}
return $_SESSION['aid'];
@@ -57,7 +57,7 @@ class Admin
}
if (!empty($_COOKIE['aid']) && !$isValid) {
self::removeCookie();
- _alert(Lang::T('Token has expired. Please log in again.'), 'danger', "admin");
+ _alert(Lang::T('Token has expired. Please log in again.') . '..', 'danger', "admin");
return 0;
} else {
if (time() - $tmp[1] < 86400 * 7) {
@@ -124,7 +124,9 @@ class Admin
'samesite' => 'Lax',
]);
session_destroy();
- unset($_COOKIE['aid']);
+ session_unset();
+ session_start();
+ unset($_COOKIE['aid'], $_SESSION['aid']);
}
}
@@ -151,10 +153,10 @@ class Admin
{
global $config;
$query = ORM::for_table('tbl_users')->select('login_token')->findOne($aid);
- if($config['single_session'] != 'yes'){
+ if ($config['single_session'] != 'yes') {
return true; // For multi-session, any token is valid
}
- if(empty($query)){
+ if (empty($query)) {
return true;
}
return $query->login_token === sha1($cookieToken);
diff --git a/system/lan/english.json b/system/lan/english.json
index 6c50ec00..17775281 100644
--- a/system/lan/english.json
+++ b/system/lan/english.json
@@ -874,5 +874,6 @@
"Welcome_Message": "Welcome Message",
"will_be_replaced_with_Customer_password": "will be replaced with Customer password",
"will_be_replaced_with_Customer_Portal_URL": "will be replaced with Customer Portal URL",
- "will_be_replaced_with_Company_Name": "will be replaced with Company Name"
+ "will_be_replaced_with_Company_Name": "will be replaced with Company Name",
+ "Token_has_expired__Please_log_in_again_": "Token has expired. Please log in again."
}
\ No newline at end of file
diff --git a/ui/ui/customer/dashboard.tpl b/ui/ui/customer/dashboard.tpl
index ae0b1001..9c0597ba 100644
--- a/ui/ui/customer/dashboard.tpl
+++ b/ui/ui/customer/dashboard.tpl
@@ -280,7 +280,7 @@
{/if}
- {if $_bill['status'] == 'on' && $_bill['prepaid'] != 'yes'}
+ {if $_bill['status'] == 'on' && $_bill['prepaid'] != 'YES'}
From e02bf9863fcad8ad55174ca5ae1cb30b8f7e1c38 Mon Sep 17 00:00:00 2001
From: iBNu Maksum
Date: Fri, 25 Oct 2024 14:38:04 +0700
Subject: [PATCH 53/54] fix [[trx_date]]
---
system/autoload/Message.php | 1 +
system/autoload/Package.php | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/system/autoload/Message.php b/system/autoload/Message.php
index 30908c3f..cff8db31 100644
--- a/system/autoload/Message.php
+++ b/system/autoload/Message.php
@@ -235,6 +235,7 @@ class Message
$textInvoice = str_replace('[[phone]]', $config['phone'], $textInvoice);
$textInvoice = str_replace('[[invoice]]', $trx['invoice'], $textInvoice);
$textInvoice = str_replace('[[date]]', Lang::dateAndTimeFormat($trx['recharged_on'], $trx['recharged_time']), $textInvoice);
+ $textInvoice = str_replace('[[trx_date]]', Lang::dateAndTimeFormat($trx['recharged_on'], $trx['recharged_time']), $textInvoice);
if (!empty($trx['note'])) {
$textInvoice = str_replace('[[note]]', $trx['note'], $textInvoice);
}
diff --git a/system/autoload/Package.php b/system/autoload/Package.php
index 09f568d9..456dc0b1 100644
--- a/system/autoload/Package.php
+++ b/system/autoload/Package.php
@@ -475,7 +475,8 @@ class Package
$textInvoice = str_replace('[[address]]', $config['address'], $textInvoice);
$textInvoice = str_replace('[[phone]]', $config['phone'], $textInvoice);
$textInvoice = str_replace('[[invoice]]', $inv, $textInvoice);
- $textInvoice = str_replace('[[date]]', Lang::dateTimeFormat(date("Y-m-d")), $textInvoice);
+ $textInvoice = str_replace('[[date]]', Lang::dateTimeFormat(date("Y-m-d H:i:s")), $textInvoice);
+ $textInvoice = str_replace('[[trx_date]]', Lang::dateTimeFormat(date("Y-m-d H:i:s")), $textInvoice);
$textInvoice = str_replace('[[payment_gateway]]', $gateway, $textInvoice);
$textInvoice = str_replace('[[payment_channel]]', $channel, $textInvoice);
$textInvoice = str_replace('[[type]]', 'Balance', $textInvoice);
From fda935b3a6c3c78dbc660bcfa43e7b0070ad92fb Mon Sep 17 00:00:00 2001
From: Focuslinkstech <45756999+Focuslinkstech@users.noreply.github.com>
Date: Fri, 25 Oct 2024 13:00:29 +0100
Subject: [PATCH 54/54] Update header.tpl
fix panel header
---
ui/ui/sections/header.tpl | 2 --
1 file changed, 2 deletions(-)
diff --git a/ui/ui/sections/header.tpl b/ui/ui/sections/header.tpl
index cc8d295c..17fd0dc0 100644
--- a/ui/ui/sections/header.tpl
+++ b/ui/ui/sections/header.tpl
@@ -185,8 +185,6 @@
color: #a94442;
background-color: #f2dede;
border-color: #ebccd1;
- border-bottom-right-radius: 21px;
- border-bottom-left-radius: 21px;
}
.panel-heading {
| |