From 690584ee90d7965d5e6c33af27f22849aa18569c Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Fri, 29 Sep 2023 13:58:22 +0700 Subject: [PATCH] radius_enable settings --- system/controllers/settings.php | 10 +++---- ui/ui/app-settings.tpl | 36 +++++++++++------------ ui/ui/dashboard.tpl | 52 +++++++++++++++++---------------- ui/ui/sections/header.tpl | 12 +++++--- 4 files changed, 57 insertions(+), 53 deletions(-) diff --git a/system/controllers/settings.php b/system/controllers/settings.php index e6b8713d..196a5c2d 100644 --- a/system/controllers/settings.php +++ b/system/controllers/settings.php @@ -233,7 +233,7 @@ switch ($action) { $tawkto = _post('tawkto'); $http_proxy = _post('http_proxy'); $http_proxyauth = _post('http_proxyauth'); - $radius_mode = _post('radius_mode') * 1; + $radius_enable = _post('radius_enable'); run_hook('save_settings'); #HOOK @@ -424,14 +424,14 @@ switch ($action) { $d->save(); } - $d = ORM::for_table('tbl_appconfig')->where('setting', 'radius_mode')->find_one(); + $d = ORM::for_table('tbl_appconfig')->where('setting', 'radius_enable')->find_one(); if ($d) { - $d->value = $radius_mode; + $d->value = $radius_enable; $d->save(); } else { $d = ORM::for_table('tbl_appconfig')->create(); - $d->setting = 'radius_mode'; - $d->value = $radius_mode; + $d->setting = 'radius_enable'; + $d->value = $radius_enable; $d->save(); } diff --git a/ui/ui/app-settings.tpl b/ui/ui/app-settings.tpl index 1b747a23..4c942159 100644 --- a/ui/ui/app-settings.tpl +++ b/ui/ui/app-settings.tpl @@ -53,25 +53,6 @@ - -
- -
- -
-

edit at config.php

-
@@ -84,6 +65,23 @@

{Lang::T('Voucher activation menu will be hidden')}

+
+ +
+ +
+

edit at config.php

+
+
+ +
+ +
+

Radius Not Yet Ready

+
diff --git a/ui/ui/dashboard.tpl b/ui/ui/dashboard.tpl index e89078a1..ddc3ff74 100644 --- a/ui/ui/dashboard.tpl +++ b/ui/ui/dashboard.tpl @@ -62,34 +62,36 @@
-
-
Vouchers Stock
-
- - - - - - - - - - {foreach $plans as $stok} + {if $_c['disable_voucher'] != 'yes'} +
+
Vouchers Stock
+
+
{$_L['Plan_Name']}unusedused
+ - - - + + + - - {/foreach} - - - - - -
{$stok['name_plan']}{$stok['unused']}{$stok['used']}{$_L['Plan_Name']}unusedused
Total{$stocks['unused']}{$stocks['used']}
+ + + {foreach $plans as $stok} + + {$stok['name_plan']} + {$stok['unused']} + {$stok['used']} + + + {/foreach} + + Total + {$stocks['unused']} + {$stocks['used']} + + +
-
+ {/if}
{$_L['User_Expired_Today']}
diff --git a/ui/ui/sections/header.tpl b/ui/ui/sections/header.tpl index 30ed74c4..6c15ee8e 100644 --- a/ui/ui/sections/header.tpl +++ b/ui/ui/sections/header.tpl @@ -163,8 +163,10 @@ href="{$_url}services/hotspot">{$_L['Hotspot_Plans']}
  • {$_L['PPPOE_Plans']}
  • -
  • {Lang::T('Radius Plans')}
  • + {if $_c['radius_enable'] == 'yes'} +
  • {Lang::T('Radius Plans')}
  • + {/if}
  • {$_L['Bandwidth_Plans']}
  • {$_L['Routers']}
  • -
  • Radius NAS
  • + {if $_c['radius_enable'] == 'yes'} +
  • Radius NAS
  • + {/if}
  • {$_L['Pool']}
  • {$_MENU_NETWORK}