mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 19:04:52 +00:00
Update Admin posts to use new functions flash_alert and getFieldById which greatly cleans up and reduces the code also removed logging comments as implied by the function logAction
This commit is contained in:
@@ -17,14 +17,12 @@ if (isset($_POST['edit_online_payment_settings'])) {
|
||||
|
||||
mysqli_query($mysqli,"UPDATE settings SET config_stripe_enable = $config_stripe_enable, config_stripe_publishable = '$config_stripe_publishable', config_stripe_secret = '$config_stripe_secret', config_stripe_account = $config_stripe_account, config_stripe_expense_vendor = $config_stripe_expense_vendor, config_stripe_expense_category = $config_stripe_expense_category, config_stripe_percentage_fee = $config_stripe_percentage_fee, config_stripe_flat_fee = $config_stripe_flat_fee WHERE company_id = 1");
|
||||
|
||||
// Logging
|
||||
logAction("Settings", "Edit", "$session_name edited online payment settings");
|
||||
|
||||
if ($config_stripe_enable && $config_stripe_account == 0) {
|
||||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Stripe payment account must be specified!";
|
||||
flash_alert("Stripe payment account must be specified!", 'error');
|
||||
} else {
|
||||
$_SESSION['alert_message'] = "Online Payment Settings updated";
|
||||
flash_alert("Online Payment Settings updated");
|
||||
}
|
||||
|
||||
redirect();
|
||||
|
||||
Reference in New Issue
Block a user