diff --git a/system/controllers/settings.php b/system/controllers/settings.php index 13940b82..8a5e818e 100644 --- a/system/controllers/settings.php +++ b/system/controllers/settings.php @@ -210,6 +210,9 @@ switch ($action) { $telegram_target_id = _post('telegram_target_id'); $sms_url = _post('sms_url'); $wa_url = _post('wa_url'); + $user_notification_expired = _post('user_notification_expired'); + $user_notification_expired_text = _post('user_notification_expired_text'); + $user_notification_payment = _post('user_notification_payment'); $address = _post('address'); $tawkto = _post('tawkto'); $radius_mode = _post('radius_mode')*1; @@ -286,6 +289,38 @@ switch ($action) { $d->save(); } + $d = ORM::for_table('tbl_appconfig')->where('setting', 'user_notification_expired')->find_one(); + if($d){ + $d->value = $user_notification_expired; + $d->save(); + }else{ + $d = ORM::for_table('tbl_appconfig')->create(); + $d->setting = 'user_notification_expired'; + $d->value = $user_notification_expired; + $d->save(); + } + + $d = ORM::for_table('tbl_appconfig')->where('setting', 'user_notification_expired_text')->find_one(); + if($d){ + $d->value = $user_notification_expired_text; + $d->save(); + }else{ + $d = ORM::for_table('tbl_appconfig')->create(); + $d->setting = 'user_notification_expired_text'; + $d->value = $user_notification_expired_text; + $d->save(); + } + + $d = ORM::for_table('tbl_appconfig')->where('setting', 'user_notification_payment')->find_one(); + if($d){ + $d->value = $user_notification_payment; + $d->save(); + }else{ + $d = ORM::for_table('tbl_appconfig')->create(); + $d->setting = 'user_notification_payment'; + $d->value = $user_notification_payment; + $d->save(); + } $d = ORM::for_table('tbl_appconfig')->where('setting', 'tawkto')->find_one(); if($d){ diff --git a/ui/ui/app-settings.tpl b/ui/ui/app-settings.tpl index c7539244..19aeed4f 100644 --- a/ui/ui/app-settings.tpl +++ b/ui/ui/app-settings.tpl @@ -26,7 +26,7 @@
{Lang::T('User will get notification when package expired')}
+{Lang::T('[[name]] will be replaced with Customer Name. [[package]] will be replaced with Package name.')}
+{Lang::T('User will get notification when buy package or package refilled')}
+