forked from kevinowino869/mitrobill
Voucher Format
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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';
|
||||
|
@ -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';
|
@ -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';
|
@ -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';
|
Reference in New Issue
Block a user