From 05a5b784aa50fb77be8bf5e9df1aae0639301256 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Fri, 7 Jul 2023 15:51:48 +0700 Subject: [PATCH 1/8] add break; --- system/controllers/order.php | 1 + 1 file changed, 1 insertion(+) diff --git a/system/controllers/order.php b/system/controllers/order.php index c2c9a09a..016c2c4c 100644 --- a/system/controllers/order.php +++ b/system/controllers/order.php @@ -56,6 +56,7 @@ switch ($action) { } else { r2(U . "order/package/", 's', Lang::T("You have no unpaid transaction")); } + break; case 'view': $trxid = $routes['2'] * 1; $trx = ORM::for_table('tbl_payment_gateway') From d31a37cf4d696a4d2a00961cf3335a8bdbbe4a3a Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Fri, 7 Jul 2023 15:52:10 +0700 Subject: [PATCH 2/8] php 7.4 only --- README.md | 2 +- system/lan/english/common.lan.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 31ffadfd..d19af204 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Most current web servers with PHP & MySQL installed will be capable of running P Minimum Requirements - Linux or Windows OS -- PHP Version 7.2+ +- PHP Version 7.4 - Both PDO & MySQLi Support - GD2 Image Library - CURL support diff --git a/system/lan/english/common.lan.php b/system/lan/english/common.lan.php index f6dda107..31702f9a 100644 --- a/system/lan/english/common.lan.php +++ b/system/lan/english/common.lan.php @@ -329,3 +329,5 @@ $_L['You_are_Online_Logout'] = 'You are Online, Logout?'; $_L['Connect_to_Internet'] = 'Connect to Internet?'; $_L['Your_account_not_connected_to_internet'] = 'Your account not connected to internet'; +$_L['Failed_to_create_transaction_'] = 'Failed to create transaction. '; +$_L['Failed_to_check_status_transaction_'] = 'Failed to check status transaction. '; From 7e203eaa118425642278d9dd4275e7c337a5c622 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Tue, 18 Jul 2023 09:28:45 +0700 Subject: [PATCH 3/8] Fix link order Voucher --- ui/ui/user-dashboard.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/ui/user-dashboard.tpl b/ui/ui/user-dashboard.tpl index fa993322..4fc4babf 100644 --- a/ui/ui/user-dashboard.tpl +++ b/ui/ui/user-dashboard.tpl @@ -134,7 +134,7 @@
- + {$_L['Order_Voucher']} From dea73fb2a6bcc675773e91a0ec7033b4375df8c1 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Tue, 18 Jul 2023 09:51:43 +0700 Subject: [PATCH 4/8] Add email in registration form --- system/controllers/register.php | 12 +++++++++++- ui/ui/register-otp.tpl | 5 +++++ ui/ui/register-rotp.tpl | 6 +++--- ui/ui/register.tpl | 32 ++++++++++++++++++++------------ 4 files changed, 39 insertions(+), 16 deletions(-) diff --git a/system/controllers/register.php b/system/controllers/register.php index f554be4d..5f41f97f 100644 --- a/system/controllers/register.php +++ b/system/controllers/register.php @@ -20,12 +20,15 @@ switch ($do) { case 'post': $otp_code = _post('otp_code'); $username = alphanumeric(_post('username'),"+_."); + $email = _post('email'); $fullname = _post('fullname'); $password = _post('password'); $cpassword = _post('cpassword'); $address = _post('address'); if(!empty($config['sms_url'])){ $phonenumber = $username; + }else if(strlen($username)<21){ + $phonenumber = $username; } $msg = ''; if (Validator::Length($username, 35, 2) == false) { @@ -37,6 +40,9 @@ switch ($do) { if (!Validator::Length($password, 35, 2)) { $msg .= 'Password should be between 3 to 35 characters' . '
'; } + if (!Validator::Email($email)) { + $msg .= 'Email is not Valid
'; + } if ($password != $cpassword) { $msg .= $_L['PasswordsNotMatch'] . '
'; } @@ -53,6 +59,7 @@ switch ($do) { $ui->assign('username', $username); $ui->assign('fullname', $fullname); $ui->assign('address', $address); + $ui->assign('email', $email); $ui->assign('phonenumber', $phonenumber); $ui->assign('notify', '
+
+ + +
diff --git a/ui/ui/register-rotp.tpl b/ui/ui/register-rotp.tpl index d01cca02..a9a99e6c 100644 --- a/ui/ui/register-rotp.tpl +++ b/ui/ui/register-rotp.tpl @@ -63,11 +63,11 @@
- + {$_L['Cancel']}
- {$_L['Cancel']} +
diff --git a/ui/ui/register.tpl b/ui/ui/register.tpl index 8e88d9d1..849c1c01 100644 --- a/ui/ui/register.tpl +++ b/ui/ui/register.tpl @@ -43,19 +43,25 @@
1. {$_L['Register_Member']}
-
- +
+
- + +
+
+ +
- +
@@ -67,21 +73,23 @@
- +
- +
+
+
-
-
From 5e474e4bf79fdb916ab0352486da7d2ec2ae342a Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Tue, 18 Jul 2023 16:30:12 +0700 Subject: [PATCH 5/8] Add Setting to disable Voucher --- CHANGELOG.md | 6 ++++++ system/controllers/settings.php | 12 ++++++++++++ system/lan/english/common.lan.php | 1 + ui/ui/app-settings.tpl | 30 +++++++++++++++++++++--------- ui/ui/sections/header.tpl | 10 ++++++---- ui/ui/sections/user-header.tpl | 2 ++ ui/ui/user-dashboard.tpl | 14 +++++++++++++- 7 files changed, 61 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c5b4135..4c32f1d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ # CHANGELOG +## 2023 + +- Fix link buy Voucher +- Add email field to registration form +- Change registration design Form +- Add Setting to disable Voucher ## 2023.6.20 - Hide time for Created date. diff --git a/system/controllers/settings.php b/system/controllers/settings.php index 8a5e818e..6a5625c6 100644 --- a/system/controllers/settings.php +++ b/system/controllers/settings.php @@ -206,6 +206,7 @@ switch ($action) { case 'app-post': $company = _post('company'); $footer = _post('footer'); + $disable_voucher = _post('disable_voucher'); $telegram_bot = _post('telegram_bot'); $telegram_target_id = _post('telegram_target_id'); $sms_url = _post('sms_url'); @@ -245,6 +246,17 @@ switch ($action) { $d->save(); } + $d = ORM::for_table('tbl_appconfig')->where('setting', 'disable_voucher')->find_one(); + if($d){ + $d->value = $disable_voucher; + $d->save(); + }else{ + $d = ORM::for_table('tbl_appconfig')->create(); + $d->setting = 'disable_voucher'; + $d->value = $disable_voucher; + $d->save(); + } + $d = ORM::for_table('tbl_appconfig')->where('setting', 'telegram_bot')->find_one(); if($d){ $d->value = $telegram_bot; diff --git a/system/lan/english/common.lan.php b/system/lan/english/common.lan.php index 31702f9a..73f54b21 100644 --- a/system/lan/english/common.lan.php +++ b/system/lan/english/common.lan.php @@ -331,3 +331,4 @@ $_L['Your_account_not_connected_to_internet'] = 'Your account not connected to i $_L['Failed_to_create_transaction_'] = 'Failed to create transaction. '; $_L['Failed_to_check_status_transaction_'] = 'Failed to check status transaction. '; +$_L['Disable_Voucher'] = 'Disable Voucher'; diff --git a/ui/ui/app-settings.tpl b/ui/ui/app-settings.tpl index 683276d6..f8ffb419 100644 --- a/ui/ui/app-settings.tpl +++ b/ui/ui/app-settings.tpl @@ -56,6 +56,16 @@

edit at config.php

+
+ +
+ +

Voucher activation menu will be hidden

+
+
Telegram Notification
@@ -155,17 +165,19 @@ add dst-host=*.tawk.to {$_L['You_can_use_html_tag']}
-
-
- -
-
-
/ip hotspot walled-garden
-add dst-host={$_domain}
-add dst-host=*.{$_domain}
+ +
+
+ +
+
+ +
/ip hotspot walled-garden
+            add dst-host={$_domain}
+            add dst-host=*.{$_domain}
diff --git a/ui/ui/sections/header.tpl b/ui/ui/sections/header.tpl index 2da993e0..187b5dad 100644 --- a/ui/ui/sections/header.tpl +++ b/ui/ui/sections/header.tpl @@ -129,10 +129,12 @@
  • {$_L['Prepaid_User']}
  • -
  • {$_L['Prepaid_Vouchers']}
  • -
  • {$_L['Refill_Account']}
  • + {if $_c['disable_voucher'] != 'yes'} +
  • {$_L['Prepaid_Vouchers']}
  • +
  • {$_L['Refill_Account']}
  • + {/if}
  • {$_L['Recharge_Account']}
  • {$_MENU_PREPAID} diff --git a/ui/ui/sections/user-header.tpl b/ui/ui/sections/user-header.tpl index 330c5aad..d5b261ee 100644 --- a/ui/ui/sections/user-header.tpl +++ b/ui/ui/sections/user-header.tpl @@ -102,12 +102,14 @@ {$_MENU_AFTER_DASHBOARD} + {if $_c['disable_voucher'] != 'yes'}
  • {Lang::T('Voucher')}
  • + {/if} {if $_c['payment_gateway'] != 'none' or $_c['payment_gateway'] == '' }
  • diff --git a/ui/ui/user-dashboard.tpl b/ui/ui/user-dashboard.tpl index 4fc4babf..ed4a7858 100644 --- a/ui/ui/user-dashboard.tpl +++ b/ui/ui/user-dashboard.tpl @@ -99,6 +99,16 @@ {/if} + {if $_c['disable_voucher'] == 'yes'} + + {/if} {if $_bill['type'] == 'Hotspot' && $_bill['status'] == 'on'} {/if}
    -
    + {if $_c['disable_voucher'] != 'yes'} +

    {$_L['Voucher_Activation']}

    @@ -147,6 +158,7 @@
    + {/if} {include file="sections/user-footer.tpl"} \ No newline at end of file From 39d3c683bc7bef8cf6c58d6ae8cb5a82da5db14c Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Fri, 21 Jul 2023 09:14:56 +0700 Subject: [PATCH 6/8] Fix Title for PPPOE plans --- CHANGELOG.md | 1 + system/controllers/services.php | 3 +++ system/lan/english/common.lan.php | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c32f1d1..015de9d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Add email field to registration form - Change registration design Form - Add Setting to disable Voucher +- Fix Title for PPPOE plans ## 2023.6.20 - Hide time for Created date. diff --git a/system/controllers/services.php b/system/controllers/services.php index 35137f82..7621a535 100644 --- a/system/controllers/services.php +++ b/system/controllers/services.php @@ -238,6 +238,7 @@ switch ($action) { break; case 'pppoe': + $ui->assign('_title', $_L['PPPOE_Plans']); $ui->assign('xfooter', ''); $name = _post('name'); @@ -256,6 +257,7 @@ switch ($action) { break; case 'pppoe-add': + $ui->assign('_title', $_L['PPPOE_Plans']); $d = ORM::for_table('tbl_bandwidth')->find_many(); $ui->assign('d', $d); $p = ORM::for_table('tbl_pool')->find_many(); @@ -267,6 +269,7 @@ switch ($action) { break; case 'pppoe-edit': + $ui->assign('_title', $_L['PPPOE_Plans']); $id = $routes['2']; $d = ORM::for_table('tbl_plans')->find_one($id); if ($d) { diff --git a/system/lan/english/common.lan.php b/system/lan/english/common.lan.php index 73f54b21..a72756a0 100644 --- a/system/lan/english/common.lan.php +++ b/system/lan/english/common.lan.php @@ -329,6 +329,6 @@ $_L['You_are_Online_Logout'] = 'You are Online, Logout?'; $_L['Connect_to_Internet'] = 'Connect to Internet?'; $_L['Your_account_not_connected_to_internet'] = 'Your account not connected to internet'; -$_L['Failed_to_create_transaction_'] = 'Failed to create transaction. '; -$_L['Failed_to_check_status_transaction_'] = 'Failed to check status transaction. '; -$_L['Disable_Voucher'] = 'Disable Voucher'; +$_L['Failed_to_create_transaction_'] = 'Failed to create transaction. '; +$_L['Failed_to_check_status_transaction_'] = 'Failed to check status transaction. '; +$_L['Disable_Voucher'] = 'Disable Voucher'; From 4e86f4cb023e9044d05430742438f189146eb9ed Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Fri, 28 Jul 2023 15:38:52 +0700 Subject: [PATCH 7/8] Fix cache for plugin manager --- CHANGELOG.md | 1 + system/controllers/pluginmanager.php | 2 +- version.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 015de9d0..43be8c84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Change registration design Form - Add Setting to disable Voucher - Fix Title for PPPOE plans +- Fix Plugin Cache ## 2023.6.20 - Hide time for Created date. diff --git a/system/controllers/pluginmanager.php b/system/controllers/pluginmanager.php index d160c01f..c3f11a45 100644 --- a/system/controllers/pluginmanager.php +++ b/system/controllers/pluginmanager.php @@ -20,7 +20,7 @@ if ($admin['user_type'] != 'Admin') { } $cache = File::pathFixer('system/cache/plugin_repository.json'); -if (file_exists($cache) && time() - filemtime($cache) > (24 * 60 * 60)) { +if (file_exists($cache) && time() - filemtime($cache) < (24 * 60 * 60)) { $json = json_decode(file_get_contents($cache), true); } else { $data = file_get_contents($plugin_repository); diff --git a/version.json b/version.json index 0503f161..1d34fd01 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "2023.6.20" + "version": "2023.7.28" } \ No newline at end of file From 18834a7276b72d4f75321a424249d734eaa0b6aa Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Fri, 28 Jul 2023 15:40:55 +0700 Subject: [PATCH 8/8] 2023.7.28 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43be8c84..4aac06d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ # CHANGELOG -## 2023 +## 2023.7.28 - Fix link buy Voucher - Add email field to registration form