diff --git a/config.sample.php b/config.sample.php index fe4461b6..0854bee9 100644 --- a/config.sample.php +++ b/config.sample.php @@ -1,10 +1,15 @@ '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/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); diff --git a/system/controllers/settings.php b/system/controllers/settings.php index 2220f50a..3d084e5b 100644 --- a/system/controllers/settings.php +++ b/system/controllers/settings.php @@ -145,7 +145,7 @@ switch ($action) { r2(U . 'settings/app', 'e', 'PHP GD is not installed'); } } - if ($company == '') { + if ($_POST['general'] && $company == '') { r2(U . 'settings/app', 'e', Lang::T('All field is required')); } else { if ($radius_enable) { diff --git a/system/cron.php b/system/cron.php index 820f476d..b6b12800 100644 --- a/system/cron.php +++ b/system/cron.php @@ -207,3 +207,5 @@ unlink($lockFile); $timestampFile = "$UPLOAD_PATH/cron_last_run.txt"; file_put_contents($timestampFile, time()); + +run_hook('cronjob_end'); #HOOK \ No newline at end of file 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/admin-add.tpl b/ui/ui/admin-add.tpl index fd9abae9..85f97caf 100644 --- a/ui/ui/admin-add.tpl +++ b/ui/ui/admin-add.tpl @@ -101,7 +101,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/admin-edit.tpl b/ui/ui/admin-edit.tpl index 785dd528..c360ba94 100644 --- a/ui/ui/admin-edit.tpl +++ b/ui/ui/admin-edit.tpl @@ -126,7 +126,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/app-settings.tpl b/ui/ui/app-settings.tpl index b578ec9f..dcda7509 100644 --- a/ui/ui/app-settings.tpl +++ b/ui/ui/app-settings.tpl @@ -120,12 +120,17 @@ {Lang::T('Income will reset every this day')} - + + + +
+
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+

{Lang::T('Must include')} [text] & [number], - {Lang::T('it will be replaced.')} + {Lang::T('it will be replaced.')}

