Add Country Code Number for Phone

This commit is contained in:
Ibnu Maksum
2023-08-09 10:59:45 +07:00
parent 0d0f59a9a0
commit 3fbd5b2eb1
7 changed files with 162 additions and 102 deletions

View File

@ -394,6 +394,7 @@ switch ($action) {
case 'localisation-post':
$tzone = _post('tzone');
$date_format = _post('date_format');
$country_code_phone = _post('country_code_phone');
$lan = _post('lan');
run_hook('save_localisation'); #HOOK
if ($tzone == '' or $date_format == '' or $lan == '') {
@ -421,6 +422,18 @@ switch ($action) {
$d->save();
}
$d = ORM::for_table('tbl_appconfig')->where('setting', 'country_code_phone')->find_one();
if($d){
$d->value = $country_code_phone;
$d->save();
}else{
$d = ORM::for_table('tbl_appconfig')->create();
$d->setting = 'country_code_phone';
$d->value = $country_code_phone;
$d->save();
}
$currency_code = $_POST['currency_code'];
$d = ORM::for_table('tbl_appconfig')->where('setting', 'currency_code')->find_one();
$d->value = $currency_code;