mirror of
https://github.com/itflow-org/itflow
synced 2026-07-25 09:47:15 +00:00
Rename Functions: flash_alert, sanitizeFilename and display_folder_options using camelCase instead to match other custom php functions
This commit is contained in:
@@ -7,7 +7,7 @@ require_once "../includes/check_login.php";
|
||||
$settings_mail_path = '/admin/settings_mail.php';
|
||||
|
||||
if (!isset($session_is_admin) || !$session_is_admin) {
|
||||
flash_alert("Admin access required.", 'error');
|
||||
flashAlert("Admin access required.", 'error');
|
||||
redirect($settings_mail_path);
|
||||
}
|
||||
|
||||
@@ -27,17 +27,17 @@ if (!empty($error)) {
|
||||
$msg .= " ($error_description)";
|
||||
}
|
||||
|
||||
flash_alert($msg, 'error');
|
||||
flashAlert($msg, 'error');
|
||||
redirect($settings_mail_path);
|
||||
}
|
||||
|
||||
if (empty($state) || empty($code) || empty($session_state) || !hash_equals($session_state, $state) || time() > $session_state_expires) {
|
||||
flash_alert("Microsoft OAuth callback validation failed. Please try connecting again.", 'error');
|
||||
flashAlert("Microsoft OAuth callback validation failed. Please try connecting again.", 'error');
|
||||
redirect($settings_mail_path);
|
||||
}
|
||||
|
||||
if (empty($config_mail_oauth_client_id) || empty($config_mail_oauth_client_secret) || empty($config_mail_oauth_tenant_id)) {
|
||||
flash_alert("Microsoft OAuth settings are incomplete. Please fill Client ID, Client Secret, and Tenant ID.", 'error');
|
||||
flashAlert("Microsoft OAuth settings are incomplete. Please fill Client ID, Client Secret, and Tenant ID.", 'error');
|
||||
redirect($settings_mail_path);
|
||||
}
|
||||
|
||||
@@ -71,13 +71,13 @@ curl_close($ch);
|
||||
|
||||
if ($raw_body === false || $http_code < 200 || $http_code >= 300) {
|
||||
$reason = !empty($curl_err) ? $curl_err : "HTTP $http_code";
|
||||
flash_alert("Microsoft OAuth token exchange failed: $reason", 'error');
|
||||
flashAlert("Microsoft OAuth token exchange failed: $reason", 'error');
|
||||
redirect($settings_mail_path);
|
||||
}
|
||||
|
||||
$json = json_decode($raw_body, true);
|
||||
if (!is_array($json) || empty($json['refresh_token']) || empty($json['access_token'])) {
|
||||
flash_alert("Microsoft OAuth token exchange failed: refresh token or access token missing.", 'error');
|
||||
flashAlert("Microsoft OAuth token exchange failed: refresh token or access token missing.", 'error');
|
||||
redirect($settings_mail_path);
|
||||
}
|
||||
|
||||
@@ -99,5 +99,5 @@ mysqli_query($mysqli, "UPDATE settings SET
|
||||
");
|
||||
|
||||
logAudit("Settings", "Edit", "$session_name completed Microsoft OAuth connect flow for mail settings");
|
||||
flash_alert("Microsoft OAuth connected successfully. Token expires at $expires_at.");
|
||||
flashAlert("Microsoft OAuth connected successfully. Token expires at $expires_at.");
|
||||
redirect($settings_mail_path);
|
||||
|
||||
@@ -21,7 +21,7 @@ if (isset($_POST['add_ai_model'])) {
|
||||
|
||||
logAudit("AI Model", "Create", "$session_name created AI Model $model");
|
||||
|
||||
flash_alert("AI Model <strong>$model</strong> created");
|
||||
flashAlert("AI Model <strong>$model</strong> created");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -40,7 +40,7 @@ if (isset($_POST['edit_ai_model'])) {
|
||||
|
||||
logAudit("AI Model", "Edit", "$session_name edited AI Model $model");
|
||||
|
||||
flash_alert("AI Model <strong>$model</strong> edited");
|
||||
flashAlert("AI Model <strong>$model</strong> edited");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -58,7 +58,7 @@ if (isset($_GET['delete_ai_model'])) {
|
||||
|
||||
logAudit("AI Model", "Delete", "$session_name deleted AI Model $model_name");
|
||||
|
||||
flash_alert("AI Model <strong>$model_name</strong> deleted", 'error');
|
||||
flashAlert("AI Model <strong>$model_name</strong> deleted", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ if (isset($_POST['add_ai_provider'])) {
|
||||
|
||||
logAudit("AI Provider", "Create", "$session_name created AI Provider $provider");
|
||||
|
||||
flash_alert("AI Model <strong>$provider</strong> created");
|
||||
flashAlert("AI Model <strong>$provider</strong> created");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -40,7 +40,7 @@ if (isset($_POST['edit_ai_provider'])) {
|
||||
|
||||
logAudit("AI Provider", "Edit", "$session_name edited AI Provider $provider");
|
||||
|
||||
flash_alert("AI Model <strong>$provider</strong> edited");
|
||||
flashAlert("AI Model <strong>$provider</strong> edited");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -58,7 +58,7 @@ if (isset($_GET['delete_ai_provider'])) {
|
||||
|
||||
logAudit("AI Provider", "Delete", "$session_name deleted AI Provider $provider_name", 'error');
|
||||
|
||||
flash_alert("AI Provider <strong>$provider_name</strong> deleted", 'error');
|
||||
flashAlert("AI Provider <strong>$provider_name</strong> deleted", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ if (isset($_POST['add_api_key'])) {
|
||||
|
||||
logAudit("API Key", "Create", "$session_name created API key $name set to expire on $expire", $client_id, $api_key_id);
|
||||
|
||||
flash_alert("API Key <strong>$name</strong> created");
|
||||
flashAlert("API Key <strong>$name</strong> created");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -46,7 +46,7 @@ if (isset($_GET['revoke_api_key'])) {
|
||||
|
||||
logAudit("API Key", "Revoke", "$session_name revoked API key $name", $client_id);
|
||||
|
||||
flash_alert("API Key <strong>$name</strong> revoked", 'error');
|
||||
flashAlert("API Key <strong>$name</strong> revoked", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -67,7 +67,7 @@ if (isset($_GET['delete_api_key'])) {
|
||||
|
||||
logAudit("API Key", "Delete", "$session_name deleted API key $name", $client_id);
|
||||
|
||||
flash_alert("API Key <strong>$name</strong> deleted", 'error');
|
||||
flashAlert("API Key <strong>$name</strong> deleted", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -99,7 +99,7 @@ if (isset($_POST['bulk_delete_api_keys'])) {
|
||||
|
||||
logAudit("API Key", "Bulk Delete", "$session_name deleted $count API key(s)");
|
||||
|
||||
flash_alert("Deleted <strong>$count</strong> API keys(s)", 'error');
|
||||
flashAlert("Deleted <strong>$count</strong> API keys(s)", 'error');
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -296,7 +296,7 @@ if (isset($_GET['download_backup'])) {
|
||||
|
||||
// Log + UX
|
||||
logAudit("System", "Backup Download", ($session_name ?? 'Unknown User') . " downloaded full backup.");
|
||||
flash_alert("Full backup downloaded.");
|
||||
flashAlert("Full backup downloaded.");
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -324,7 +324,7 @@ if (isset($_POST['backup_master_key'])) {
|
||||
} else {
|
||||
logAudit("Master Key", "Download", "$session_name attempted to retrieve the master encryption key but failed");
|
||||
|
||||
flash_alert("Incorrect password.", 'error');
|
||||
flashAlert("Incorrect password.", 'error');
|
||||
|
||||
redirect();
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ if (isset($_POST['add_category'])) {
|
||||
|
||||
logAudit("Category", "Create", "$session_name created category $type $name", 0, $category_id);
|
||||
|
||||
flash_alert("Category $type <strong>$name</strong> created");
|
||||
flashAlert("Category $type <strong>$name</strong> created");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -36,7 +36,7 @@ if (isset($_POST['edit_category'])) {
|
||||
|
||||
logAudit("Category", "Edit", "$session_name edited category $type $name", 0, $category_id);
|
||||
|
||||
flash_alert("Category $type <strong>$name</strong> edited");
|
||||
flashAlert("Category $type <strong>$name</strong> edited");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -58,7 +58,7 @@ if (isset($_GET['archive_category'])) {
|
||||
|
||||
logAudit("Category", "Archive", "$session_name archived category $category_type $category_name", 0, $category_id);
|
||||
|
||||
flash_alert("Category $category_type <strong>$category_name</strong> archived", 'error');
|
||||
flashAlert("Category $category_type <strong>$category_name</strong> archived", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -80,7 +80,7 @@ if (isset($_GET['restore_category'])) {
|
||||
|
||||
logAudit("Category", "Restore", "$session_name retored category $category_type $category_name", 0, $category_id);
|
||||
|
||||
flash_alert("Category $category_type <strong>$category_name</strong> restored");
|
||||
flashAlert("Category $category_type <strong>$category_name</strong> restored");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -102,7 +102,7 @@ if (isset($_GET['delete_category'])) {
|
||||
|
||||
logAudit("Category", "Delete", "$session_name deleted category $category_type $category_name");
|
||||
|
||||
flash_alert("Category $category_type <strong>$category_name</strong> deleted", 'error');
|
||||
flashAlert("Category $category_type <strong>$category_name</strong> deleted", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ if (isset($_POST['add_contract_template'])) {
|
||||
logAudit("Contract Template", "Create", "$session_name created contract template $name", 0, $contract_template_id);
|
||||
|
||||
// Flash message
|
||||
flash_alert("Contract Template <strong>$name</strong> created");
|
||||
flashAlert("Contract Template <strong>$name</strong> created");
|
||||
|
||||
// Redirect back
|
||||
redirect();
|
||||
@@ -102,7 +102,7 @@ if (isset($_POST['edit_contract_template'])) {
|
||||
logAudit("Contract Template", "Update", "$session_name updated contract template $name", 0, $contract_template_id);
|
||||
|
||||
// Flash + redirect
|
||||
flash_alert("Contract Template <strong>$name</strong> updated");
|
||||
flashAlert("Contract Template <strong>$name</strong> updated");
|
||||
redirect();
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ if (isset($_GET['archive_contract_template'])) {
|
||||
");
|
||||
|
||||
logAudit("Contract Template", "Archive", "$session_name archived contract template $name", 0, $contract_template_id);
|
||||
flash_alert("Contract Template <strong>$name</strong> archived", "danger");
|
||||
flashAlert("Contract Template <strong>$name</strong> archived", "danger");
|
||||
redirect();
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ if (isset($_GET['restore_contract_template'])) {
|
||||
");
|
||||
|
||||
logAudit("Contract Template", "Restore", "$session_name restored contract template $name", 0, $contract_template_id);
|
||||
flash_alert("Contract Template <strong>$name</strong> restored");
|
||||
flashAlert("Contract Template <strong>$name</strong> restored");
|
||||
redirect();
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ if (isset($_GET['delete_contract_template'])) {
|
||||
");
|
||||
|
||||
logAudit("Contract Template", "Delete", "$session_name deleted contract template $name", 0, $contract_template_id);
|
||||
flash_alert("Contract Template <strong>$name</strong> deleted", "danger");
|
||||
flashAlert("Contract Template <strong>$name</strong> deleted", "danger");
|
||||
redirect();
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ if(isset($_POST['create_custom_field'])){
|
||||
|
||||
logAudit("Custom Field", "Create", "$session_name created custom field $label", 0, $custom_field_id);
|
||||
|
||||
flash_alert("Custom field <strong>$label</strong> created");
|
||||
flashAlert("Custom field <strong>$label</strong> created");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -34,7 +34,7 @@ if(isset($_POST['edit_custom_field'])){
|
||||
|
||||
logAudit("Custom Field", "Edit", "$session_name edited custom field $label", 0, $custom_field_id);
|
||||
|
||||
flash_alert("Custom field <strong>$label</strong> edited");
|
||||
flashAlert("Custom field <strong>$label</strong> edited");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -50,7 +50,7 @@ if(isset($_GET['delete_custom_field'])){
|
||||
|
||||
logAudit("Custom Field", "Delete", "$session_name deleted custom field $label");
|
||||
|
||||
flash_alert("Custom field <strong>$label</strong> deleted", 'error');
|
||||
flashAlert("Custom field <strong>$label</strong> deleted", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ if (isset($_POST['add_custom_link'])) {
|
||||
|
||||
logAudit("Custom Link", "Create", "$session_name created custom link $name -> $uri", 0, $custom_link_id);
|
||||
|
||||
flash_alert("Custom link <strong>$name</strong> created");
|
||||
flashAlert("Custom link <strong>$name</strong> created");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -45,7 +45,7 @@ if (isset($_POST['edit_custom_link'])) {
|
||||
|
||||
logAudit("Custom Link", "Edit", "$session_name edited custom link $name -> $uri", 0, $custom_link_id);
|
||||
|
||||
flash_alert("Custom Link <strong>$name</strong> edited");
|
||||
flashAlert("Custom Link <strong>$name</strong> edited");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -67,7 +67,7 @@ if (isset($_GET['delete_custom_link'])) {
|
||||
|
||||
logAudit("Custom Link", "Delete", "$session_name deleted custom link $custom_link_name -> $custom_link_uri");
|
||||
|
||||
flash_alert("Custom Link <strong>$name</strong> deleted", 'error');
|
||||
flashAlert("Custom Link <strong>$name</strong> deleted", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ if (isset($_POST['add_document_template'])) {
|
||||
|
||||
logAudit("Document Template", "Create", "$session_name created document template $name", 0, $document_template_id);
|
||||
|
||||
flash_alert("Document template <strong>$name</strong> created");
|
||||
flashAlert("Document template <strong>$name</strong> created");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -65,7 +65,7 @@ if (isset($_POST['edit_document_template'])) {
|
||||
|
||||
logAudit("Document Template", "Edit", "$session_name edited document template $name", 0, $document_template_id);
|
||||
|
||||
flash_alert("Document Template <strong>$name</strong> edited");
|
||||
flashAlert("Document Template <strong>$name</strong> edited");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -86,7 +86,7 @@ if (isset($_GET['delete_document_template'])) {
|
||||
|
||||
logAudit("Document Template", "Delete", "$session_name deleted document template $document_template_name");
|
||||
|
||||
flash_alert("Document Template <strong>$document_template_name</strong> deleted", 'error');
|
||||
flashAlert("Document Template <strong>$document_template_name</strong> deleted", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ if (isset($_POST['edit_identity_provider'])) {
|
||||
|
||||
logAudit("Settings", "Edit", "$session_name edited identity provider settings");
|
||||
|
||||
flash_alert("Identity Provider Settings updated");
|
||||
flashAlert("Identity Provider Settings updated");
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ if (isset($_GET['send_failed_mail'])) {
|
||||
|
||||
logAudit("Email", "Send", "$session_name attempted to force send email id: $email_id in the mail queue", 0, $email_id);
|
||||
|
||||
flash_alert("Email Force Sent, give it a minute to resend");
|
||||
flashAlert("Email Force Sent, give it a minute to resend");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -28,7 +28,7 @@ if (isset($_GET['cancel_mail'])) {
|
||||
|
||||
logAudit("Email", "Send", "$session_name canceled send email id: $email_id in the mail queue", 0, $email_id);
|
||||
|
||||
flash_alert("Email cancelled and marked as failed.", 'error');
|
||||
flashAlert("Email cancelled and marked as failed.", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -54,7 +54,7 @@ if (isset($_POST['bulk_cancel_emails'])) {
|
||||
|
||||
logAudit("Email", "Bulk Cancel", "$session_name cancelled $count email(s) in the mail queue");
|
||||
|
||||
flash_alert("Cancelled <strong>$count</strong> email(s)", 'error');
|
||||
flashAlert("Cancelled <strong>$count</strong> email(s)", 'error');
|
||||
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ if (isset($_POST['bulk_delete_emails'])) {
|
||||
|
||||
logAudit("Email", "Bulk Delete", "$session_name deleted $count email(s) from the mail queue");
|
||||
|
||||
flash_alert("Deleted <strong>$count</strong> email(s)", 'error');
|
||||
flashAlert("Deleted <strong>$count</strong> email(s)", 'error');
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ if (isset($_POST['add_payment_method'])) {
|
||||
|
||||
logAudit("Payment Method", "Create", "$session_name created Payment Method $name");
|
||||
|
||||
flash_alert("Payment Method <strong>$name</strong> created");
|
||||
flashAlert("Payment Method <strong>$name</strong> created");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -51,7 +51,7 @@ if (isset($_POST['edit_payment_method'])) {
|
||||
|
||||
logAudit("Payment Method", "Edit", "$session_name edited Payment Method $name");
|
||||
|
||||
flash_alert("Payment Method <strong>$name</strong> edited");
|
||||
flashAlert("Payment Method <strong>$name</strong> edited");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -69,7 +69,7 @@ if (isset($_GET['delete_payment_method'])) {
|
||||
|
||||
logAudit("Payment Method", "Delete", "$session_name deleted Payment Method $payment_method_name");
|
||||
|
||||
flash_alert("Payment Method <strong>$payment_method_name</strong> deleted", 'error');
|
||||
flashAlert("Payment Method <strong>$payment_method_name</strong> deleted", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ if (isset($_POST['add_payment_provider'])) {
|
||||
// Check to ensure provider isn't added twice
|
||||
$sql = mysqli_query($mysqli, "SELECT 1 FROM payment_providers WHERE payment_provider_name = '$provider' LIMIT 1");
|
||||
if (mysqli_num_rows($sql) > 0) {
|
||||
flash_alert("Payment Provider <strong>$provider</strong> already exists", 'error');
|
||||
flashAlert("Payment Provider <strong>$provider</strong> already exists", 'error');
|
||||
redirect();
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ if (isset($_POST['add_payment_provider'])) {
|
||||
|
||||
logAudit("Payment Provider", "Create", "$session_name created AI Provider $provider");
|
||||
|
||||
flash_alert("Payment provider <strong>$provider</strong> created");
|
||||
flashAlert("Payment provider <strong>$provider</strong> created");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -58,7 +58,7 @@ if (isset($_POST['edit_payment_provider'])) {
|
||||
|
||||
logAudit("Payment Provider", "Edit", "$session_name edited Payment Provider $provider");
|
||||
|
||||
flash_alert("Payment Provider <strong>$provider</strong> edited");
|
||||
flashAlert("Payment Provider <strong>$provider</strong> edited");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -82,7 +82,7 @@ if (isset($_GET['delete_payment_provider'])) {
|
||||
|
||||
logAudit("Payment Provider", "Delete", "$session_name deleted Payment Provider $provider_name");
|
||||
|
||||
flash_alert("Payment Provider <strong>$provider_name</strong> deleted", 'error');
|
||||
flashAlert("Payment Provider <strong>$provider_name</strong> deleted", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ if (isset($_POST['add_project_template'])) {
|
||||
|
||||
logAudit("Project Template", "Create", "$session_name created project template $name", 0, $project_template_id);
|
||||
|
||||
flash_alert("Project Template <strong>$name</strong> created");
|
||||
flashAlert("Project Template <strong>$name</strong> created");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -33,7 +33,7 @@ if (isset($_POST['edit_project_template'])) {
|
||||
|
||||
logAudit("Project Template", "Edit", "$session_name edited project template $name", 0, $project_template_id);
|
||||
|
||||
flash_alert("Project Template <strong>$name</strong> edited");
|
||||
flashAlert("Project Template <strong>$name</strong> edited");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -65,7 +65,7 @@ if (isset($_POST['add_ticket_template_to_project_template'])) {
|
||||
|
||||
logAudit("Project Template", "Edit", "$session_name added ticket template to project_template", 0, $project_template_id);
|
||||
|
||||
flash_alert("Ticket template added");
|
||||
flashAlert("Ticket template added");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -82,7 +82,7 @@ if (isset($_POST['remove_ticket_template_from_project_template'])) {
|
||||
|
||||
logAudit("Project Template", "Edit", "$session_name removed ticket template from project template", 0, $project_template_id);
|
||||
|
||||
flash_alert("Ticket template removed", 'error');
|
||||
flashAlert("Ticket template removed", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -103,7 +103,7 @@ if (isset($_GET['delete_project_template'])) {
|
||||
|
||||
logAudit("Project Template", "Delete", "$session_name deleted project template $project_template_name and its associated ticket templates and tasks");
|
||||
|
||||
flash_alert("Project Template <strong>$project_template_name</strong> and its associated ticket templates and tasks deleted", 'error');
|
||||
flashAlert("Project Template <strong>$project_template_name</strong> and its associated ticket templates and tasks deleted", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ if (isset($_POST['add_role'])) {
|
||||
|
||||
logAudit("User Role", "Create", "$session_name created user role $name", 0, $role_id);
|
||||
|
||||
flash_alert("User Role <strong>$name</strong> created");
|
||||
flashAlert("User Role <strong>$name</strong> created");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -67,7 +67,7 @@ if (isset($_POST['edit_role'])) {
|
||||
|
||||
logAudit("User Role", "Edit", "$session_name edited user role $name", 0, $role_id);
|
||||
|
||||
flash_alert("User Role <strong>$name</strong> edited");
|
||||
flashAlert("User Role <strong>$name</strong> edited");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -83,7 +83,7 @@ if (isset($_GET['archive_role'])) {
|
||||
$sql_role_user_count = mysqli_query($mysqli, "SELECT COUNT(user_id) FROM users WHERE user_role_id = $role_id AND user_archived_at IS NULL");
|
||||
$role_user_count = mysqli_fetch_row($sql_role_user_count)[0];
|
||||
if ($role_user_count != 0) {
|
||||
flash_alert("Role must not in use to archive it", 'error');
|
||||
flashAlert("Role must not in use to archive it", 'error');
|
||||
|
||||
redirect();
|
||||
}
|
||||
@@ -94,7 +94,7 @@ if (isset($_GET['archive_role'])) {
|
||||
|
||||
logAudit("User Role", "Archive", "$session_name archived user role $role_name", 0, $role_id);
|
||||
|
||||
flash_alert("User Role <strong>$role_name</strong> archived", 'error');
|
||||
flashAlert("User Role <strong>$role_name</strong> archived", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ if (isset($_GET['delete_saved_payment'])) {
|
||||
|
||||
logAudit("Payment Provider", "Update", "$session_name deleted saved payment method $saved_payment_description (PM: $payment_method)", $client_id);
|
||||
|
||||
flash_alert("Payment method <strong>$saved_payment_description</strong> removed", 'error');
|
||||
flashAlert("Payment method <strong>$saved_payment_description</strong> removed", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ if (isset($_POST['edit_ai_settings'])) {
|
||||
|
||||
logAudit("Settings", "Edit", "$session_name edited AI settings");
|
||||
|
||||
flash_alert("AI Settings updated");
|
||||
flashAlert("AI Settings updated");
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ if (isset($_POST['edit_company'])) {
|
||||
|
||||
logAudit("Settings", "Edit", "$session_name edited company details");
|
||||
|
||||
flash_alert("Company <strong>$name</strong> edited");
|
||||
flashAlert("Company <strong>$name</strong> edited");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -66,7 +66,7 @@ if (isset($_GET['remove_company_logo'])) {
|
||||
|
||||
logAudit("Settings", "Edit", "$session_name deleted company logo");
|
||||
|
||||
flash_alert("Removed company logo", 'error');
|
||||
flashAlert("Removed company logo", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ if (isset($_POST['edit_default_settings'])) {
|
||||
|
||||
logAudit("Settings", "Edit", "$session_name edited default settings");
|
||||
|
||||
flash_alert("Default settings edited");
|
||||
flashAlert("Default settings edited");
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ if (isset($_POST['edit_invoice_settings'])) {
|
||||
|
||||
logAudit("Settings", "Edit", "$session_name edited invoice settings");
|
||||
|
||||
flash_alert("Invoice Settings edited");
|
||||
flashAlert("Invoice Settings edited");
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ if (isset($_POST['edit_localization'])) {
|
||||
|
||||
logAudit("Settings", "Edit", "$session_name edited localization settings");
|
||||
|
||||
flash_alert("Company localization updated");
|
||||
flashAlert("Company localization updated");
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -29,12 +29,12 @@ if (isset($_POST['oauth_connect_microsoft_mail'])) {
|
||||
// Check the SAVED providers (loaded from config at bootstrap), not $_POST —
|
||||
// the provider dropdowns live in different forms and are never posted here
|
||||
if ($config_imap_provider !== 'microsoft_oauth' && $config_smtp_provider !== 'microsoft_oauth') {
|
||||
flash_alert("Please set the SMTP or IMAP Provider to Microsoft 365 (OAuth) and save it before connecting.", 'error');
|
||||
flashAlert("Please set the SMTP or IMAP Provider to Microsoft 365 (OAuth) and save it before connecting.", 'error');
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (empty($config_mail_oauth_client_id) || empty($config_mail_oauth_client_secret) || empty($config_mail_oauth_tenant_id)) {
|
||||
flash_alert("Missing Microsoft OAuth settings. Please provide Client ID, Client Secret, and Tenant ID first.", 'error');
|
||||
flashAlert("Missing Microsoft OAuth settings. Please provide Client ID, Client Secret, and Tenant ID first.", 'error');
|
||||
redirect();
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ if (isset($_POST['edit_mail_smtp_settings'])) {
|
||||
|
||||
logAudit("Settings", "Edit", "$session_name edited SMTP settings");
|
||||
|
||||
flash_alert("SMTP Mail Settings updated");
|
||||
flashAlert("SMTP Mail Settings updated");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -127,7 +127,7 @@ if (isset($_POST['edit_mail_imap_settings'])) {
|
||||
|
||||
logAudit("Settings", "Edit", "$session_name edited IMAP settings");
|
||||
|
||||
flash_alert("IMAP Mail Settings updated");
|
||||
flashAlert("IMAP Mail Settings updated");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -153,7 +153,7 @@ if (isset($_POST['edit_mail_oauth_settings'])) {
|
||||
");
|
||||
|
||||
logAudit("Settings", "Edit", "$session_name edited mail OAuth settings");
|
||||
flash_alert("Mail OAuth Settings updated");
|
||||
flashAlert("Mail OAuth Settings updated");
|
||||
redirect();
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ if (isset($_POST['edit_mail_from_settings'])) {
|
||||
|
||||
logAudit("Settings", "Edit", "$session_name edited mail from settings");
|
||||
|
||||
flash_alert("Mail From Settings updated");
|
||||
flashAlert("Mail From Settings updated");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -221,9 +221,9 @@ if (isset($_POST['test_email_smtp'])) {
|
||||
$mail = addToMailQueue($data);
|
||||
|
||||
if ($mail === true) {
|
||||
flash_alert("Test email queued! <a class='text-bold text-light' href='mail_queue.php'>Check Admin > Mail queue</a>");
|
||||
flashAlert("Test email queued! <a class='text-bold text-light' href='mail_queue.php'>Check Admin > Mail queue</a>");
|
||||
} else {
|
||||
flash_alert("Failed to add test mail to queue", 'error');
|
||||
flashAlert("Failed to add test mail to queue", 'error');
|
||||
}
|
||||
|
||||
redirect();
|
||||
@@ -275,7 +275,7 @@ if (isset($_POST['test_email_imap'])) {
|
||||
}
|
||||
|
||||
if (empty($host) || empty($port) || empty($username)) {
|
||||
flash_alert("<strong>IMAP connection failed:</strong> Missing host, port, or username.", 'error');
|
||||
flashAlert("<strong>IMAP connection failed:</strong> Missing host, port, or username.", 'error');
|
||||
redirect();
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@ if (isset($_POST['test_email_imap'])) {
|
||||
$password = $config_mail_oauth_access_token;
|
||||
} else {
|
||||
if (empty($config_mail_oauth_client_id) || empty($config_mail_oauth_client_secret) || empty($config_mail_oauth_refresh_token)) {
|
||||
flash_alert("<strong>IMAP OAuth failed:</strong> Missing OAuth client credentials or refresh token.", 'error');
|
||||
flashAlert("<strong>IMAP OAuth failed:</strong> Missing OAuth client credentials or refresh token.", 'error');
|
||||
redirect();
|
||||
}
|
||||
|
||||
@@ -332,7 +332,7 @@ if (isset($_POST['test_email_imap'])) {
|
||||
]);
|
||||
} else {
|
||||
if (empty($config_mail_oauth_tenant_id)) {
|
||||
flash_alert("<strong>IMAP OAuth failed:</strong> Microsoft tenant ID is required.", 'error');
|
||||
flashAlert("<strong>IMAP OAuth failed:</strong> Microsoft tenant ID is required.", 'error');
|
||||
redirect();
|
||||
}
|
||||
|
||||
@@ -346,13 +346,13 @@ if (isset($_POST['test_email_imap'])) {
|
||||
}
|
||||
|
||||
if (!$response['ok']) {
|
||||
flash_alert("<strong>IMAP OAuth failed:</strong> Could not refresh access token.", 'error');
|
||||
flashAlert("<strong>IMAP OAuth failed:</strong> Could not refresh access token.", 'error');
|
||||
redirect();
|
||||
}
|
||||
|
||||
$json = json_decode($response['body'], true);
|
||||
if (!is_array($json) || empty($json['access_token'])) {
|
||||
flash_alert("<strong>IMAP OAuth failed:</strong> Token response did not include an access token.", 'error');
|
||||
flashAlert("<strong>IMAP OAuth failed:</strong> Token response did not include an access token.", 'error');
|
||||
redirect();
|
||||
}
|
||||
|
||||
@@ -476,9 +476,9 @@ if (isset($_POST['test_email_imap'])) {
|
||||
|
||||
if ($success) {
|
||||
if ($is_oauth) {
|
||||
flash_alert("Connected successfully using OAuth");
|
||||
flashAlert("Connected successfully using OAuth");
|
||||
} else {
|
||||
flash_alert("Connected successfully");
|
||||
flashAlert("Connected successfully");
|
||||
}
|
||||
} else {
|
||||
if (!$error_line) {
|
||||
@@ -488,7 +488,7 @@ if (isset($_POST['test_email_imap'])) {
|
||||
}
|
||||
|
||||
} catch (Exception $e) {
|
||||
flash_alert("<strong>IMAP connection failed:</strong> " . htmlspecialchars($e->getMessage()), 'error');
|
||||
flashAlert("<strong>IMAP connection failed:</strong> " . htmlspecialchars($e->getMessage()), 'error');
|
||||
}
|
||||
|
||||
redirect();
|
||||
@@ -502,7 +502,7 @@ if (isset($_POST['test_oauth_token_refresh'])) {
|
||||
$provider = escapeSql($_POST['oauth_provider'] ?? '');
|
||||
|
||||
if ($provider !== 'google_oauth' && $provider !== 'microsoft_oauth') {
|
||||
flash_alert("OAuth token test failed: unsupported provider.", 'error');
|
||||
flashAlert("OAuth token test failed: unsupported provider.", 'error');
|
||||
redirect();
|
||||
}
|
||||
|
||||
@@ -512,12 +512,12 @@ if (isset($_POST['test_oauth_token_refresh'])) {
|
||||
$oauth_refresh_token = escapeSql($config_mail_oauth_refresh_token ?? '');
|
||||
|
||||
if (empty($oauth_client_id) || empty($oauth_client_secret) || empty($oauth_refresh_token)) {
|
||||
flash_alert("OAuth token test failed: missing client ID, client secret, or refresh token.", 'error');
|
||||
flashAlert("OAuth token test failed: missing client ID, client secret, or refresh token.", 'error');
|
||||
redirect();
|
||||
}
|
||||
|
||||
if ($provider === 'microsoft_oauth' && empty($oauth_tenant_id)) {
|
||||
flash_alert("OAuth token test failed: Microsoft tenant ID is required.", 'error');
|
||||
flashAlert("OAuth token test failed: Microsoft tenant ID is required.", 'error');
|
||||
redirect();
|
||||
}
|
||||
|
||||
@@ -546,14 +546,14 @@ if (isset($_POST['test_oauth_token_refresh'])) {
|
||||
|
||||
if ($raw_body === false || $http_code < 200 || $http_code >= 300) {
|
||||
$err_msg = !empty($curl_err) ? $curl_err : "HTTP $http_code";
|
||||
flash_alert("OAuth token test failed: $err_msg", 'error');
|
||||
flashAlert("OAuth token test failed: $err_msg", 'error');
|
||||
redirect();
|
||||
}
|
||||
|
||||
$json = json_decode($raw_body, true);
|
||||
|
||||
if (!is_array($json) || empty($json['access_token'])) {
|
||||
flash_alert("OAuth token test failed: access token missing in provider response.", 'error');
|
||||
flashAlert("OAuth token test failed: access token missing in provider response.", 'error');
|
||||
redirect();
|
||||
}
|
||||
|
||||
@@ -575,6 +575,6 @@ if (isset($_POST['test_oauth_token_refresh'])) {
|
||||
$provider_label = $provider === 'microsoft_oauth' ? 'Microsoft 365' : 'Google Workspace';
|
||||
logAudit("Settings", "Edit", "$session_name tested OAuth token refresh for $provider_label mail settings");
|
||||
|
||||
flash_alert("OAuth token refresh successful for $provider_label. Access token expires at $new_expires_at.");
|
||||
flashAlert("OAuth token refresh successful for $provider_label. Access token expires at $new_expires_at.");
|
||||
redirect();
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ if (isset($_POST['edit_module_settings'])) {
|
||||
|
||||
logAudit("Settings", "Edit", "$session_name edited module settings");
|
||||
|
||||
flash_alert("Module Settings updated");
|
||||
flashAlert("Module Settings updated");
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ if (isset($_POST['edit_notification_settings'])) {
|
||||
|
||||
logAudit("Settings", "Edit", "$session_name edited notification settings");
|
||||
|
||||
flash_alert("Notification Settings updated");
|
||||
flashAlert("Notification Settings updated");
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@ if (isset($_POST['edit_online_payment_settings'])) {
|
||||
logAudit("Settings", "Edit", "$session_name edited online payment settings");
|
||||
|
||||
if ($config_stripe_enable && $config_stripe_account == 0) {
|
||||
flash_alert("Stripe payment account must be specified!", 'error');
|
||||
flashAlert("Stripe payment account must be specified!", 'error');
|
||||
} else {
|
||||
flash_alert("Online Payment Settings updated");
|
||||
flashAlert("Online Payment Settings updated");
|
||||
}
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -7,7 +7,7 @@ if (isset($_GET['stripe_remove_pm'])) {
|
||||
validateCSRFToken($_GET['csrf_token']);
|
||||
|
||||
if (!$config_stripe_enable) {
|
||||
flash_alert("Stripe not enabled", 'error');
|
||||
flashAlert("Stripe not enabled", 'error');
|
||||
redirect();
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ if (isset($_GET['stripe_remove_pm'])) {
|
||||
|
||||
logAudit("Stripe", "Update", "$session_name deleted saved Stripe payment method (PM: $payment_method)", $client_id);
|
||||
|
||||
flash_alert("Payment method removed", 'error');
|
||||
flashAlert("Payment method removed", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -66,7 +66,7 @@ if (isset($_GET['stripe_reset_customer'])) {
|
||||
|
||||
logAudit("Stripe", "Delete", "$session_name reset Stripe settings for client", $client_id);
|
||||
|
||||
flash_alert("Reset client Stripe settings", 'error');
|
||||
flashAlert("Reset client Stripe settings", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ if (isset($_POST['edit_project_settings'])) {
|
||||
|
||||
logAudit("Settings", "Edit", "$session_name edited project settings");
|
||||
|
||||
flash_alert("Project Settings updated");
|
||||
flashAlert("Project Settings updated");
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ if (isset($_POST['edit_quote_settings'])) {
|
||||
|
||||
logAudit("Settings", "Edit", "$session_name edited Quote settings");
|
||||
|
||||
flash_alert("Quote Settings updated");
|
||||
flashAlert("Quote Settings updated");
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ if (isset($_POST['edit_security_settings'])) {
|
||||
|
||||
logAudit("Settings", "Edit", "$session_name edited security settings");
|
||||
|
||||
flash_alert("Security settings updated");
|
||||
flashAlert("Security settings updated");
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ if (isset($_POST['edit_telemetry_settings'])) {
|
||||
|
||||
logAudit("Settings", "Edit", "$session_name edited telemetry settings");
|
||||
|
||||
flash_alert("Telemetry Settings updated");
|
||||
flashAlert("Telemetry Settings updated");
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ if (isset($_POST['edit_theme_settings'])) {
|
||||
|
||||
logAudit("Settings", "Edit", "$session_name edited theme settings $dark_mode");
|
||||
|
||||
flash_alert("Changed theme to <strong>$theme</strong>");
|
||||
flashAlert("Changed theme to <strong>$theme</strong>");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -44,7 +44,7 @@ if (isset($_POST['edit_favicon_settings'])) {
|
||||
|
||||
logAudit("Settings", "Edit", "$session_name changed the favicon");
|
||||
|
||||
flash_alert("Favicon Updated");
|
||||
flashAlert("Favicon Updated");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -60,7 +60,7 @@ if (isset($_GET['reset_favicon'])) {
|
||||
|
||||
logAudit("Settings", "Edit", "$session_name reset Favicon");
|
||||
|
||||
flash_alert("Favicon reset", 'error');
|
||||
flashAlert("Favicon reset", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ if (isset($_POST['edit_ticket_settings'])) {
|
||||
|
||||
logAudit("Settings", "Edit", "$session_name edited ticket settings");
|
||||
|
||||
flash_alert("Ticket Settings updated");
|
||||
flashAlert("Ticket Settings updated");
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ if (isset($_POST['add_software_template'])) {
|
||||
|
||||
logAudit("Software Template", "Create", "$session_name created software template $name", 0, $software_template_id);
|
||||
|
||||
flash_alert("Software template <strong>$name</strong> created");
|
||||
flashAlert("Software template <strong>$name</strong> created");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -43,7 +43,7 @@ if (isset($_POST['edit_software_template'])) {
|
||||
|
||||
logAudit("Software Template", "Edit", "$session_name edited software template $name", 0, $software_template_id);
|
||||
|
||||
flash_alert("Software template <strong>$name</strong> edited");
|
||||
flashAlert("Software template <strong>$name</strong> edited");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -64,7 +64,7 @@ if (isset($_GET['delete_software_template'])) {
|
||||
|
||||
logAudit("Software Template", "Delete", "$session_name deleted software template $software_template_name");
|
||||
|
||||
flash_alert("Software Template <strong>$software_template_name</strong> deleted", 'error');
|
||||
flashAlert("Software Template <strong>$software_template_name</strong> deleted", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ if (isset($_POST['add_tag'])) {
|
||||
|
||||
logAudit("Tag", "Create", "$session_name created tag $name", 0, $tag_id);
|
||||
|
||||
flash_alert("Tag <strong>$name</strong> created");
|
||||
flashAlert("Tag <strong>$name</strong> created");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -36,7 +36,7 @@ if (isset($_POST['edit_tag'])) {
|
||||
|
||||
logAudit("Tag", "Edit", "$session_name edited tag $name", 0, $tag_id);
|
||||
|
||||
flash_alert("Tag <strong>$name</strong> edited");
|
||||
flashAlert("Tag <strong>$name</strong> edited");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -54,7 +54,7 @@ if (isset($_GET['delete_tag'])) {
|
||||
|
||||
logAudit("Tag", "Delete", "$session_name deleted tag $tag_name");
|
||||
|
||||
flash_alert("Tag <strong>$tag_name</strong> deleted", 'error');
|
||||
flashAlert("Tag <strong>$tag_name</strong> deleted", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ if (isset($_POST['add_tax'])) {
|
||||
|
||||
logAudit("Tax", "Create", "$session_name created tax $name - $percent%", 0, $tax_id);
|
||||
|
||||
flash_alert("Tax <strong>$name</strong> ($percent%) created");
|
||||
flashAlert("Tax <strong>$name</strong> ($percent%) created");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -37,7 +37,7 @@ if (isset($_POST['edit_tax'])) {
|
||||
|
||||
logAudit("Tax", "Edit", "$session_name edited tax $name - $percent%", 0, $tax_id);
|
||||
|
||||
flash_alert("Tax <strong>$name</strong> ($percent%) edited");
|
||||
flashAlert("Tax <strong>$name</strong> ($percent%) edited");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -55,7 +55,7 @@ if (isset($_GET['archive_tax'])) {
|
||||
|
||||
logAudit("Tax", "Archive", "$session_name archived tax $tax_name", 0, $tax_id);
|
||||
|
||||
flash_alert("Tax <strong>$tax_name</strong> Archived", 'error');
|
||||
flashAlert("Tax <strong>$tax_name</strong> Archived", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -73,7 +73,7 @@ if (isset($_GET['delete_tax'])) {
|
||||
|
||||
logAudit("Tax", "Delete", "$session_name deleted tax $tax_name");
|
||||
|
||||
flash_alert("Tax <strong>$tax_name</strong> deleted", 'error');
|
||||
flashAlert("Tax <strong>$tax_name</strong> deleted", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ if (isset($_POST['add_ticket_status'])) {
|
||||
|
||||
logAudit("Ticket Status", "Create", "$session_name created custom ticket status $name", 0, $ticket_status_id);
|
||||
|
||||
flash_alert("Custom Ticket Status <strong>$name</strong> created");
|
||||
flashAlert("Custom Ticket Status <strong>$name</strong> created");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -35,7 +35,7 @@ if (isset($_POST['edit_ticket_status'])) {
|
||||
|
||||
logAudit("Ticket Status", "Edit", "$session_name edited custom ticket status $name", 0, $ticket_status_id);
|
||||
|
||||
flash_alert("Custom Ticket Status <strong>$name</strong> edited");
|
||||
flashAlert("Custom Ticket Status <strong>$name</strong> edited");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -57,7 +57,7 @@ if (isset($_GET['delete_ticket_status'])) {
|
||||
|
||||
logAudit("Ticket Status", "Delete", "$session_name deleted custom ticket status $ticket_status_name");
|
||||
|
||||
flash_alert("Custom Ticket Status <strong>$ticket_status_name</strong> Deleted", 'error');
|
||||
flashAlert("Custom Ticket Status <strong>$ticket_status_name</strong> Deleted", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ if (isset($_POST['add_ticket_template'])) {
|
||||
|
||||
logAudit("Ticket Template", "Create", "$session_name created ticket template $name", 0, $ticket_template_id);
|
||||
|
||||
flash_alert("Ticket Template <strong>$name</strong> created");
|
||||
flashAlert("Ticket Template <strong>$name</strong> created");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -48,7 +48,7 @@ if (isset($_POST['edit_ticket_template'])) {
|
||||
|
||||
logAudit("Ticket Template", "Edit", "$session_name edited ticket template $name", 0, $ticket_template_id);
|
||||
|
||||
flash_alert("Ticket Template <strong>$name</strong> edited");
|
||||
flashAlert("Ticket Template <strong>$name</strong> edited");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -70,7 +70,7 @@ if (isset($_GET['delete_ticket_template'])) {
|
||||
|
||||
logAudit("Ticket Template", "Delete", "$session_name deleted ticket template $ticket_template_name");
|
||||
|
||||
flash_alert("Ticket Template <strong>$ticket_template_name</strong> and its associated tasks deleted", 'error');
|
||||
flashAlert("Ticket Template <strong>$ticket_template_name</strong> and its associated tasks deleted", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -89,7 +89,7 @@ if (isset($_POST['add_ticket_template_task'])) {
|
||||
|
||||
logAudit("Ticket Template", "Create", "$session_name created task $task_name for ticket template", 0, $ticket_template_id);
|
||||
|
||||
flash_alert("Added Task <strong>$task_name</strong>");
|
||||
flashAlert("Added Task <strong>$task_name</strong>");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -107,7 +107,7 @@ if (isset($_GET['delete_task_template'])) {
|
||||
|
||||
logAudit("Ticket Template", "Edit", "$session_name deleted task $task_template_name from ticket template");
|
||||
|
||||
flash_alert("Task <strong>$task_template_name</strong> deleted", 'error');
|
||||
flashAlert("Task <strong>$task_template_name</strong> deleted", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
|
||||
@@ -274,7 +274,7 @@ if (isset($_GET['update'])) {
|
||||
|
||||
logAudit("App", "Update", "$session_name ran updates");
|
||||
|
||||
flash_alert("Update successful");
|
||||
flashAlert("Update successful");
|
||||
|
||||
sleep(1);
|
||||
|
||||
@@ -292,7 +292,7 @@ if (isset($_GET['update_db'])) {
|
||||
|
||||
logAudit("Database", "Update", "$session_name updated the database structure");
|
||||
|
||||
flash_alert("Database structure update successful");
|
||||
flashAlert("Database structure update successful");
|
||||
|
||||
sleep(1);
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ if (isset($_POST['add_user'])) {
|
||||
|
||||
logAudit("User", "Create", "$session_name created user $name", 0, $user_id);
|
||||
|
||||
flash_alert("User <strong>$name</strong> created" . $extended_alert_description);
|
||||
flashAlert("User <strong>$name</strong> created" . $extended_alert_description);
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -172,7 +172,7 @@ if (isset($_POST['edit_user'])) {
|
||||
|
||||
logAudit("User", "Edit", "$session_name edited user $name", 0, $user_id);
|
||||
|
||||
flash_alert("User <strong>$name</strong> updated" . $extended_alert_description);
|
||||
flashAlert("User <strong>$name</strong> updated" . $extended_alert_description);
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -190,7 +190,7 @@ if (isset($_GET['activate_user'])) {
|
||||
|
||||
logAudit("User", "Activate", "$session_name activated user $user_name", 0, $user_id);
|
||||
|
||||
flash_alert("User <strong>$user_name</strong> activated");
|
||||
flashAlert("User <strong>$user_name</strong> activated");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -212,7 +212,7 @@ if (isset($_GET['disable_user'])) {
|
||||
|
||||
logAudit("User", "Disable", "$session_name disabled user $name", 0, $user_id);
|
||||
|
||||
flash_alert("User <strong>$user_name</strong> disabled", 'error');
|
||||
flashAlert("User <strong>$user_name</strong> disabled", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -230,7 +230,7 @@ if (isset($_GET['revoke_remember_me'])) {
|
||||
|
||||
logAudit("User", "Edit", "$session_name revoked all remember me tokens for user $user_name", 0, $user_id);
|
||||
|
||||
flash_alert("User <strong>$user_name</strong> remember me tokens revoked", 'error');
|
||||
flashAlert("User <strong>$user_name</strong> remember me tokens revoked", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -255,7 +255,7 @@ if (isset($_POST['archive_user'])) {
|
||||
|
||||
logAudit("User", "Archive", "$session_name archived user $user_name", 0, $user_id);
|
||||
|
||||
flash_alert("User <strong>$user_name</strong> archived", 'error');
|
||||
flashAlert("User <strong>$user_name</strong> archived", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -285,7 +285,7 @@ if (isset($_POST['restore_user'])) {
|
||||
|
||||
logAudit("User", "Restored", "$session_name restored user $user_name", 0, $user_id);
|
||||
|
||||
flash_alert("User <strong>$user_name</strong> restored");
|
||||
flashAlert("User <strong>$user_name</strong> restored");
|
||||
|
||||
redirect();
|
||||
|
||||
@@ -356,7 +356,7 @@ if (isset($_POST['ir_reset_user_password'])) {
|
||||
$userRow = mysqli_fetch_assoc($sql);
|
||||
|
||||
if (!password_verify($admin_password, $userRow['user_password'])) {
|
||||
flash_alert("Incorrect password.", 'error');
|
||||
flashAlert("Incorrect password.", 'error');
|
||||
redirect();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user