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 @@