diff --git a/system/autoload/Lang.php b/system/autoload/Lang.php index dfe8cebc..6736c700 100644 --- a/system/autoload/Lang.php +++ b/system/autoload/Lang.php @@ -86,4 +86,17 @@ class Lang { return ucwords(str_replace('_', ' ', $text)); } + + public static function randomUpLowCase($text){ + $jml = strlen($text); + $result = ''; + for($i = 0; $i < $jml;$i++){ + if(rand(0,99)%2){ + $result .= strtolower(substr($text,$i,1)); + }else{ + $result .= substr($text,$i,1); + } + } + return $result; + } } diff --git a/system/controllers/settings.php b/system/controllers/settings.php index 20dff3e3..b843661e 100644 --- a/system/controllers/settings.php +++ b/system/controllers/settings.php @@ -256,6 +256,7 @@ switch ($action) { $radius_enable = _post('radius_enable'); $radius_client = _post('radius_client'); $theme = _post('theme'); + $voucher_format = _post('voucher_format'); run_hook('save_settings'); #HOOK @@ -330,6 +331,16 @@ switch ($action) { $d->save(); } + $d = ORM::for_table('tbl_appconfig')->where('setting', 'voucher_format')->find_one(); + if ($d) { + $d->value = $voucher_format; + $d->save(); + } else { + $d = ORM::for_table('tbl_appconfig')->create(); + $d->setting = 'voucher_format'; + $d->value = $voucher_format; + $d->save(); + } $d = ORM::for_table('tbl_appconfig')->where('setting', 'disable_voucher')->find_one(); if ($d) { $d->value = $disable_voucher; diff --git a/system/lan/english/common.lan.php b/system/lan/english/common.lan.php index 8faca48c..31a7431b 100644 --- a/system/lan/english/common.lan.php +++ b/system/lan/english/common.lan.php @@ -406,3 +406,4 @@ $_L['Location'] = 'Location'; $_L['Radius_Plans'] = 'Radius Plans'; $_L['Change_title_in_user_Plan_order'] = 'Change title in user Plan order'; $_L['Logs'] = 'Logs'; +$_L['Voucher_Format'] = 'Voucher Format'; diff --git a/system/lan/indonesia/common.lan.php b/system/lan/indonesia/common.lan.php index 96bb1a29..32db9bad 100644 --- a/system/lan/indonesia/common.lan.php +++ b/system/lan/indonesia/common.lan.php @@ -398,3 +398,4 @@ $_L['Deactivate'] = 'Deactivate'; $_L['Sync'] = 'Sync'; $_L['Failed_to_create_PaymeTrust_transaction'] = 'Failed to create PaymeTrust transaction.'; $_L['Location'] = 'Location'; +$_L['Voucher_Format'] = 'Voucher Format'; \ No newline at end of file diff --git a/system/lan/spanish/common.lan.php b/system/lan/spanish/common.lan.php index d9992672..52b1a2e1 100644 --- a/system/lan/spanish/common.lan.php +++ b/system/lan/spanish/common.lan.php @@ -401,3 +401,4 @@ $_L['Deactivate'] = 'Deactivate'; $_L['Sync'] = 'Sync'; $_L['Failed_to_create_PaymeTrust_transaction'] = 'Failed to create PaymeTrust transaction.'; $_L['Location'] = 'Location'; +$_L['Voucher_Format'] = 'Voucher Format'; \ No newline at end of file diff --git a/system/lan/turkish/common.lan.php b/system/lan/turkish/common.lan.php index 6ac8f461..dc873e93 100755 --- a/system/lan/turkish/common.lan.php +++ b/system/lan/turkish/common.lan.php @@ -378,3 +378,4 @@ $_L['Deactivate'] = 'Deactivate'; $_L['Sync'] = 'Sync'; $_L['Failed_to_create_PaymeTrust_transaction'] = 'Failed to create PaymeTrust transaction.'; $_L['Location'] = 'Location'; +$_L['Voucher_Format'] = 'Voucher Format'; \ No newline at end of file diff --git a/ui/ui/app-settings.tpl b/ui/ui/app-settings.tpl index 02afe178..ff9ffe00 100644 --- a/ui/ui/app-settings.tpl +++ b/ui/ui/app-settings.tpl @@ -54,17 +54,37 @@
- -
- -
-

Theme info

+ +
+ +
+

Theme + info

+
+ +
+ +
+

edit at config.php

+
+ +
+
+ +
+ Voucher +
+
@@ -78,24 +98,44 @@

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

- +
- +
-

edit at config.php

+

UPPERCASE lowercase RaNdoM

+
+
+
+ +
+ FreeRadius +
+
- +
-

Radius Instructions

+

Radius Instructions

- +
@@ -152,8 +192,8 @@
-
@@ -316,9 +356,9 @@
- +
@@ -335,14 +375,14 @@ add dst-host={$_domain} add dst-host=*.{$_domain} -
+            
 # Expired Cronjob Every 5 Minutes
 */5 * * * * cd {$dir} && {$php} cron.php
 
 # Expired Cronjob Every 1 Hour
 0 * * * * cd {$dir} && {$php} cron.php
 
-
+            
 # Reminder Cronjob Every 7 AM
 0 7 * * * cd {$dir} && {$php} reminder.php