{Lang::T('You can use')} WhatsApp {Lang::T('in here too.')} {Lang::T('Free @@ -563,7 +594,10 @@ + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- + Or {Lang::T('Cancel')}
@@ -65,4 +65,4 @@
-{include file="sections/footer.tpl"} \ No newline at end of file +{include file="sections/footer.tpl"} diff --git a/ui/ui/bandwidth-add.tpl b/ui/ui/bandwidth-add.tpl index 8aec8cdb..af6b1fee 100644 --- a/ui/ui/bandwidth-add.tpl +++ b/ui/ui/bandwidth-add.tpl @@ -69,7 +69,7 @@
- + Or {Lang::T('Cancel')}
@@ -128,4 +128,4 @@ function burstIt(value) { } -{include file="sections/footer.tpl"} \ No newline at end of file +{include file="sections/footer.tpl"} diff --git a/ui/ui/bandwidth-edit.tpl b/ui/ui/bandwidth-edit.tpl index 2ee46470..b992cd81 100644 --- a/ui/ui/bandwidth-edit.tpl +++ b/ui/ui/bandwidth-edit.tpl @@ -86,7 +86,7 @@
- + Or {Lang::T('Cancel')}
@@ -145,4 +145,4 @@ } -{include file="sections/footer.tpl"} \ No newline at end of file +{include file="sections/footer.tpl"} diff --git a/ui/ui/customer/dashboard.tpl b/ui/ui/customer/dashboard.tpl index c7acc47b..9c0597ba 100644 --- a/ui/ui/customer/dashboard.tpl +++ b/ui/ui/customer/dashboard.tpl @@ -280,7 +280,7 @@ {/if} - {if $_bill['status'] == 'on'} + {if $_bill['status'] == 'on' && $_bill['prepaid'] != 'YES'} diff --git a/ui/ui/customers-add.tpl b/ui/ui/customers-add.tpl index 7fd31318..893fe24e 100644 --- a/ui/ui/customers-add.tpl +++ b/ui/ui/customers-add.tpl @@ -203,7 +203,7 @@
-
{Lang::T('Cancel')} @@ -312,4 +312,4 @@ {/literal} -{include file="sections/footer.tpl"} \ No newline at end of file +{include file="sections/footer.tpl"} diff --git a/ui/ui/customers-edit.tpl b/ui/ui/customers-edit.tpl index 05b8b1bd..d85a26df 100644 --- a/ui/ui/customers-edit.tpl +++ b/ui/ui/customers-edit.tpl @@ -226,7 +226,7 @@
-
{Lang::T('Cancel')} @@ -310,4 +310,4 @@ {/literal} -{include file="sections/footer.tpl"} \ No newline at end of file +{include file="sections/footer.tpl"} diff --git a/ui/ui/deposit.tpl b/ui/ui/deposit.tpl index f11eed82..ba253e2d 100644 --- a/ui/ui/deposit.tpl +++ b/ui/ui/deposit.tpl @@ -46,7 +46,7 @@
- Or {Lang::T('Cancel')}
diff --git a/ui/ui/hotspot-add.tpl b/ui/ui/hotspot-add.tpl index ee01b1aa..55462816 100644 --- a/ui/ui/hotspot-add.tpl +++ b/ui/ui/hotspot-add.tpl @@ -203,7 +203,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/hotspot-edit.tpl b/ui/ui/hotspot-edit.tpl index cdf9b055..47199861 100644 --- a/ui/ui/hotspot-edit.tpl +++ b/ui/ui/hotspot-edit.tpl @@ -278,7 +278,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/language-add.tpl b/ui/ui/language-add.tpl index c2f592c0..88a65cf4 100644 --- a/ui/ui/language-add.tpl +++ b/ui/ui/language-add.tpl @@ -18,7 +18,7 @@ {/foreach}
- Or {Lang::T('Cancel')}
@@ -29,4 +29,4 @@
-{include file="sections/footer.tpl"} \ No newline at end of file +{include file="sections/footer.tpl"} diff --git a/ui/ui/message-bulk.tpl b/ui/ui/message-bulk.tpl index 3dc59c12..a7626f5b 100644 --- a/ui/ui/message-bulk.tpl +++ b/ui/ui/message-bulk.tpl @@ -77,7 +77,7 @@
- {Lang::T('Cancel')}
diff --git a/ui/ui/message.tpl b/ui/ui/message.tpl index 569bd695..dd7ac21a 100644 --- a/ui/ui/message.tpl +++ b/ui/ui/message.tpl @@ -50,7 +50,7 @@
- + {Lang::T('Cancel')}
diff --git a/ui/ui/plan-edit.tpl b/ui/ui/plan-edit.tpl index cb85d3c1..ee3fa33b 100644 --- a/ui/ui/plan-edit.tpl +++ b/ui/ui/plan-edit.tpl @@ -58,7 +58,7 @@
- + Or {Lang::T('Cancel')}
@@ -68,4 +68,4 @@
-{include file="sections/footer.tpl"} \ No newline at end of file +{include file="sections/footer.tpl"} diff --git a/ui/ui/pool-add.tpl b/ui/ui/pool-add.tpl index 8e850a1a..36ae0fcf 100644 --- a/ui/ui/pool-add.tpl +++ b/ui/ui/pool-add.tpl @@ -40,7 +40,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/pool-edit.tpl b/ui/ui/pool-edit.tpl index 6e0f722f..a43c15ee 100644 --- a/ui/ui/pool-edit.tpl +++ b/ui/ui/pool-edit.tpl @@ -38,7 +38,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/port-add.tpl b/ui/ui/port-add.tpl index b689a896..1f175fbe 100644 --- a/ui/ui/port-add.tpl +++ b/ui/ui/port-add.tpl @@ -37,7 +37,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/port-edit.tpl b/ui/ui/port-edit.tpl index 46413314..daaba21e 100644 --- a/ui/ui/port-edit.tpl +++ b/ui/ui/port-edit.tpl @@ -35,7 +35,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/pppoe-add.tpl b/ui/ui/pppoe-add.tpl index 1c5d54d0..9c863e9a 100644 --- a/ui/ui/pppoe-add.tpl +++ b/ui/ui/pppoe-add.tpl @@ -147,7 +147,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/pppoe-edit.tpl b/ui/ui/pppoe-edit.tpl index 3b52428c..c7d8ea9d 100644 --- a/ui/ui/pppoe-edit.tpl +++ b/ui/ui/pppoe-edit.tpl @@ -214,7 +214,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/radius-nas-add.tpl b/ui/ui/radius-nas-add.tpl index 2215bf35..2d61f586 100644 --- a/ui/ui/radius-nas-add.tpl +++ b/ui/ui/radius-nas-add.tpl @@ -71,7 +71,7 @@
- Or {Lang::T('Cancel')}
diff --git a/ui/ui/radius-nas-edit.tpl b/ui/ui/radius-nas-edit.tpl index 0c185fae..90f779a9 100644 --- a/ui/ui/radius-nas-edit.tpl +++ b/ui/ui/radius-nas-edit.tpl @@ -71,7 +71,7 @@
- Or {Lang::T('Cancel')}
diff --git a/ui/ui/recharge.tpl b/ui/ui/recharge.tpl index 96370d58..e9404dd4 100644 --- a/ui/ui/recharge.tpl +++ b/ui/ui/recharge.tpl @@ -59,7 +59,7 @@
- {Lang::T('Or')} {Lang::T('Cancel')}
diff --git a/ui/ui/refill.tpl b/ui/ui/refill.tpl index aab1800a..b0e0ac4a 100644 --- a/ui/ui/refill.tpl +++ b/ui/ui/refill.tpl @@ -24,7 +24,7 @@
- Or {Lang::T('Cancel')}
@@ -36,4 +36,4 @@
-{include file="sections/footer.tpl"} \ No newline at end of file +{include file="sections/footer.tpl"} diff --git a/ui/ui/routers-add.tpl b/ui/ui/routers-add.tpl index 5fab1556..1239c757 100644 --- a/ui/ui/routers-add.tpl +++ b/ui/ui/routers-add.tpl @@ -61,8 +61,8 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/routers-edit.tpl b/ui/ui/routers-edit.tpl index 52e9c97c..515edf52 100644 --- a/ui/ui/routers-edit.tpl +++ b/ui/ui/routers-edit.tpl @@ -78,7 +78,7 @@
- + Or {Lang::T('Cancel')}
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 { diff --git a/ui/ui/voucher-add.tpl b/ui/ui/voucher-add.tpl index e8d0eaa5..4e579681 100644 --- a/ui/ui/voucher-add.tpl +++ b/ui/ui/voucher-add.tpl @@ -73,7 +73,7 @@
- +
diff --git a/ui/ui/vpn-add.tpl b/ui/ui/vpn-add.tpl index ae26a8ac..10b41bd3 100644 --- a/ui/ui/vpn-add.tpl +++ b/ui/ui/vpn-add.tpl @@ -134,7 +134,7 @@
- + Or {Lang::T('Cancel')}
diff --git a/ui/ui/vpn-edit.tpl b/ui/ui/vpn-edit.tpl index c82b3f34..ab80cf18 100644 --- a/ui/ui/vpn-edit.tpl +++ b/ui/ui/vpn-edit.tpl @@ -214,7 +214,7 @@
- + Or {Lang::T('Cancel')}