From a70b954981fea6ed9be28eccb66f68cbccb5564c Mon Sep 17 00:00:00 2001 From: Focuslinkstech <45756999+Focuslinkstech@users.noreply.github.com> Date: Wed, 21 Feb 2024 00:15:36 +0100 Subject: [PATCH 1/6] Update: New Features "Miscellaneous" [option] OTP is required when user want to change phone number. admin can choose option in [Miscellaneous] --- system/controllers/accounts.php | 104 ++++++++++++++++++++-- ui/ui/app-settings.tpl | 150 ++++++++++++++++++-------------- ui/ui/user-phone-update.tpl | 80 +++++++++++++++++ ui/ui/user-profile.tpl | 22 ++++- 4 files changed, 285 insertions(+), 71 deletions(-) create mode 100644 ui/ui/user-phone-update.tpl diff --git a/system/controllers/accounts.php b/system/controllers/accounts.php index b383fab2..423134b3 100644 --- a/system/controllers/accounts.php +++ b/system/controllers/accounts.php @@ -42,17 +42,17 @@ $c = ORM::for_table('tbl_user_recharges')->where('username', $user['username'])->find_one(); if ($c) { $p = ORM::for_table('tbl_plans')->where('id', $c['plan_id'])->find_one(); - if($p['is_radius']){ - if($c['type'] == 'Hotspot' || ($c['type'] == 'PPPOE' && empty($d['pppoe_password']))){ + if ($p['is_radius']) { + if ($c['type'] == 'Hotspot' || ($c['type'] == 'PPPOE' && empty($d['pppoe_password']))) { Radius::customerUpsert($d, $p); } - }else{ + } else { $mikrotik = Mikrotik::info($c['routers']); $client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']); if ($c['type'] == 'Hotspot') { - Mikrotik::setHotspotUser($client, $c['username'], $npass); - Mikrotik::removeHotspotActiveUser($client, $user['username']); - } else if(empty($d['pppoe_password'])){ + Mikrotik::setHotspotUser($client, $c['username'], $npass); + Mikrotik::removeHotspotActiveUser($client, $user['username']); + } else if (empty($d['pppoe_password'])) { // only change when pppoe_password empty Mikrotik::setPpoeUser($client, $c['username'], $npass); Mikrotik::removePpoeActive($client, $user['username']); @@ -122,6 +122,98 @@ } break; + case 'phone-update': + + $d = ORM::for_table('tbl_customers')->find_one($user['id']); + if ($d) { + //run_hook('customer_view_edit_profile'); #HOOK + $ui->assign('d', $d); + $ui->display('user-phone-update.tpl'); + } else { + r2(U . 'home', 'e', Lang::T('Account Not Found')); + } + break; + + case 'phone-update-otp': + $phone = _post('phone'); + $username = $user['username']; + $otpPath = 'system/cache/sms/'; + + if (empty($config['sms_url'])) { + r2(U . 'accounts/phone-update', 'e', Lang::T('SMS server not Available, Please try again later')); + } + + if (!empty($config['sms_url'])) { + if (!empty($phone)) { + $d = ORM::for_table('tbl_customers')->where('username', $username)->where('phonenumber', $phone)->find_one(); + if ($d) { + r2(U . 'accounts/phone-update', 'e', Lang::T('You cannot use your current phone number')); + } + if (!file_exists($otpPath)) { + mkdir($otpPath); + touch($otpPath . 'index.html'); + } + $otpFile = $otpPath . sha1($username . $db_password) . ".txt"; + $phoneFile = $otpPath . sha1($username . $db_password) . "_phone.txt"; + + // expired 10 minutes + if (file_exists($otpFile) && time() - filemtime($otpFile) < 1200) { + r2(U . 'accounts/phone-update', 'e', Lang::T('Please wait ' . (1200 - (time() - filemtime($otpFile))) . ' seconds before sending another SMS')); + } else { + $otp = rand(100000, 999999); + file_put_contents($otpFile, $otp); + file_put_contents($phoneFile, $phone); + Message::sendSMS($phone, $config['CompanyName'] . "\n Your Verification code is: $otp"); + r2(U . 'accounts/phone-update', 'e', Lang::T('Verification code has been sent to your phone')); + } + } + } + + break; + + case 'phone-update-post': + $phone = _post('phone'); + $otp_code = _post('otp'); + $username = $user['username']; + $otpPath = 'system/cache/sms/'; + + if (!empty($config['sms_url'])) { + $otpFile = $otpPath . sha1($username . $db_password) . ".txt"; + $phoneFile = $otpPath . sha1($username . $db_password) . "_phone.txt"; + // expired 10 minutes + if (file_exists($otpFile) && time() - filemtime($otpFile) > 1200) { + unlink($otpFile); + unlink($phoneFile); + r2(U . 'accounts/phone-update', 'e', 'Verification code expired'); + } else if (file_exists($otpFile)) { + $code = file_get_contents($otpFile); + if ($code != $otp_code) { + r2(U . 'accounts/phone-update', 'e', 'Wrong Verification code'); + exit(); + } elseif (file_exists($phoneFile)) { + $savedPhone = file_get_contents($phoneFile); + if ($savedPhone !== $phone) { + r2(U . 'accounts/phone-update', 'e', 'The phone number does not match the one that requested the OTP'); + exit(); + } else { + unlink($otpFile); + unlink($phoneFile); + } + } else { + r2(U . 'accounts/phone-update', 'e', 'No Verification code'); + } + } + } + + $d = ORM::for_table('tbl_customers')->where('username', $username)->find_one(); + if ($d) { + $d->phonenumber = Lang::phoneFormat($phone); + $d->save(); + } + r2(U . 'accounts/profile', 's', 'Phone number updated successfully'); + + break; + default: $ui->display('a404.tpl'); } diff --git a/ui/ui/app-settings.tpl b/ui/ui/app-settings.tpl index d618469d..7023f864 100644 --- a/ui/ui/app-settings.tpl +++ b/ui/ui/app-settings.tpl @@ -74,11 +74,11 @@
@@ -103,21 +103,21 @@
-
@@ -132,9 +132,9 @@
@@ -144,12 +144,12 @@
@@ -157,31 +157,33 @@

UPPERCASE lowercase RaNdoM

{if $_c['disable_voucher'] != 'yes'} -
- -
- -
-

- {Lang::T('Customer just Login with Phone number and Voucher Code, Voucher will be password')} -

-
-
- -
- -
-

- {Lang::T('After Customer activate voucher or login, customer will be redirected to this url')} -

+
+ +
+
+

+ {Lang::T('Customer just Login with Phone number and Voucher Code, Voucher will be + password')} +

+
+
+ +
+ +
+

+ {Lang::T('After Customer activate voucher or login, customer will be redirected to this + url')} +

+
{/if}
@@ -223,9 +225,9 @@
@@ -235,10 +237,10 @@

{Lang::T('Allow balance transfer between customers')}

@@ -304,8 +306,8 @@ onchange="document.getElementById('sms_url').value = this.value"> {foreach $r as $rs} - + {/foreach}
@@ -352,9 +354,9 @@
@@ -366,9 +368,9 @@ @@ -381,9 +383,9 @@ @@ -452,6 +454,28 @@ +
+
+ +
+ {Lang::T('Miscellaneous')} +
+
+
+ +
+ +
+

{Lang::T('OTP is required when user want to change phone + number')}

+
+
{*
+
@@ -511,14 +535,14 @@ add dst-host=*.{$_domain} function testWa() { var target = prompt("Phone number\nSave First before Test", ""); if (target != null) { - window.location.href = '{$_url}settings/app&testWa='+target; + window.location.href = '{$_url}settings/app&testWa=' + target; } } function testSms() { var target = prompt("Phone number\nSave First before Test", ""); if (target != null) { - window.location.href = '{$_url}settings/app&testSms='+target; + window.location.href = '{$_url}settings/app&testSms=' + target; } } diff --git a/ui/ui/user-phone-update.tpl b/ui/ui/user-phone-update.tpl new file mode 100644 index 00000000..866f2637 --- /dev/null +++ b/ui/ui/user-phone-update.tpl @@ -0,0 +1,80 @@ +{include file="sections/user-header.tpl"} + + + +
+
+

{Lang::T('Change Phone Number')}

+
+
+
+
+ +
+
+ + + +
+
+
+
+
+ +
+
+ + + + + + +
+
+
+
+
+ +
+ +
+ +
+
+ + + + +
+
+ + Or {Lang::T('Cancel')} +
+
+
+ + +
+
+
+{include file="sections/user-footer.tpl"} \ No newline at end of file diff --git a/ui/ui/user-profile.tpl b/ui/ui/user-profile.tpl index 3f5911a6..336856e8 100644 --- a/ui/ui/user-profile.tpl +++ b/ui/ui/user-profile.tpl @@ -34,6 +34,7 @@ + {if $_c['allow_phone_otp'] == 'no'}
@@ -45,6 +46,23 @@
+ {elseif $_c['allow_phone_otp'] == 'yes'} +
+ +
+
+ + + + + {Lang::T('Change')} + +
+
+
+ {/if}
@@ -54,8 +72,8 @@
- + Or {Lang::T('Cancel')}
From 3871b51f0fb77d4cb7fe9bab3e7cda7aa8103533 Mon Sep 17 00:00:00 2001 From: iBNu Maksum Date: Tue, 20 Feb 2024 18:32:23 +0700 Subject: [PATCH 2/6] change position table customer field --- install/phpnuxbill.sql | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/install/phpnuxbill.sql b/install/phpnuxbill.sql index 51ee96f8..9084c479 100644 --- a/install/phpnuxbill.sql +++ b/install/phpnuxbill.sql @@ -181,14 +181,6 @@ CREATE TABLE `tb_languages` ( `id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -DROP TABLE IF EXISTS `tbl_customers_fields`; -CREATE TABLE tbl_customers_fields ( - id INT PRIMARY KEY AUTO_INCREMENT, - customer_id INT NOT NULL, - field_name VARCHAR(255) NOT NULL, - field_value VARCHAR(255) NOT NULL, - FOREIGN KEY (customer_id) REFERENCES tbl_customers(id) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; ALTER TABLE `tbl_voucher` ADD `generated_by` INT NOT NULL DEFAULT '0' COMMENT 'id admin' AFTER `status`; ALTER TABLE `tbl_users` ADD `root` INT NOT NULL DEFAULT '0' COMMENT 'for sub account' AFTER `id`; @@ -321,3 +313,12 @@ VALUES ( '2022-09-06 16:09:50', '2014-06-23 01:43:07' ); + +DROP TABLE IF EXISTS `tbl_customers_fields`; +CREATE TABLE tbl_customers_fields ( + id INT PRIMARY KEY AUTO_INCREMENT, + customer_id INT NOT NULL, + field_name VARCHAR(255) NOT NULL, + field_value VARCHAR(255) NOT NULL, + FOREIGN KEY (customer_id) REFERENCES tbl_customers(id) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; From a44190c1c2caa4c6d46b5f266e06d55cbd041c4a Mon Sep 17 00:00:00 2001 From: iBNu Maksum Date: Tue, 20 Feb 2024 20:01:26 +0700 Subject: [PATCH 3/6] delete meta table --- install/phpnuxbill.sql | 6 ------ 1 file changed, 6 deletions(-) diff --git a/install/phpnuxbill.sql b/install/phpnuxbill.sql index 9084c479..a172dec5 100644 --- a/install/phpnuxbill.sql +++ b/install/phpnuxbill.sql @@ -200,9 +200,6 @@ ALTER TABLE `tbl_bandwidth` ALTER TABLE `tbl_customers` ADD PRIMARY KEY (`id`); -ALTER TABLE `tbl_customers_meta` - ADD PRIMARY KEY (`id`); - ALTER TABLE `tbl_logs` ADD PRIMARY KEY (`id`); @@ -243,9 +240,6 @@ ALTER TABLE `tbl_bandwidth` ALTER TABLE `tbl_customers` MODIFY `id` int(10) NOT NULL AUTO_INCREMENT; -ALTER TABLE `tbl_customers_meta` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; - ALTER TABLE `tbl_logs` MODIFY `id` int(10) NOT NULL AUTO_INCREMENT; From 702f2b443cc1279a764e2ce818564fadc76f732b Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Wed, 21 Feb 2024 11:54:22 +0700 Subject: [PATCH 4/6] remove multiple spaces --- system/autoload/Lang.php | 1 + system/lan/english.json | 13 +++++++++- ui/ui/user-profile.tpl | 52 ++++++++++++++++++++-------------------- 3 files changed, 39 insertions(+), 27 deletions(-) diff --git a/system/autoload/Lang.php b/system/autoload/Lang.php index f2becec3..385bb06a 100644 --- a/system/autoload/Lang.php +++ b/system/autoload/Lang.php @@ -12,6 +12,7 @@ public static function T($key) { global $_L, $lan_file, $config; $_L = $_SESSION['Lang']; + $key = preg_replace('/\s+/', ' ', $key); if (!empty($_L[$key])) { return $_L[$key]; } diff --git a/system/lan/english.json b/system/lan/english.json index e254e969..03a44a52 100644 --- a/system/lan/english.json +++ b/system/lan/english.json @@ -427,5 +427,16 @@ "Code": "Code", "Send_To_Customer": "Send To Customer", "Prev": "Prev", - "Voucher_Not_Found": "Voucher Not Found" + "Voucher_Not_Found": "Voucher Not Found", + "Miscellaneous": "Miscellaneous", + "OTP_Required": "OTP Required", + "Change": "Change", + "Change_Phone_Number": "Change Phone Number", + "Current_Number": "Current Number", + "New_Number": "New Number", + "Input_your_phone_number": "Input your phone number", + "OTP": "OTP", + "Enter_OTP_that_was_sent_to_your_phone": "Enter OTP that was sent to your phone", + "Update": "Update", + "OTP_is_required_when_user_want_to_change_phone_number": "OTP is required when user want to change phone number" } \ No newline at end of file diff --git a/ui/ui/user-profile.tpl b/ui/ui/user-profile.tpl index 336856e8..c6b5d17c 100644 --- a/ui/ui/user-profile.tpl +++ b/ui/ui/user-profile.tpl @@ -34,34 +34,34 @@
- {if $_c['allow_phone_otp'] == 'no'} -
- -
-
- + - + {if $_c['allow_phone_otp'] != 'yes'} +
+ +
+
+ + + +
-
- {elseif $_c['allow_phone_otp'] == 'yes'} -
- -
-
- + - - - {Lang::T('Change')} - + {else} +
+ +
+
+ + + + + {Lang::T('Change')} + +
-
{/if}
@@ -72,8 +72,8 @@
- + Or {Lang::T('Cancel')}
From 8072fe40ebbbf95ee334304cacd3c740445eb44b Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Wed, 21 Feb 2024 14:11:19 +0700 Subject: [PATCH 5/6] change burst form --- CHANGELOG.md | 7 +++++++ system/controllers/bandwidth.php | 29 ++++++++++++++++++++++++++--- system/lan/english.json | 5 ++++- ui/ui/bandwidth-add.tpl | 26 +++++++++++++++++++++++++- ui/ui/bandwidth-edit.tpl | 32 ++++++++++++++++++++++++++++++-- ui/ui/bandwidth.tpl | 8 ++++---- version.json | 2 +- 7 files changed, 97 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4902a7b8..bdb858f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ # CHANGELOG +## 2024.2.21 + +- Fix SQL Installer +- remove multiple space in language +- Change Phone Number require OTP by @Focuslinkstech +- Change burst Form + ## 2024.2.20 - Fix list admin diff --git a/system/controllers/bandwidth.php b/system/controllers/bandwidth.php index 15791b5f..45d68b21 100644 --- a/system/controllers/bandwidth.php +++ b/system/controllers/bandwidth.php @@ -44,6 +44,7 @@ run_hook('view_edit_bandwith'); #HOOK $d = ORM::for_table('tbl_bandwidth')->find_one($id); if($d){ + $ui->assign('burst',explode(" ", $d['burst'])); $ui->assign('d',$d); $ui->display('bandwidth-edit.tpl'); }else{ @@ -67,8 +68,19 @@ $rate_down_unit = _post('rate_down_unit'); $rate_up = _post('rate_up'); $rate_up_unit = _post('rate_up_unit'); - $burst = _post('burst'); run_hook('add_bandwidth'); #HOOK + $isBurst = true; + $burst = ""; + if(isset($_POST['burst'])){ + foreach($_POST['burst'] as $b){ + if(empty($b)){ + $isBurst = false; + } + } + if($isBurst){ + $burst = implode(' ', $_POST['burst']); + }; + } $msg = ''; if(Validator::Length($name,16,4) == false){ $msg .= 'Name should be between 5 to 15 characters'. '
'; @@ -104,8 +116,19 @@ $rate_down_unit = _post('rate_down_unit'); $rate_up = _post('rate_up'); $rate_up_unit = _post('rate_up_unit'); - $burst = _post('burst'); - run_hook('edit_bandwidth'); #HOOK + run_hook('edit_bandwidth'); #HOOK + $isBurst = true; + $burst = ""; + if(isset($_POST['burst'])){ + foreach($_POST['burst'] as $b){ + if(empty($b)){ + $isBurst = false; + } + } + if($isBurst){ + $burst = implode(' ', $_POST['burst']); + }; + } $msg = ''; if(Validator::Length($name,16,4) == false){ $msg .= 'Name should be between 5 to 15 characters'. '
'; diff --git a/system/lan/english.json b/system/lan/english.json index 03a44a52..37550777 100644 --- a/system/lan/english.json +++ b/system/lan/english.json @@ -438,5 +438,8 @@ "OTP": "OTP", "Enter_OTP_that_was_sent_to_your_phone": "Enter OTP that was sent to your phone", "Update": "Update", - "OTP_is_required_when_user_want_to_change_phone_number": "OTP is required when user want to change phone number" + "OTP_is_required_when_user_want_to_change_phone_number": "OTP is required when user want to change phone number", + "Rate": "Rate", + "Burst": "Burst", + "Editing_Bandwidth_will_not_automatically_update_the_plan__you_need_to_edit_the_plan_then_save_again": "Editing Bandwidth will not automatically update the plan, you need to edit the plan then save again" } \ No newline at end of file diff --git a/ui/ui/bandwidth-add.tpl b/ui/ui/bandwidth-add.tpl index f7c6ae96..c2d411d6 100644 --- a/ui/ui/bandwidth-add.tpl +++ b/ui/ui/bandwidth-add.tpl @@ -40,7 +40,31 @@
- + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
diff --git a/ui/ui/bandwidth-edit.tpl b/ui/ui/bandwidth-edit.tpl index c8f986c3..a6810dc9 100644 --- a/ui/ui/bandwidth-edit.tpl +++ b/ui/ui/bandwidth-edit.tpl @@ -43,11 +43,39 @@
-
- + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ {Lang::T('Editing Bandwidth will not automatically update the plan, you need to edit the plan then save again')}
diff --git a/ui/ui/bandwidth.tpl b/ui/ui/bandwidth.tpl index 86c1edd4..06abdfa1 100644 --- a/ui/ui/bandwidth.tpl +++ b/ui/ui/bandwidth.tpl @@ -28,8 +28,8 @@ {Lang::T('Bandwidth Name')} - {Lang::T('Rate Download')} - {Lang::T('Rate Upload')} + {Lang::T('Rate')} + {Lang::T('Burst')} {Lang::T('Manage')} @@ -37,8 +37,8 @@ {foreach $d as $ds} {$ds['name_bw']} - {$ds['rate_down']} {$ds['rate_down_unit']} - {$ds['rate_up']} {$ds['rate_up_unit']} + {$ds['rate_down']} {$ds['rate_down_unit']} / {$ds['rate_up']} {$ds['rate_up_unit']} + {$ds['burst']} {Lang::T('Edit')} diff --git a/version.json b/version.json index 4a247ff5..28271150 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "2024.2.20" + "version": "2024.2.21" } \ No newline at end of file From 5309cb26db8e7e6269ec3581ef5f682e080a4468 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Wed, 21 Feb 2024 14:37:44 +0700 Subject: [PATCH 6/6] Delete Table Responsive, first Column Freeze --- CHANGELOG.md | 1 + ui/ui/bandwidth.tpl | 2 +- ui/ui/customers.tpl | 2 +- ui/ui/dashboard.tpl | 7 ++----- ui/ui/hotspot.tpl | 4 +++- ui/ui/pool.tpl | 5 ++--- ui/ui/pppoe.tpl | 2 ++ ui/ui/radius-nas.tpl | 4 ++-- ui/ui/routers.tpl | 4 ++-- ui/ui/sections/header.tpl | 18 +++++------------- ui/ui/user-activation-list.tpl | 2 +- ui/ui/user-orderHistory.tpl | 2 +- ui/ui/users.tpl | 6 +++--- ui/ui/voucher.tpl | 2 +- 14 files changed, 27 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bdb858f6..4a0fa479 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - remove multiple space in language - Change Phone Number require OTP by @Focuslinkstech - Change burst Form +- Delete Table Responsive, first Column Freeze ## 2024.2.20 diff --git a/ui/ui/bandwidth.tpl b/ui/ui/bandwidth.tpl index 06abdfa1..d8e45e1f 100644 --- a/ui/ui/bandwidth.tpl +++ b/ui/ui/bandwidth.tpl @@ -24,7 +24,7 @@
 
- +
diff --git a/ui/ui/customers.tpl b/ui/ui/customers.tpl index 32812082..da48cbdb 100644 --- a/ui/ui/customers.tpl +++ b/ui/ui/customers.tpl @@ -32,7 +32,7 @@ class="ion ion-android-add"> {Lang::T('Add New Contact')}  -
+
{Lang::T('Bandwidth Name')}
diff --git a/ui/ui/dashboard.tpl b/ui/ui/dashboard.tpl index b1ba26c9..d58bfd6c 100644 --- a/ui/ui/dashboard.tpl +++ b/ui/ui/dashboard.tpl @@ -108,7 +108,7 @@
Vouchers Stock
-
+
@@ -139,20 +139,17 @@
{Lang::T('User Expired, Today')}
-
{Lang::T('Plan Name')}
+
- - {$no = 1} {foreach $expire as $expired} - diff --git a/ui/ui/hotspot.tpl b/ui/ui/hotspot.tpl index 51fae5b1..1026fe3d 100644 --- a/ui/ui/hotspot.tpl +++ b/ui/ui/hotspot.tpl @@ -45,13 +45,14 @@ + {foreach $d as $ds} - + @@ -75,6 +76,7 @@ onclick="return confirm('{Lang::T('Delete')}?')" class="btn btn-danger btn-xs"> + {/foreach} diff --git a/ui/ui/pool.tpl b/ui/ui/pool.tpl index da90b528..598b56be 100644 --- a/ui/ui/pool.tpl +++ b/ui/ui/pool.tpl @@ -36,18 +36,16 @@
Id {Lang::T('Username')} {Lang::T('Created On')} {Lang::T('Expires On')}
{$no++} {$expired['username']} {Lang::dateAndTimeFormat($expired['recharged_on'],$expired['recharged_time'])} {Lang::T('Routers')} {Lang::T('Expired IP Pool')} {Lang::T('Manage')}ID
{$ds['name_plan']}{$ds['name_plan']} {$ds['typebp']} {$ds['name_bw']} {Lang::moneyFormat($ds['price'])} {$ds['id']}
- + - {$no = 1} {foreach $d as $ds} - @@ -57,6 +55,7 @@ onclick="return confirm('{Lang::T('Delete')}?')" class="btn btn-danger btn-xs"> + {/foreach} diff --git a/ui/ui/pppoe.tpl b/ui/ui/pppoe.tpl index 12399793..fa943491 100644 --- a/ui/ui/pppoe.tpl +++ b/ui/ui/pppoe.tpl @@ -43,6 +43,7 @@ + @@ -70,6 +71,7 @@ onclick="return confirm('{Lang::T('Delete')}?')" id="{$ds['id']}" class="btn btn-danger btn-xs"> + {/foreach} diff --git a/ui/ui/radius-nas.tpl b/ui/ui/radius-nas.tpl index d7c2b4b5..8e103246 100644 --- a/ui/ui/radius-nas.tpl +++ b/ui/ui/radius-nas.tpl @@ -31,7 +31,6 @@
# {Lang::T('Name Pool')} {Lang::T('Range IP')} {Lang::T('Routers')} {Lang::T('Manage')}ID
{$no++} {$ds['pool_name']} {$ds['range_ip']} {$ds['routers']} {$ds['id']}
{Lang::T('Expired IP Pool')} {Lang::T('Routers')} {Lang::T('Manage')}ID
{$ds['id']}
- @@ -40,12 +39,12 @@ + {foreach $nas as $ds} - @@ -59,6 +58,7 @@ onclick="return confirm('{Lang::T('Delete')}?')" class="btn btn-danger btn-xs"> + {/foreach} diff --git a/ui/ui/routers.tpl b/ui/ui/routers.tpl index f34d820c..1c605554 100644 --- a/ui/ui/routers.tpl +++ b/ui/ui/routers.tpl @@ -31,19 +31,18 @@
ID Name IP TypeCommunity Routers {Lang::T('Manage')}ID
{$ds['id']} {$ds['shortname']} {$ds['nasname']} {$ds['type']} {$ds['id']}
- + {foreach $d as $ds} - @@ -56,6 +55,7 @@ onclick="return confirm('{Lang::T('Delete')}?')" class="btn btn-danger btn-xs"> + {/foreach} diff --git a/ui/ui/sections/header.tpl b/ui/ui/sections/header.tpl index 8ae2e739..f4400c86 100644 --- a/ui/ui/sections/header.tpl +++ b/ui/ui/sections/header.tpl @@ -41,19 +41,11 @@ } } - @media only screen and (max-width: 40em) { - thead th:not(:first-child) { - display: none; - } - - td, - th { - display: block; - } - - td[data-th]:before { - content: attr(data-th); - } + th:first-child, + td:first-child { + position: sticky; + left: 0px; + background-color: #f9f9f9; } diff --git a/ui/ui/user-activation-list.tpl b/ui/ui/user-activation-list.tpl index 035d9afe..448d2361 100644 --- a/ui/ui/user-activation-list.tpl +++ b/ui/ui/user-activation-list.tpl @@ -7,7 +7,7 @@
{Lang::T('List Activated Voucher')}
-
ID {Lang::T('Router Name')} {Lang::T('IP Address')} {Lang::T('Username')} {Lang::T('Description')} {Lang::T('Status')} {Lang::T('Manage')}ID
{$ds['id']} {$ds['name']} {$ds['ip_address']} {$ds['username']} {$ds['id']}
+
diff --git a/ui/ui/user-orderHistory.tpl b/ui/ui/user-orderHistory.tpl index c143cdae..78c87593 100644 --- a/ui/ui/user-orderHistory.tpl +++ b/ui/ui/user-orderHistory.tpl @@ -7,7 +7,7 @@
{Lang::T('Order History')}
-
{Lang::T('Username')}
+
diff --git a/ui/ui/users.tpl b/ui/ui/users.tpl index e5e6d6fd..1be58663 100644 --- a/ui/ui/users.tpl +++ b/ui/ui/users.tpl @@ -27,10 +27,9 @@  
-
{Lang::T('Plan Name')}
+
- @@ -40,12 +39,12 @@ + {foreach $d as $ds} - @@ -66,6 +65,7 @@ class="btn btn-danger btn-xs" onclick="return confirm('{Lang::T('Delete')}?')"> {/if} + {/foreach} diff --git a/ui/ui/voucher.tpl b/ui/ui/voucher.tpl index 7bbf2260..f24efaff 100644 --- a/ui/ui/voucher.tpl +++ b/ui/ui/voucher.tpl @@ -43,7 +43,7 @@  
-
ID {Lang::T('Username')} {Lang::T('Full Name')} {Lang::T('Phone')}{Lang::T('Agent')} {Lang::T('Last Login')} {Lang::T('Manage')}ID
{$ds['id']} {$ds['username']} {$ds['fullname']} {$ds['phone']}{$ds['id']}
+
ID