mirror of https://github.com/itflow-org/itflow
Update admin, user, guest and client post to use new redirect function
This commit is contained in:
parent
5d52b6c4ec
commit
d2dac1915d
|
|
@ -24,7 +24,7 @@ if (isset($_POST['add_ai_model'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "AI Model <strong>$model</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ if (isset($_POST['edit_ai_model'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "AI Model <strong>$model</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -66,6 +66,6 @@ if (isset($_GET['delete_ai_model'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "AI Model <strong>$model_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ if (isset($_POST['add_ai_provider'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "AI Model <strong>$provider</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ if (isset($_POST['edit_ai_provider'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "AI Model <strong>$provider</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -67,6 +67,6 @@ if (isset($_GET['delete_ai_provider'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "AI Provider <strong>$provider_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ if (isset($_POST['add_api_key'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "API Key <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ if (isset($_GET['delete_api_key'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "API Key <strong>$name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -88,5 +88,5 @@ if (isset($_POST['bulk_delete_api_keys'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ if (isset($_POST['backup_master_key'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Incorrect password.";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ if (isset($_POST['add_category'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Category $type <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ if (isset($_POST['edit_category'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Category $type <strong>$name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ if (isset($_GET['archive_category'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Category $category_type <strong>$category_name</strong> archived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ if (isset($_GET['unarchive_category'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Category $category_type <strong>$category_name</strong> unarchived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -101,6 +101,6 @@ if (isset($_GET['delete_category'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Category $category_type <strong>$category_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ if(isset($_POST['create_custom_field'])){
|
|||
|
||||
$_SESSION['alert_message'] = "Custom field <strong>$label</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ if(isset($_POST['edit_custom_field'])){
|
|||
|
||||
$_SESSION['alert_message'] = "Custom field <strong>$label</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -58,6 +58,6 @@ if(isset($_GET['delete_custom_field'])){
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Custom field <strong>$label</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ if (isset($_POST['add_custom_link'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Custom link <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ if (isset($_POST['edit_custom_link'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Custom Link <strong>$name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -66,6 +66,6 @@ if (isset($_GET['delete_custom_link'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Custom Link <strong>$name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ if (isset($_POST['add_document_template'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Document template <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ if (isset($_POST['edit_document_template'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Document Template <strong>$name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -60,6 +60,6 @@ if (isset($_GET['delete_document_template'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Document Template <strong>$document_template_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,6 @@ if (isset($_POST['edit_identity_provider'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Identity Provider Settings updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ if (isset($_GET['send_failed_mail'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Email Force Sent, give it a minute to resend";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ if (isset($_GET['cancel_mail'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Email cancelled and marked as failed.";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ if (isset($_POST['bulk_cancel_emails'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_delete_emails'])) {
|
||||
|
|
@ -89,5 +89,5 @@ if (isset($_POST['bulk_delete_emails'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ if (isset($_POST['add_payment_method'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Payment Method <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ if (isset($_POST['edit_payment_method'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Payment Method <strong>$name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -59,6 +59,6 @@ if (isset($_GET['delete_payment_method'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Payment Method <strong>$payment_method_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ if (isset($_POST['add_payment_provider'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "AI Model <strong>$provider</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ if (isset($_POST['edit_payment_provider'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Payment Provider <strong>$provider</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -101,6 +101,6 @@ if (isset($_GET['delete_payment_provider'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Payment Provider <strong>$provider_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ if (isset($_POST['add_project_template'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Project Template <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ if (isset($_POST['edit_project_template'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Project Template <strong>$name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['edit_ticket_template_order'])) {
|
||||
|
|
@ -44,7 +44,7 @@ if (isset($_POST['edit_ticket_template_order'])) {
|
|||
|
||||
mysqli_query($mysqli, "UPDATE project_template_ticket_templates SET ticket_template_order = $order WHERE ticket_template_id = $ticket_template_id AND project_template_id = $project_template_id");
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['add_ticket_template_to_project_template'])) {
|
||||
|
|
@ -60,7 +60,7 @@ if (isset($_POST['add_ticket_template_to_project_template'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Ticket template added";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['remove_ticket_template_from_project_template'])) {
|
||||
|
|
@ -77,7 +77,7 @@ if (isset($_POST['remove_ticket_template_from_project_template'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Ticket template removed";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['delete_project_template'])) {
|
||||
|
|
@ -100,5 +100,5 @@ if (isset($_GET['delete_project_template'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Project Template <strong>$project_template_name</strong> and its associated ticket templates and tasks deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ if (isset($_POST['add_role'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "User Role <strong$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ if (isset($_POST['edit_role'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "User Role <strong>$name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['archive_role'])) {
|
||||
|
|
@ -73,7 +73,7 @@ if (isset($_GET['archive_role'])) {
|
|||
if ($role_user_count != 0) {
|
||||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Role must not in use to archive it";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
@ -85,5 +85,5 @@ if (isset($_GET['archive_role'])) {
|
|||
logAction("User Role", "Archive", "$session_name archived user role $role_name", 0, $role_id);
|
||||
|
||||
$_SESSION['alert_message'] = "User Role archived";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
|
@ -63,6 +63,6 @@ if (isset($_GET['delete_saved_payment'])) {
|
|||
// Logging & Redirect
|
||||
logAction("Payment Provider", "Update", "$session_name deleted saved payment method $saved_payment_description (PM: $payment_method)", $client_id);
|
||||
$_SESSION['alert_message'] = "Payment method <strong>$saved_payment_description</strong> removed";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,6 @@ if (isset($_POST['edit_ai_settings'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "AI Settings updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ if (isset($_POST['edit_company'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Company <strong>$name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -69,6 +69,6 @@ if (isset($_GET['remove_company_logo'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Removed company logo";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,5 +24,5 @@ if (isset($_POST['edit_default_settings'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Default settings edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,6 @@ if (isset($_POST['edit_invoice_settings'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Invoice Settings edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@ if (isset($_POST['edit_localization'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Company localization updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ if (isset($_POST['edit_mail_smtp_settings'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "SMTP Mail Settings updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ if (isset($_POST['edit_mail_imap_settings'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "IMAP Mail Settings updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -68,7 +68,7 @@ if (isset($_POST['edit_mail_from_settings'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Mail From Settings updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -114,7 +114,7 @@ if (isset($_POST['test_email_smtp'])) {
|
|||
$_SESSION['alert_message'] = "Failed to add test mail to queue";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['test_email_imap'])) {
|
||||
|
|
@ -139,5 +139,5 @@ if (isset($_POST['test_email_imap'])) {
|
|||
$_SESSION['alert_message'] = "Test IMAP connection failed: " . $e->getMessage();
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,6 @@ if (isset($_POST['edit_module_settings'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Module Settings updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@ if (isset($_POST['edit_notification_settings'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Notification Settings updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,5 +27,5 @@ if (isset($_POST['edit_online_payment_settings'])) {
|
|||
$_SESSION['alert_message'] = "Online Payment Settings updated";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ if (isset($_GET['stripe_remove_pm'])) {
|
|||
|
||||
if (!$config_stripe_enable) {
|
||||
$_SESSION['alert_message'] = "Stripe not enabled";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ if (isset($_GET['stripe_remove_pm'])) {
|
|||
// Logging & Redirect
|
||||
logAction("Stripe", "Update", "$session_name deleted saved Stripe payment method (PM: $payment_method)", $client_id);
|
||||
$_SESSION['alert_message'] = "Payment method removed";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -66,5 +66,5 @@ if (isset($_GET['stripe_reset_customer'])) {
|
|||
logAction("Stripe", "Delete", "$session_name reset Stripe settings for client", $client_id);
|
||||
|
||||
$_SESSION['alert_message'] = "Reset client Stripe settings";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
|
@ -16,6 +16,6 @@ if (isset($_POST['edit_project_settings'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Project Settings updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,6 @@ if (isset($_POST['edit_quote_settings'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Quote Settings updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,5 +24,5 @@ if (isset($_POST['edit_security_settings'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Security settings updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,6 @@ if (isset($_POST['edit_telemetry_settings'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Telemetry Settings updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ if (isset($_POST['edit_theme_settings'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Changed theme to <strong>$theme</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['edit_favicon_settings'])) {
|
||||
|
|
@ -49,6 +49,6 @@ if (isset($_POST['edit_favicon_settings'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Favicon Updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,6 @@ if (isset($_POST['edit_ticket_settings'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Ticket Settings updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
@ -22,7 +22,7 @@ if (isset($_POST['add_software_template'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Software template <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -43,7 +43,7 @@ if (isset($_POST['edit_software_template'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Software template <strong>$name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -64,6 +64,6 @@ if (isset($_GET['delete_software_template'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Software Template <strong>$software_template_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ if (isset($_POST['add_tag'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Tag <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ if (isset($_POST['edit_tag'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Tag <strong>$name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -56,6 +56,6 @@ if (isset($_GET['delete_tag'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Tag <strong>$tag_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ if (isset($_POST['add_tax'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Tax <strong>$name</strong> ($percent%) created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ if (isset($_POST['edit_tax'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Tax <strong>$name</strong> ($percent%) edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ if (isset($_GET['archive_tax'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Tax <strong>$tax_name</strong> Archived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -80,6 +80,6 @@ if (isset($_GET['delete_tax'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Tax <strong>$tax_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ if (isset($_POST['add_ticket_status'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Custom Ticket Status <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ if (isset($_POST['edit_ticket_status'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Custom Ticket Status <strong>$name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -62,5 +62,5 @@ if (isset($_GET['delete_ticket_status'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Custom Ticket Status <strong>$ticket_status_name</strong> Deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ if (isset($_POST['add_ticket_template'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Ticket Template <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ if (isset($_POST['edit_ticket_template'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Ticket Template <strong>$name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['delete_ticket_template'])) {
|
||||
|
|
@ -74,7 +74,7 @@ if (isset($_GET['delete_ticket_template'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Ticket Template <strong>$ticket_template_name</strong> and its associated tasks deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['add_ticket_template_task'])) {
|
||||
|
|
@ -94,7 +94,7 @@ if (isset($_POST['add_ticket_template_task'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Added Task <strong>$task_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -115,5 +115,5 @@ if (isset($_GET['delete_task_template'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Task <strong>$task_template_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ if (isset($_GET['update'])) {
|
|||
|
||||
sleep(1);
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -300,5 +300,5 @@ if (isset($_GET['update_db'])) {
|
|||
|
||||
sleep(1);
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ if (isset($_POST['add_user'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "User <strong>$name</strong> created" . $extended_alert_description;
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -176,7 +176,7 @@ if (isset($_POST['edit_user'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "User <strong>$name</strong> updated" . $extended_alert_description;
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -198,7 +198,7 @@ if (isset($_GET['activate_user'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "User <strong>$user_name</strong> activated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -225,7 +225,7 @@ if (isset($_GET['disable_user'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "User <strong>$user_name</strong> disabled";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -247,7 +247,7 @@ if (isset($_GET['revoke_remember_me'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "User <strong>$user_name</strong> remember me tokens revoked";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -273,7 +273,7 @@ if (isset($_GET['archive_user'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "User <strong>$name</strong> archived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -341,7 +341,7 @@ if (isset($_POST['ir_reset_user_password'])) {
|
|||
if (!password_verify($admin_password, $userRow['user_password'])) {
|
||||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Incorrect password.";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ if (isset($_POST['add_vendor_template'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Vendor template <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['edit_vendor_template'])) {
|
||||
|
|
@ -136,7 +136,7 @@ if (isset($_POST['edit_vendor_template'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Vendor template <strong>$name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['delete_vendor_template'])) {
|
||||
|
|
@ -158,5 +158,5 @@ if (isset($_GET['delete_vendor_template'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Vendor Template <strong>$vendor_template_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ if (isset($_POST['add_ticket_comment'])) {
|
|||
|
||||
// After stripping bad HTML, check the comment isn't just empty
|
||||
if (empty($comment)) {
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
@ -172,7 +172,7 @@ if (isset($_POST['add_ticket_comment'])) {
|
|||
customAction('ticket_reply_client', $ticket_id);
|
||||
|
||||
// Redirect back to original page
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
} else {
|
||||
// The client does not have access to this ticket
|
||||
|
|
@ -202,7 +202,7 @@ if (isset($_POST['add_ticket_feedback'])) {
|
|||
customAction('ticket_feedback', $ticket_id);
|
||||
|
||||
// Redirect
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
} else {
|
||||
// The client does not have access to this ticket
|
||||
header("Location: post.php?logout");
|
||||
|
|
@ -891,7 +891,7 @@ if (isset($_POST['set_recurring_payment'])) {
|
|||
$_SESSION['alert_message'] = "Automatic Payment Disabled for Recurring Invoice $recurring_invoice_prefix$recurring_invoice_number";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['client_add_document'])) {
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ if (isset($_GET['accept_quote'], $_GET['url_key'])) {
|
|||
}
|
||||
|
||||
$_SESSION['alert_message'] = "Quote Accepted";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
} else {
|
||||
echo "Invalid!!";
|
||||
}
|
||||
|
|
@ -125,7 +125,7 @@ if (isset($_GET['decline_quote'], $_GET['url_key'])) {
|
|||
|
||||
$_SESSION['alert_type'] = "danger";
|
||||
$_SESSION['alert_message'] = "Quote Declined";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
} else {
|
||||
echo "Invalid!!";
|
||||
}
|
||||
|
|
@ -146,7 +146,7 @@ if (isset($_GET['reopen_ticket'], $_GET['url_key'])) {
|
|||
// Logging
|
||||
customAction('ticket_update', $ticket_id);
|
||||
$_SESSION['alert_message'] = "Ticket reopened";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
} else {
|
||||
echo "Invalid!!";
|
||||
}
|
||||
|
|
@ -167,7 +167,7 @@ if (isset($_GET['close_ticket'], $_GET['url_key'])) {
|
|||
// Logging
|
||||
customAction('ticket_close', $ticket_id);
|
||||
$_SESSION['alert_message'] = "Ticket closed";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
} else {
|
||||
echo "Invalid!!";
|
||||
}
|
||||
|
|
@ -195,7 +195,7 @@ if (isset($_GET['add_ticket_feedback'], $_GET['url_key'])) {
|
|||
}
|
||||
|
||||
$_SESSION['alert_message'] = "Feedback recorded - thank you";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
customAction('ticket_feedback', $ticket_id);
|
||||
} else {
|
||||
echo "Invalid!!";
|
||||
|
|
@ -708,7 +708,7 @@ if (isset($_POST['guest_quote_upload_file'])) {
|
|||
}
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
} else {
|
||||
echo "Invalid!!";
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ if(isset($_POST['change_records_per_page'])){
|
|||
|
||||
mysqli_query($mysqli,"UPDATE user_settings SET user_config_records_per_page = $records_per_page WHERE user_id = $session_user_id");
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ if (isset($_GET['dismiss_notification'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Notification Dismissed";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ if (isset($_GET['dismiss_all_notifications'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "<strong>$num_notifications</strong> Notifications Dismissed";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -78,5 +78,5 @@ if (isset($_GET['deactivate_shared_item'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Share Link deactivated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ if (isset($_POST['add_account'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Account <strong>$name</strong> created ";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ if (isset($_POST['edit_account'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Account <strong>$name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ if (isset($_GET['archive_account'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Account <strong>$account_name</strong> archived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -85,6 +85,6 @@ if (isset($_GET['delete_account'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Account <strong>$account_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ if (isset($_POST['add_asset'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Asset <strong>$name</strong> created $alert_extended";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -116,7 +116,7 @@ if (isset($_POST['edit_asset'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Asset <strong>$name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -142,7 +142,7 @@ if (isset($_GET['archive_asset'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Asset <strong>$asset_name</strong> archived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -167,7 +167,7 @@ if (isset($_GET['unarchive_asset'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Asset <strong>$asset_name</strong> Unarchived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -193,7 +193,7 @@ if (isset($_GET['delete_asset'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Asset <strong>$asset_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -238,7 +238,7 @@ if (isset($_POST['bulk_assign_asset_location'])) {
|
|||
$_SESSION['alert_message'] = "You assigned <strong>$asset_count</strong> assets to location <strong>$location_name</strong>";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -278,7 +278,7 @@ if (isset($_POST['bulk_assign_asset_physical_location'])) {
|
|||
$_SESSION['alert_message'] = "You moved <strong>$asset_count</strong> assets to location <strong>$physical_location</strong>";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_transfer_client_asset'])) {
|
||||
|
|
@ -363,7 +363,7 @@ if (isset($_POST['bulk_transfer_client_asset'])) {
|
|||
$_SESSION['alert_message'] = "Transferred <strong>$asset_count</strong> assets to <strong>$new_client_name</strong>.";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_assign_asset_contact'])) {
|
||||
|
|
@ -407,7 +407,7 @@ if (isset($_POST['bulk_assign_asset_contact'])) {
|
|||
$_SESSION['alert_message'] = "You assigned <strong>$asset_count</strong> assets to contact <strong>$contact_name</strong>";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -447,7 +447,7 @@ if (isset($_POST['bulk_edit_asset_status'])) {
|
|||
$_SESSION['alert_message'] = "You set the status <strong>$status</strong> on <strong>$asset_count</strong> assets.";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -487,7 +487,7 @@ if (isset($_POST['bulk_archive_assets'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_unarchive_assets'])) {
|
||||
|
|
@ -525,7 +525,7 @@ if (isset($_POST['bulk_unarchive_assets'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_delete_assets'])) {
|
||||
|
|
@ -562,7 +562,7 @@ if (isset($_POST['bulk_delete_assets'])) {
|
|||
$_SESSION['alert_message'] = "Deleted <strong>$count</strong> asset(s)";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -593,7 +593,7 @@ if (isset($_POST['link_software_to_asset'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Software <strong>$software_name</strong> licensed for asset <strong>$asset_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -623,7 +623,7 @@ if (isset($_GET['unlink_software_from_asset'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Removed Software License <strong>$software_name</strong> for Asset <strong>$asset_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
// Right now 1 login and have many assets but not many to many
|
||||
|
|
@ -652,7 +652,7 @@ if (isset($_POST['link_asset_to_credential'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Asset <strong>$asset_name</strong> linked with credential <strong>$crdential_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -682,7 +682,7 @@ if (isset($_GET['unlink_credential_from_asset'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Credential <strong>$credential_name</strong> unlinked from Asset <strong>$asset_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -711,7 +711,7 @@ if (isset($_POST['link_service_to_asset'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Service <strong>$service_name</strong> linked with asset <strong>$asset_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -741,7 +741,7 @@ if (isset($_GET['unlink_service_from_asset'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Asset <strong>$asset_name</strong> unlinked from service <strong>$service_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -771,7 +771,7 @@ if (isset($_POST['link_asset_to_file'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Asset <strong>$asset_name</strong> linked with File <strong>$file_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -801,7 +801,7 @@ if (isset($_GET['unlink_asset_from_file'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Asset <strong>$asset_name</strong> unlinked from file <strong>$file_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -823,7 +823,7 @@ if (isset($_POST["import_assets_csv"])) {
|
|||
} else {
|
||||
$_SESSION['alert_message'] = "Please select a file to upload.";
|
||||
$_SESSION['alert_type'] = "error";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
@ -959,12 +959,12 @@ if (isset($_POST["import_assets_csv"])) {
|
|||
logAction("Asset", "Import", "$session_name imported $row_count asset(s) via CSV file", $client_id);
|
||||
|
||||
$_SESSION['alert_message'] = "$row_count Asset(s) added, $duplicate_count duplicate(s) detected";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
//Check for any errors, if there are notify user and redirect
|
||||
if ($error) {
|
||||
$_SESSION['alert_type'] = "warning";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1125,7 +1125,7 @@ if (isset($_POST['add_asset_interface'])) {
|
|||
|
||||
// 7) Alert message + redirect
|
||||
$_SESSION['alert_message'] = "Interface <strong>$name</strong> created";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
@ -1167,7 +1167,7 @@ if (isset($_POST['add_asset_multiple_interfaces'])) {
|
|||
|
||||
logAction("Asset Interface", "Bulk Create", "$session_name created $interfaces for asset $asset_name", $client_id, $asset_id);
|
||||
$_SESSION['alert_message'] = "Created <strong>$interfaces</strong> Interface(s) for asset <strong>$asset_name</strong>";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
@ -1244,7 +1244,7 @@ if (isset($_POST['edit_asset_interface'])) {
|
|||
|
||||
// 6) Alert and redirect
|
||||
$_SESSION['alert_message'] = "Interface <strong>$name</strong> edited";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
@ -1328,7 +1328,7 @@ if (isset($_POST['bulk_edit_asset_interface_type'])) {
|
|||
logAction("Asset Interface", "Bulk Edit", "$session_name set interface type to $type on $interface_count interfaces for asset $asset_name", $client_id);
|
||||
$_SESSION['alert_message'] = "Type set to <strong>$type</strong> on <strong>$interface_count</strong> interfaces.";
|
||||
}
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
@ -1374,7 +1374,7 @@ if (isset($_POST['bulk_edit_asset_interface_network'])) {
|
|||
logAction("Asset Interface", "Bulk Edit", "$session_name set network to $network_name on $interface_count interfaces for asset $asset_name", $client_id);
|
||||
$_SESSION['alert_message'] = "Network set to <strong>$network_name</strong> on <strong>$interface_count</strong> interfaces.";
|
||||
}
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
@ -1413,7 +1413,7 @@ if (isset($_POST['bulk_edit_asset_interface_ip_dhcp'])) {
|
|||
logAction("Asset Interface", "Bulk Edit", "$session_name set interface IP to DHCP on $interface_count interfaces for asset $asset_name", $client_id);
|
||||
$_SESSION['alert_message'] = "Interface IP set to <strong>DHCP</strong> on <strong>$interface_count</strong> interfaces.";
|
||||
}
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
@ -1453,7 +1453,7 @@ if (isset($_POST['bulk_delete_asset_interfaces'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "<strong>$interface_count</strong> interfaces deleted.";
|
||||
}
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
@ -1478,7 +1478,7 @@ if (isset($_POST["import_client_asset_interfaces_csv"])) {
|
|||
} else {
|
||||
$_SESSION['alert_message'] = "Please select a file to upload.";
|
||||
$_SESSION['alert_type'] = "error";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
@ -1566,12 +1566,12 @@ if (isset($_POST["import_client_asset_interfaces_csv"])) {
|
|||
logAction("Asset", "Import", "$session_name imported $row_count interfaces(s) to asset $asset_name via CSV file", $client_id);
|
||||
|
||||
$_SESSION['alert_message'] = "<strong>$row_count</strong> Interfaces(s) added to asset <strong>$asset_name</stong>, <strong>$duplicate_count</strong> duplicate(s) detected";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
//Check for any errors, if there are notify user and redirect
|
||||
if ($error) {
|
||||
$_SESSION['alert_type'] = "warning";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ if (isset($_POST['save_budget'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Budget Updated for $year";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
exit;
|
||||
}
|
||||
|
|
@ -60,6 +60,6 @@ if (isset($_POST['delete_budget'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Budget deleted for $year";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@ if (isset($_POST['add_category'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Category $type <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ if (isset($_POST['add_certificate'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Certificate <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ if (isset($_POST['edit_certificate'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Certificate <strong>$name</strong> updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -128,7 +128,7 @@ if (isset($_GET['archive_certificate'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Certificate <strong>$certificate_name</strong> archived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -151,7 +151,7 @@ if (isset($_GET['unarchive_certificate'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Certificate <strong>$certificate_name</strong> restored";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ if (isset($_GET['delete_certificate'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Certificate <strong>$certificate_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -213,7 +213,7 @@ if (isset($_POST['bulk_delete_certificates'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['export_certificates_csv'])) {
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ if (isset($_POST['edit_client'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Client <strong>$name</strong> updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['archive_client'])) {
|
||||
|
|
@ -181,7 +181,7 @@ if (isset($_GET['archive_client'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Client <strong>$client_name</strong> archived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['restore_client'])) {
|
||||
|
|
@ -203,7 +203,7 @@ if (isset($_GET['restore_client'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Client <strong>$client_name</strong> restored";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['delete_client'])) {
|
||||
|
|
@ -366,7 +366,7 @@ if (isset($_POST["import_clients_csv"])) {
|
|||
} else {
|
||||
$_SESSION['alert_message'] = "Please select a file to upload.";
|
||||
$_SESSION['alert_type'] = "error";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
@ -554,14 +554,14 @@ if (isset($_POST["import_clients_csv"])) {
|
|||
logAction("Client", "Import", "$session_name imported $row_count client(s) via CSV file, $duplicate_count duplicate(s) found");
|
||||
|
||||
$_SESSION['alert_message'] = "<strong>$row_count</strong> Client(s) added, <strong>$duplicate_count</strong> duplicate(s) found";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
//Check for any errors, if there are notify user and redirect
|
||||
if ($error) {
|
||||
$_SESSION['alert_type'] = "warning";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -622,7 +622,7 @@ if (isset($_POST['bulk_edit_client_industry'])) {
|
|||
$_SESSION['alert_message'] = "Set the Industry to <strong>$industry</strong> for <strong>$count</strong> clients";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -658,7 +658,7 @@ if (isset($_POST['bulk_edit_client_referral'])) {
|
|||
$_SESSION['alert_message'] = "Set the Referral to <strong>$referral</strong> for <strong>$count</strong> clients";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -694,7 +694,7 @@ if (isset($_POST['bulk_edit_client_hourly_rate'])) {
|
|||
$_SESSION['alert_message'] = "Set the Hourly Rate to <strong>" . numfmt_format_currency($currency_format, $rate, $session_company_currency) . "</strong> for <strong>$count</strong> client(s)";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -739,7 +739,7 @@ if (isset($_POST['bulk_assign_client_tags'])) {
|
|||
$_SESSION['alert_message'] = "Assigned tags for <strong>$count</strong> clients";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -825,7 +825,7 @@ if (isset($_POST['bulk_send_client_email']) && isset($_POST['client_ids'])) {
|
|||
}
|
||||
|
||||
// Redirect back
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
@ -863,7 +863,7 @@ if (isset($_POST['bulk_archive_clients'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_unarchive_clients'])) {
|
||||
|
|
@ -898,7 +898,7 @@ if (isset($_POST['bulk_unarchive_clients'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST["export_client_pdf"])) {
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ if (isset($_POST['add_contact'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Contact <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -214,7 +214,7 @@ if (isset($_POST['edit_contact'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Contact <strong>$name</strong> updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -241,7 +241,7 @@ if (isset($_POST['add_contact_note'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Note <strong>$type</strong> created for <strong>$contact_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -268,7 +268,7 @@ if (isset($_GET['archive_contact_note'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Note <strong>$contact_note_type</strong> archived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -293,7 +293,7 @@ if (isset($_GET['unarchive_contact_note'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Note <strong>$contact_note_type</strong> restored";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -319,7 +319,7 @@ if (isset($_GET['delete_contact_note'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Note <strong>$contact_note_type</strong> deleted.";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -362,7 +362,7 @@ if (isset($_POST['bulk_assign_contact_location'])) {
|
|||
$_SESSION['alert_message'] = "You assigned <b>$contact_count</b> contacts to location <b>$location_name</b>";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -399,7 +399,7 @@ if (isset($_POST['bulk_edit_contact_phone'])) {
|
|||
$_SESSION['alert_message'] = "You set Phone Number <b>" . formatPhoneNumber($phone) . "</b> on $contact_count</b> contacts";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -437,7 +437,7 @@ if (isset($_POST['bulk_edit_contact_department'])) {
|
|||
$_SESSION['alert_message'] = "You set the Department to <strong>$department</strong> for <strong>$contact_count</strong> contacts";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -479,7 +479,7 @@ if (isset($_POST['bulk_edit_contact_role'])) {
|
|||
$_SESSION['alert_message'] = "You updated contact roles for <b>$contact_count</b> contacts";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -530,7 +530,7 @@ if (isset($_POST['bulk_assign_contact_tags'])) {
|
|||
$_SESSION['alert_message'] = "You assigned tags for <strong>$count</strong> contacts";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -576,7 +576,7 @@ if (isset($_POST['send_bulk_mail_now'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -628,7 +628,7 @@ if (isset($_POST['bulk_archive_contacts'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_unarchive_contacts'])) {
|
||||
|
|
@ -672,7 +672,7 @@ if (isset($_POST['bulk_unarchive_contacts'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_delete_contacts'])) {
|
||||
|
|
@ -716,7 +716,7 @@ if (isset($_POST['bulk_delete_contacts'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['anonymize_contact'])) {
|
||||
|
|
@ -818,7 +818,7 @@ if (isset($_GET['anonymize_contact'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Contact $contact_name anonymized & archived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['archive_contact'])) {
|
||||
|
|
@ -848,7 +848,7 @@ if (isset($_GET['archive_contact'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Contact <strong>$contact_name</strong> has been archived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -877,7 +877,7 @@ if (isset($_GET['unarchive_contact'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Contact <strong>$contact_name</strong> has been Unarchived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -907,7 +907,7 @@ if (isset($_GET['delete_contact'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Contact <strong>$contact_name</strong> has been deleted.";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -936,7 +936,7 @@ if (isset($_POST['link_contact_to_asset'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Contact <strong>$contact_name</strong> linked with asset <strong>$asset_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -966,7 +966,7 @@ if (isset($_GET['unlink_asset_from_contact'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Asset <strong>$asset_name</strong> unlinked from Contact <strong>$contact_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -995,7 +995,7 @@ if (isset($_POST['link_software_to_contact'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Software <strong>$software_name</strong> licensed for contact <strong>$contact_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1025,7 +1025,7 @@ if (isset($_GET['unlink_software_from_contact'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Removed Software License <strong>$software_name</strong> for Contact <strong>$contact_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1054,7 +1054,7 @@ if (isset($_POST['link_contact_to_credential'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Contact <strong>$contact_name</strong> linked with credential <strong>$credential_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1084,7 +1084,7 @@ if (isset($_GET['unlink_credential_from_contact'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Credential <strong>$credential_name</strong> unlinked from Contact <strong>$contact_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1113,7 +1113,7 @@ if (isset($_POST['link_service_to_contact'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "service <strong>$service_name</strong> linked with contact <strong>$contact_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1143,7 +1143,7 @@ if (isset($_GET['unlink_service_from_contact'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Contact <strong>$contact_name</strong> unlinked from service <strong>$service_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1173,7 +1173,7 @@ if (isset($_POST['link_contact_to_file'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Contact <strong>$contact_name</strong> linked with File <strong>$file_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1203,7 +1203,7 @@ if (isset($_GET['unlink_contact_from_file'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Contact <strong>$contact_name</strong> unlinked from file <strong>$file_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1271,7 +1271,7 @@ if (isset($_POST["import_contacts_csv"])) {
|
|||
} else {
|
||||
$_SESSION['alert_message'] = "Please select a file to upload.";
|
||||
$_SESSION['alert_type'] = "error";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
@ -1353,12 +1353,12 @@ if (isset($_POST["import_contacts_csv"])) {
|
|||
logAction("Contact", "Import", "$session_name imported $row_count contact(s) via CSV file", $client_id);
|
||||
|
||||
$_SESSION['alert_message'] = "$row_count Contact(s) added, $duplicate_count duplicate(s) detected";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
//Check for any errors, if there are notify user and redirect
|
||||
if ($error) {
|
||||
$_SESSION['alert_type'] = "warning";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ if (isset($_POST['add_credential'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Credential <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ if (isset($_POST['edit_credential'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Credential <strong>$name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ if(isset($_GET['archive_credential'])){
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Credential <strong>$credential_name</strong> archived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -117,7 +117,7 @@ if(isset($_GET['unarchive_credential'])){
|
|||
|
||||
$_SESSION['alert_message'] = "Credential <strong>$credential_name</strong> restored";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['delete_credential'])) {
|
||||
|
|
@ -140,7 +140,7 @@ if (isset($_GET['delete_credential'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Credential <strong>$credential_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -191,7 +191,7 @@ if (isset($_POST['bulk_assign_credential_tags'])) {
|
|||
logAction("Credential", "Bulk Edit", "$session_name added tags to $count credentials", $client_id);
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -230,7 +230,7 @@ if (isset($_POST['bulk_archive_credentials'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_unarchive_credentials'])) {
|
||||
|
|
@ -269,7 +269,7 @@ if (isset($_POST['bulk_unarchive_credentials'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_delete_credentials'])) {
|
||||
|
|
@ -309,7 +309,7 @@ if (isset($_POST['bulk_delete_credentials'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['export_credentials_csv'])) {
|
||||
|
|
@ -379,7 +379,7 @@ if (isset($_POST["import_credentials_csv"])) {
|
|||
} else {
|
||||
$_SESSION['alert_message'] = "Please select a file to upload.";
|
||||
$_SESSION['alert_type'] = "error";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
@ -447,12 +447,12 @@ if (isset($_POST["import_credentials_csv"])) {
|
|||
logAction("Credential", "Import", "$session_name imported $row_count credential(s) via CSV file. $duplicate_count duplicate(s) found and not imported", $client_id);
|
||||
|
||||
$_SESSION['alert_message'] = "$row_count credential(s) imported, $duplicate_count duplicate(s) detected and not imported";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
//Check for any errors, if there are notify user and redirect
|
||||
if ($error) {
|
||||
$_SESSION['alert_type'] = "warning";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,5 +25,5 @@ if (isset($_POST['add_credit'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "" . numfmt_format_currency($currency_format, $amount, $session_company_currency) . " Credit Added ";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ if (isset($_POST['add_document'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Document <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -148,7 +148,7 @@ if (isset($_POST['move_document'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Document <strong>$document_name</strong> moved to folder <strong>$folder_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -174,7 +174,7 @@ if (isset($_POST['rename_document'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "You renamed Document from <strong>$old_document_name</strong> to <strong>$name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -215,7 +215,7 @@ if (isset($_POST['bulk_move_document'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "You moved <strong>$count</strong> document(s) to the folder <strong>$folder_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -245,7 +245,7 @@ if (isset($_POST['link_file_to_document'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "File <strong>$file_name</strong> linked with Document <strong>$document_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -275,7 +275,7 @@ if (isset($_GET['unlink_file_from_document'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "File <strong>$file_name</strong> unlinked from Document <strong>$document_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -305,7 +305,7 @@ if (isset($_POST['link_vendor_to_document'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Vendor <strong>$vendor_name</strong> linked with Document <strong>$document_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -335,7 +335,7 @@ if (isset($_GET['unlink_vendor_from_document'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Vendor <strong>$vendor_name</strong> unlinked from Document <strong>$document_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -366,7 +366,7 @@ if (isset($_POST['link_contact_to_document'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Contact <strong>$contact_name</strong> linked with Document <strong>$document_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -396,7 +396,7 @@ if (isset($_GET['unlink_contact_from_document'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Contact <strong>$contact_name</strong> unlinked from Document <strong>$document_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -426,7 +426,7 @@ if (isset($_POST['link_asset_to_document'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Asset <strong>$asset_name</strong> linked with Document <strong>$document_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -456,7 +456,7 @@ if (isset($_GET['unlink_asset_from_document'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Asset <strong>$asset_name</strong> unlinked from Document <strong>$document_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -486,7 +486,7 @@ if (isset($_POST['link_software_to_document'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Software <strong>$software_name</strong> linked with Document <strong>$document_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -516,7 +516,7 @@ if (isset($_GET['unlink_software_from_document'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Software <strong>$software_name</strong> unlinked from Document <strong>$document_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -546,7 +546,7 @@ if (isset($_POST['toggle_document_visibility'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Document <strong>$document_name</strong> changed to <strong>$visable_wording</strong> in the client portal";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -590,7 +590,7 @@ if (isset($_GET['export_document'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Document <strong>$document_name</strong> exported";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -633,7 +633,7 @@ if (isset($_GET['archive_document'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Document <strong>$document_name</strong> archived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -657,7 +657,7 @@ if (isset($_GET['delete_document_version'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Document $document_version_name version deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -684,7 +684,7 @@ if (isset($_GET['delete_document'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Document <strong>$document_name</strong> deleted and all versions";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -725,6 +725,6 @@ if (isset($_POST['bulk_delete_documents'])) {
|
|||
$_SESSION['alert_message'] = "Deleted <strong>$count</strong> Documents and associated document versions";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ if (isset($_POST['add_domain'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Domain <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ if (isset($_POST['edit_domain'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Domain <strong>$name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -167,7 +167,7 @@ if (isset($_GET['archive_domain'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Domain <strong>$domain_name archived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if(isset($_GET['unarchive_domain'])){
|
||||
|
|
@ -189,7 +189,7 @@ if(isset($_GET['unarchive_domain'])){
|
|||
|
||||
$_SESSION['alert_message'] = "Domain <strong>$domain_name</strong> restored";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['delete_domain'])) {
|
||||
|
|
@ -212,7 +212,7 @@ if (isset($_GET['delete_domain'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Domain <strong>$domain_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -250,7 +250,7 @@ if (isset($_POST['bulk_archive_domains'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_unarchive_domains'])) {
|
||||
|
|
@ -287,7 +287,7 @@ if (isset($_POST['bulk_unarchive_domains'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_delete_domains'])) {
|
||||
|
|
@ -324,7 +324,7 @@ if (isset($_POST['bulk_delete_domains'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['export_domains_csv'])) {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ if (isset($_POST['add_calendar'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Calendar <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ if (isset($_POST['edit_calendar'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Calendar <strong>$name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -111,7 +111,7 @@ if (isset($_POST['add_event'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Event <strong>$title</strong> created in calendar <strong>$calendar_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -179,7 +179,7 @@ if (isset($_POST['edit_event'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Calendar event titled <strong>$title</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -200,6 +200,6 @@ if (isset($_GET['delete_event'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Calendar event titled <strong>$event_title</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ if (isset($_POST['add_expense'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Expense added" . $extended_alert_description;
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ if (isset($_POST['edit_expense'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Expense modified" . $extended_alert_description;
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ if (isset($_GET['delete_expense'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Expense deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -144,7 +144,7 @@ if (isset($_POST['bulk_edit_expense_category'])) {
|
|||
$_SESSION['alert_message'] = "You assigned expense category <strong>$category_name</strong> to <strong>$count</strong> expense(s)";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_edit_expense_account'])) {
|
||||
|
|
@ -184,7 +184,7 @@ if (isset($_POST['bulk_edit_expense_account'])) {
|
|||
$_SESSION['alert_message'] = "You assigned account <strong>$account_name</strong> to <strong>$count</strong> expense(s)";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_edit_expense_client'])) {
|
||||
|
|
@ -220,7 +220,7 @@ if (isset($_POST['bulk_edit_expense_client'])) {
|
|||
$_SESSION['alert_message'] = "You assigned Client <b>$client_name</b> to <b>$expense_count</b> expenses";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_delete_expenses'])) {
|
||||
|
|
@ -260,7 +260,7 @@ if (isset($_POST['bulk_delete_expenses'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['export_expenses_csv'])) {
|
||||
|
|
@ -377,7 +377,7 @@ if (isset($_POST['create_recurring_expense'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Recurring Expense created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -408,7 +408,7 @@ if (isset($_POST['edit_recurring_expense'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Recurring Expense edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -429,6 +429,6 @@ if (isset($_GET['delete_recurring_expense'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Recurring Expense deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ if (isset($_POST['upload_files'])) {
|
|||
}
|
||||
|
||||
// Redirect after processing
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
@ -223,7 +223,7 @@ if (isset($_POST['rename_file'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Renamed file <strong>$old_file_name</strong> to <strong>$file_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -252,7 +252,7 @@ if (isset($_POST['move_file'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "File <strong>$file_name</strong> moved to <strong>$folder_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -276,7 +276,7 @@ if (isset($_GET['archive_file'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "File <strong>$file_name</strong> archived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -312,7 +312,7 @@ if (isset($_POST['delete_file'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "File <strong>$file_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -361,7 +361,7 @@ if (isset($_POST['bulk_delete_files'])) {
|
|||
$_SESSION['alert_message'] = "You deleted <strong>$file_count</strong> files";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -404,7 +404,7 @@ if (isset($_POST['bulk_move_files'])) {
|
|||
$_SESSION['alert_message'] = "Moved <strong>$file_count</strong> files to the folder <strong>$folder_name</strong>";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -434,7 +434,7 @@ if (isset($_POST['link_asset_to_file'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Asset <strong>$asset_name</strong> linked to File <strong>$file_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -463,6 +463,6 @@ if (isset($_GET['unlink_asset_from_file'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Asset <strong>$asset_name</strong> unlinked from File <strong>$file_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ if (isset($_POST['create_folder'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Folder <strong>$folder_name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -49,7 +49,7 @@ if (isset($_POST['rename_folder'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Folder <strong>$old_folder_name</strong> renamed to <strong>$folder_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -81,6 +81,6 @@ if (isset($_GET['delete_folder'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Folder <strong>$folder_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ if (isset($_POST['edit_invoice'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Invoice <strong>$invoice_prefix$invoice_number</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -254,7 +254,7 @@ if (isset($_POST['edit_recurring_invoice'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Recurring Invoice <strong>$recurring_invoice_prefix$recurring_invoice_number</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -291,7 +291,7 @@ if (isset($_GET['delete_recurring_invoice'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Recurring Invoice <strong>$recurring_invoice_prefix$recurring_invoice_number</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -344,7 +344,7 @@ if (isset($_POST['add_recurring_invoice_item'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Item <srrong>$name</strong> added to Recurring Invoice";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -367,7 +367,7 @@ if (isset($_POST['recurring_invoice_note'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Notes added";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -400,7 +400,7 @@ if (isset($_GET['delete_recurring_invoice_item'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Item <strong>$item_name</strong> removed";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -424,7 +424,7 @@ if (isset($_GET['mark_invoice_sent'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Invoice marked sent";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
if (isset($_GET['mark_invoice_non-billable'])) {
|
||||
|
|
@ -447,7 +447,7 @@ if (isset($_GET['mark_invoice_non-billable'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Invoice marked Non-Billable";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -472,7 +472,7 @@ if (isset($_GET['cancel_invoice'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Invoice <strong>$invoice_prefix$invoice_number</strong> cancelled";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -518,7 +518,7 @@ if (isset($_GET['delete_invoice'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Invoice <strong>$invoice_prefix$invoice_number</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -572,7 +572,7 @@ if (isset($_POST['add_invoice_item'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Item <strong>$name</strong> added to invoice";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -595,7 +595,7 @@ if (isset($_POST['invoice_note'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Notes added";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -692,7 +692,7 @@ if (isset($_POST['edit_item'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Item <strong>$name</strong> updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -727,7 +727,7 @@ if (isset($_GET['delete_invoice_item'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Item <strong>$item_name</strong> removed from invoice";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -748,7 +748,7 @@ if (isset($_POST['add_payment'])) {
|
|||
//Check to see if amount entered is greater than the balance of the invoice
|
||||
if ($amount > $balance) {
|
||||
$_SESSION['alert_message'] = "Payment is more than the balance";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
} else {
|
||||
mysqli_query($mysqli,"INSERT INTO payments SET payment_date = '$date', payment_amount = $amount, payment_currency_code = '$currency_code', payment_account_id = $account, payment_method = '$payment_method', payment_reference = '$reference', payment_invoice_id = $invoice_id");
|
||||
|
||||
|
|
@ -890,7 +890,7 @@ if (isset($_POST['add_payment'])) {
|
|||
|
||||
$_SESSION['alert_message'] .= "Payment amount <strong>" . numfmt_format_currency($currency_format, $amount, $invoice_currency_code) . "</strong> added";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1018,17 +1018,17 @@ if (isset($_GET['add_payment_stripe'])) {
|
|||
if (!$config_stripe_enable || !$stripe_id || !$stripe_pm) {
|
||||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Stripe not enabled or no client card saved";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
} elseif ($invoice_status !== 'Sent' && $invoice_status !== 'Viewed') {
|
||||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Invalid invoice state (draft/partial/paid/not billable)";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
} elseif ($invoice_amount == 0) {
|
||||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Invalid invoice amount";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
@ -1137,14 +1137,14 @@ if (isset($_GET['add_payment_stripe'])) {
|
|||
customAction('invoice_pay', $invoice_id);
|
||||
|
||||
$_SESSION['alert_message'] .= "Payment amount <strong>" . numfmt_format_currency($currency_format, $invoice_amount, $invoice_currency_code) . "</strong> added";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
} else {
|
||||
mysqli_query($mysqli, "INSERT INTO history SET history_status = 'Payment failed', history_description = 'Stripe pay failed due to payment error', history_invoice_id = $invoice_id");
|
||||
logAction("Invoice", "Payment", "Failed online payment amount of invoice $invoice_prefix$invoice_number due to Stripe payment error", $client_id, $invoice_id);
|
||||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Payment failed";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
@ -1169,7 +1169,7 @@ if (isset($_POST['add_bulk_payment'])) {
|
|||
if ($bulk_payment_amount > $total_account_balance) {
|
||||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Payment exceeds Client Balance.";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
@ -1281,7 +1281,7 @@ if (isset($_POST['add_bulk_payment'])) {
|
|||
$_SESSION['alert_message'] .= "Bulk Payment added";
|
||||
|
||||
// Redirect Back
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['delete_payment'])) {
|
||||
|
|
@ -1335,7 +1335,7 @@ if (isset($_GET['delete_payment'])) {
|
|||
$_SESSION['alert_message'] = "Payment deleted - Stripe payments must be manually refunded in Stripe";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1461,7 +1461,7 @@ if (isset($_GET['email_invoice'])) {
|
|||
|
||||
addToMailQueue($data);
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1491,7 +1491,7 @@ if (isset($_POST['add_recurring_payment'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Automatic Payment created for <strong>$recurring_invoice_prefix$recurring_invoice_number</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['delete_recurring_payment'])) {
|
||||
|
|
@ -1516,7 +1516,7 @@ if (isset($_GET['delete_recurring_payment'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Auto Payment Removed for Recurring Invoice <strong>$recurring_invoice_prefix$recurring_invoice_number</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1671,7 +1671,7 @@ if (isset($_GET['force_recurring'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Recurring Invoice Forced";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1725,7 +1725,7 @@ if (isset($_POST['set_recurring_payment'])) {
|
|||
$_SESSION['alert_message'] = "Automatic Payment <strong>Disabled</strong> for Recurring Invoice $recurring_invoice_prefix$recurring_invoice_number";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['export_invoices_csv'])) {
|
||||
|
|
@ -1908,7 +1908,7 @@ if (isset($_GET['recurring_invoice_email_notify'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Email Notifications <strong>$notify_wording</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['link_invoice_to_ticket'])) {
|
||||
|
|
@ -1919,7 +1919,7 @@ if (isset($_POST['link_invoice_to_ticket'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Invoice linked to ticket";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['add_ticket_to_invoice'])) {
|
||||
|
|
@ -2191,5 +2191,5 @@ if (isset($_POST['bulk_edit_invoice_category'])) {
|
|||
$_SESSION['alert_message'] = "Assigned income category <strong>$category_name</strong> to <strong>$count</strong> invoice(s)";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
|
@ -56,7 +56,7 @@ if(isset($_POST['add_location'])){
|
|||
|
||||
$_SESSION['alert_message'] = "Location <strong>$name</strong> created.";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -121,7 +121,7 @@ if(isset($_POST['edit_location'])){
|
|||
|
||||
$_SESSION['alert_message'] = "Location <strong>$name</strong> updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -145,7 +145,7 @@ if(isset($_GET['archive_location'])){
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Location <strong>$location_name</strong> archived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -168,7 +168,7 @@ if(isset($_GET['unarchive_location'])){
|
|||
|
||||
$_SESSION['alert_message'] = "Location <strong>$location_name</strong> restored";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if(isset($_GET['delete_location'])){
|
||||
|
|
@ -192,7 +192,7 @@ if(isset($_GET['delete_location'])){
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Location <strong>$location_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -243,7 +243,7 @@ if (isset($_POST['bulk_assign_location_tags'])) {
|
|||
$_SESSION['alert_message'] = "Assigned tags for <strong>$count</strong> locations";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -286,7 +286,7 @@ if (isset($_POST['bulk_archive_locations'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_unarchive_locations'])) {
|
||||
|
|
@ -323,7 +323,7 @@ if (isset($_POST['bulk_unarchive_locations'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_delete_locations'])) {
|
||||
|
|
@ -361,7 +361,7 @@ if (isset($_POST['bulk_delete_locations'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if(isset($_POST['export_locations_csv'])){
|
||||
|
|
@ -425,7 +425,7 @@ if (isset($_POST["import_locations_csv"])) {
|
|||
} else {
|
||||
$_SESSION['alert_message'] = "Please select a file to upload.";
|
||||
$_SESSION['alert_type'] = "error";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
@ -502,12 +502,12 @@ if (isset($_POST["import_locations_csv"])) {
|
|||
logAction("Location", "Import", "$session_name imported $row_count location(s). $duplicate_count duplicate(s) found and not imported", $client_id);
|
||||
|
||||
$_SESSION['alert_message'] = "$row_count Location(s) imported, $duplicate_count duplicate(s) detected and not imported";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
//Check for any errors, if there are notify user and redirect
|
||||
if($error) {
|
||||
$_SESSION['alert_type'] = "warning";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ if (isset($_POST['add_network'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Network <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ if (isset($_POST['edit_network'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Network <strong>$name</strong> updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ if (isset($_GET['archive_network'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Network <strong>$network_name</strong> archived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ if (isset($_GET['unarchive_network'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Network <strong>$network_name</strong> restored";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ if (isset($_GET['delete_network'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Network <strong>$network_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -148,7 +148,7 @@ if (isset($_POST['bulk_delete_networks'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['export_networks_csv'])) {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ if (isset($_POST['add_product'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Product <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ if (isset($_POST['edit_product'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Product <strong>$name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ if (isset($_GET['archive_product'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Product <strong>$product_name</strong> archived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ if (isset($_GET['unarchive_product'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Product <strong>$product_name</strong> restored";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ if (isset($_GET['delete_product'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Product <strong>$product_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -151,7 +151,7 @@ if (isset($_POST['bulk_edit_product_category'])) {
|
|||
$_SESSION['alert_message'] = "Assigned category <strong>$category_name</strong> to <strong>$count</strong> product(s)";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_archive_products'])) {
|
||||
|
|
@ -188,7 +188,7 @@ if (isset($_POST['bulk_archive_products'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_unarchive_products'])) {
|
||||
|
|
@ -223,7 +223,7 @@ if (isset($_POST['bulk_unarchive_products'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_delete_products'])) {
|
||||
|
|
@ -258,7 +258,7 @@ if (isset($_POST['bulk_delete_products'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ if (isset($_POST['edit_your_user_details'])) {
|
|||
header('Location: post.php?logout');
|
||||
}
|
||||
else{
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -99,7 +99,7 @@ if (isset($_GET['clear_your_user_avatar'])) {
|
|||
logAction("User Account", "Edit", "$session_name cleared their avatar");
|
||||
|
||||
$_SESSION['alert_message'] = "Avatar cleared";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['edit_your_user_password'])) {
|
||||
|
|
@ -190,7 +190,7 @@ if (isset($_POST['edit_your_user_preferences'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "User preferences updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['enable_mfa'])) {
|
||||
|
|
@ -267,7 +267,7 @@ if (isset($_GET['disable_mfa'])){
|
|||
if ($session_user_config_force_mfa) {
|
||||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Multi-Factor authentication cannot be disabled for your account";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
@ -308,7 +308,7 @@ if (isset($_GET['disable_mfa'])){
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Multi-Factor authentication disabled";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -326,6 +326,6 @@ if (isset($_POST['revoke_your_2fa_remember_tokens'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Remember me tokens revoked";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ if (isset($_POST['add_project'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "You created Project <strong>$project_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['edit_project'])) {
|
||||
|
|
@ -96,7 +96,7 @@ if (isset($_POST['edit_project'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Project <strong>$project_name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['close_project'])) {
|
||||
|
|
@ -118,7 +118,7 @@ if (isset($_GET['close_project'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Project <strong>$project_name</strong> closed";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['archive_project'])) {
|
||||
|
|
@ -141,7 +141,7 @@ if (isset($_GET['archive_project'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Project <strong>$project_name</strong> archived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['unarchive_project'])) {
|
||||
|
|
@ -163,7 +163,7 @@ if (isset($_GET['unarchive_project'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Project <strong>$project_name</strong> unarchived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['delete_project'])) {
|
||||
|
|
@ -189,7 +189,7 @@ if (isset($_GET['delete_project'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Project <strong>$project_name</strong> Deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['link_ticket_to_project'])) {
|
||||
|
|
@ -232,7 +232,7 @@ if (isset($_POST['link_ticket_to_project'])) {
|
|||
$_SESSION['alert_message'] = "<strong>$count</strong> Ticket(s) added to <strong>$project_name</strong>";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['link_closed_ticket_to_project'])) {
|
||||
|
|
@ -251,7 +251,7 @@ if (isset($_POST['link_closed_ticket_to_project'])) {
|
|||
$sql = mysqli_query($mysqli, "SELECT ticket_id, ticket_prefix, ticket_number, ticket_subject, ticket_updated_at FROM tickets WHERE ticket_number = $ticket_number");
|
||||
if (mysqli_num_rows($sql) == 0) {
|
||||
$_SESSION['alert_message'] = "Cannot merge into that ticket.";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
}
|
||||
$row = mysqli_fetch_array($sql);
|
||||
|
|
@ -267,5 +267,5 @@ if (isset($_POST['link_closed_ticket_to_project'])) {
|
|||
logAction("Project", "Edit", "$session_name added ticket $ticket_prefix$ticket_number - $ticket_subject to project $project_name", $client_id, $project_id);
|
||||
|
||||
$_SESSION['alert_message'] = "Ticket added to <strong>$project_name</strong>";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
|
@ -219,7 +219,7 @@ if (isset($_POST['add_quote_item'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Item <strong>$name</strong> added";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -244,7 +244,7 @@ if (isset($_POST['quote_note'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Notes added";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -279,7 +279,7 @@ if (isset($_POST['edit_quote'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Quote edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -359,7 +359,7 @@ if (isset($_GET['delete_quote_item'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Item <strong>$item_name</strong> removed";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -384,7 +384,7 @@ if (isset($_GET['mark_quote_sent'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Quote marked sent";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -411,7 +411,7 @@ if (isset($_GET['accept_quote'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Quote accepted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -439,7 +439,7 @@ if (isset($_GET['decline_quote'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Quote declined";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -518,7 +518,7 @@ if (isset($_GET['email_quote'])) {
|
|||
mysqli_query($mysqli,"UPDATE quotes SET quote_status = 'Sent' WHERE quote_id = $quote_id");
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -543,7 +543,7 @@ if (isset($_GET['mark_quote_invoiced'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Quote marked invoiced";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -596,7 +596,7 @@ if(isset($_POST['export_quotes_csv'])){
|
|||
|
||||
$_SESSION['alert_message'] = "Exported <strong>$num_rows</strong> quote(s)";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
exit;
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ if (isset($_POST['add_rack'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Rack <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ if (isset($_POST['edit_rack'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Rack <strong>$name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -113,7 +113,7 @@ if (isset($_GET['archive_rack'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Rack <strong>$rack_name</strong> archived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ if (isset($_GET['unarchive_rack'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Rack <strong>$rack_name</strong> Unarchived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -166,7 +166,7 @@ if (isset($_GET['delete_rack'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Rack <strong>$rack_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -191,7 +191,7 @@ if (isset($_POST['add_rack_unit'])) {
|
|||
if ($unit_start > $unit_end) {
|
||||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Unit Start number cannot be higher than Unit End number.";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
@ -202,7 +202,7 @@ if (isset($_POST['add_rack_unit'])) {
|
|||
// If there is an overlap, return an error message
|
||||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Units $unit_start to $unit_end are already in use by another device.";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
@ -216,7 +216,7 @@ if (isset($_POST['add_rack_unit'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Device <strong>$name</strong> added to units $unit_start - $unit_end in rack.";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['edit_rack_unit'])) {
|
||||
|
|
@ -244,7 +244,7 @@ if (isset($_POST['edit_rack_unit'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Device $name edited on the rack";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -270,6 +270,6 @@ if (isset($_GET['remove_rack_unit'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Device <strong>$device_name</strong> removed from rack";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
@ -27,7 +27,7 @@ if (isset($_POST['add_revenue'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Revenue added";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ if (isset($_POST['edit_revenue'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Revenue edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -74,6 +74,6 @@ if (isset($_GET['delete_revenue'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Revenue removed";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ if (isset($_POST['add_service'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Service <strong>$service_name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -163,7 +163,7 @@ if (isset($_POST['edit_service'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Service <strong>$service_name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -189,6 +189,6 @@ if (isset($_GET['delete_service'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Service <strong>$service_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ if (isset($_POST['add_software_from_template'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Software <strong>$name</strong> created from template";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -95,7 +95,7 @@ if (isset($_POST['add_software'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Software <strong>$name</strong> created $alert_extended";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -155,7 +155,7 @@ if (isset($_POST['edit_software'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Software <strong>$name</strong> updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -183,7 +183,7 @@ if (isset($_GET['archive_software'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Software <strong>$software_name</strong> archived and removed all device/user license associations";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -207,7 +207,7 @@ if (isset($_GET['delete_software'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Software <strong>$software_name</strong> deleted and removed all device/user license associations";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@ if (isset($_POST['add_tag'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Tag <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ if (isset($_POST['add_task'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "You created Task <strong>$task_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['edit_ticket_task'])) {
|
||||
|
|
@ -50,7 +50,7 @@ if (isset($_POST['edit_ticket_task'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Task <strong>$task_name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['edit_ticket_template_task'])) {
|
||||
|
|
@ -69,7 +69,7 @@ if (isset($_POST['edit_ticket_template_task'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Task <strong>$task_name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ if (isset($_GET['delete_task'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Task <strong>$task_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['complete_task'])) {
|
||||
|
|
@ -128,7 +128,7 @@ if (isset($_GET['complete_task'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Task <strong>$task_name</strong> Completed";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['undo_complete_task'])) {
|
||||
|
|
@ -157,7 +157,7 @@ if (isset($_GET['undo_complete_task'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Task <strong>$task_name</strong> marked as incomplete";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -184,7 +184,7 @@ if (isset($_GET['complete_all_tasks'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Marked all tasks Complete";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['undo_complete_all_tasks'])) {
|
||||
|
|
@ -210,5 +210,5 @@ if (isset($_GET['undo_complete_all_tasks'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Marked all tasks Incomplete";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
|
@ -292,7 +292,7 @@ if (isset($_POST['edit_ticket'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Ticket <strong>$ticket_prefix$ticket_number</strong> updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['edit_ticket_priority'])) {
|
||||
|
|
@ -329,7 +329,7 @@ if (isset($_POST['edit_ticket_priority'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Priority updated from <strong>$original_priority</strong> to <strong>$priority</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['edit_ticket_contact'])) {
|
||||
|
|
@ -413,7 +413,7 @@ if (isset($_POST['edit_ticket_contact'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Contact changed from <strong>$original_contact_name</strong> to <strong>$contact_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['add_ticket_watcher'])) {
|
||||
|
|
@ -491,7 +491,7 @@ if (isset($_POST['add_ticket_watcher'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Added watcher(s)";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['delete_ticket_watcher'])) {
|
||||
|
|
@ -526,7 +526,7 @@ if (isset($_GET['delete_ticket_watcher'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Removed ticket watcher <strong>$watcher_email</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['delete_ticket_additional_asset'])) {
|
||||
|
|
@ -561,7 +561,7 @@ if (isset($_GET['delete_ticket_additional_asset'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Removed asset <strong>$asset_name</strong> from ticket.";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['edit_ticket_asset'])) {
|
||||
|
|
@ -592,7 +592,7 @@ if (isset($_POST['edit_ticket_asset'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Ticket <strong>$ticket_prefix$ticket_number</strong> asset updated to <strong>$asset_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['edit_ticket_vendor'])) {
|
||||
|
|
@ -623,7 +623,7 @@ if (isset($_POST['edit_ticket_vendor'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Set vendor to <strong>$vendor_name</strong> for ticket <strong>$ticket_prefix$ticket_number</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['assign_ticket'])) {
|
||||
|
|
@ -656,7 +656,7 @@ if (isset($_POST['assign_ticket'])) {
|
|||
if (!$agent_name) {
|
||||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Invalid agent!";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
|
@ -674,7 +674,7 @@ if (isset($_POST['assign_ticket'])) {
|
|||
if (!$ticket_subject) {
|
||||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Invalid ticket!";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
@ -724,7 +724,7 @@ if (isset($_POST['assign_ticket'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Ticket <strong>$ticket_prefix$ticket_number</strong> assigned to <strong>$agent_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['delete_ticket'])) {
|
||||
|
|
@ -817,7 +817,7 @@ if (isset($_POST['bulk_delete_tickets'])) {
|
|||
$_SESSION['alert_message'] = "Deleted <strong>$count</strong> ticket(s)";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_assign_ticket'])) {
|
||||
|
|
@ -865,7 +865,7 @@ if (isset($_POST['bulk_assign_ticket'])) {
|
|||
if (!$agent_name) {
|
||||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Invalid agent!";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
|
@ -919,7 +919,7 @@ if (isset($_POST['bulk_assign_ticket'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "You assigned <b>$ticket_count</b> Tickets to <b>$agent_name</b>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_edit_ticket_priority'])) {
|
||||
|
|
@ -964,7 +964,7 @@ if (isset($_POST['bulk_edit_ticket_priority'])) {
|
|||
$_SESSION['alert_message'] = "You updated the priority for <strong>$ticket_count</strong> Tickets to <strong>$priority</strong>";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_edit_ticket_category'])) {
|
||||
|
|
@ -1012,7 +1012,7 @@ if (isset($_POST['bulk_edit_ticket_category'])) {
|
|||
$_SESSION['alert_message'] = "Category set to $category_name for <strong>$ticket_count</strong> Tickets";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_merge_tickets'])) {
|
||||
|
|
@ -1028,7 +1028,7 @@ if (isset($_POST['bulk_merge_tickets'])) {
|
|||
$sql = mysqli_query($mysqli, "SELECT ticket_id FROM tickets WHERE ticket_number = $merge_into_ticket_number");
|
||||
if (mysqli_num_rows($sql) == 0) {
|
||||
$_SESSION['alert_message'] = "Cannot merge into that ticket.";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
}
|
||||
$merge_row = mysqli_fetch_array($sql);
|
||||
|
|
@ -1076,7 +1076,7 @@ if (isset($_POST['bulk_merge_tickets'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1212,7 +1212,7 @@ if (isset($_POST['bulk_resolve_tickets'])) {
|
|||
$_SESSION['alert_message'] .= " <strong>$skipped_count</strong> ticket(s) could not be resolved because they have open tasks.";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_ticket_reply'])) {
|
||||
|
|
@ -1362,7 +1362,7 @@ if (isset($_POST['bulk_ticket_reply'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Updated <strong>$ticket_count</strong> tickets";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1410,7 +1410,7 @@ if (isset($_POST['bulk_add_ticket_project'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_add_asset_ticket'])) {
|
||||
|
|
@ -1528,7 +1528,7 @@ if (isset($_POST['bulk_add_asset_ticket'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1689,7 +1689,7 @@ if (isset($_POST['add_ticket_reply'])) {
|
|||
// Logging
|
||||
logAction("Ticket", "Reply", "$session_name replied to ticket $ticket_prefix$ticket_number - $ticket_subject and was a $ticket_reply_type reply", $client_id, $ticket_id);
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['edit_ticket_reply'])) {
|
||||
|
|
@ -1710,7 +1710,7 @@ if (isset($_POST['edit_ticket_reply'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Ticket reply updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['redact_ticket_reply'])) {
|
||||
|
|
@ -1729,7 +1729,7 @@ if (isset($_POST['redact_ticket_reply'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Ticket reply redacted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['archive_ticket_reply'])) {
|
||||
|
|
@ -1746,7 +1746,7 @@ if (isset($_GET['archive_ticket_reply'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Ticket reply archived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['merge_ticket'])) {
|
||||
|
|
@ -1763,7 +1763,7 @@ if (isset($_POST['merge_ticket'])) {
|
|||
$sql = mysqli_query($mysqli, "SELECT ticket_prefix, ticket_number, ticket_subject, ticket_details FROM tickets WHERE ticket_id = $ticket_id");
|
||||
if (mysqli_num_rows($sql) == 0) {
|
||||
$_SESSION['alert_message'] = "No ticket with that ID found.";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
}
|
||||
// CURRENT ticket details
|
||||
|
|
@ -1778,7 +1778,7 @@ if (isset($_POST['merge_ticket'])) {
|
|||
$sql = mysqli_query($mysqli, "SELECT ticket_id FROM tickets WHERE ticket_number = $merge_into_ticket_number");
|
||||
if (mysqli_num_rows($sql) == 0) {
|
||||
$_SESSION['alert_message'] = "Cannot merge into that ticket.";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
}
|
||||
$merge_row = mysqli_fetch_array($sql);
|
||||
|
|
@ -1787,7 +1787,7 @@ if (isset($_POST['merge_ticket'])) {
|
|||
// Sanity check
|
||||
if ($ticket_number == $merge_into_ticket_number) {
|
||||
$_SESSION['alert_message'] = "Cannot merge into the same ticket.";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
@ -1811,7 +1811,7 @@ if (isset($_POST['merge_ticket'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Ticket merged into $ticket_prefix$merge_into_ticket_number";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['change_client_ticket'])) {
|
||||
|
|
@ -1835,7 +1835,7 @@ if (isset($_POST['change_client_ticket'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Ticket client updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['resolve_ticket'])) {
|
||||
|
|
@ -1930,7 +1930,7 @@ if (isset($_GET['resolve_ticket'])) {
|
|||
//End Mail IF
|
||||
|
||||
$_SESSION['alert_message'] = "Ticket resolved";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['close_ticket'])) {
|
||||
|
|
@ -2023,7 +2023,7 @@ if (isset($_GET['close_ticket'])) {
|
|||
//End Mail IF
|
||||
|
||||
$_SESSION['alert_message'] = "Ticket Closed, this cannot not be reopened but you may start another one";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['reopen_ticket'])) {
|
||||
|
|
@ -2040,7 +2040,7 @@ if (isset($_GET['reopen_ticket'])) {
|
|||
customAction('ticket_update', $ticket_id);
|
||||
|
||||
$_SESSION['alert_message'] = "Ticket re-opened";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['add_invoice_from_ticket'])) {
|
||||
|
|
@ -2220,7 +2220,7 @@ if (isset($_POST['add_recurring_ticket'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Recurring ticket <strong>$subject - $frequency</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['edit_recurring_ticket'])) {
|
||||
|
|
@ -2248,7 +2248,7 @@ if (isset($_POST['edit_recurring_ticket'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Recurring ticket <strong>$subject - $frequency</strong> updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['force_recurring_ticket'])) {
|
||||
|
|
@ -2374,12 +2374,12 @@ if (isset($_GET['force_recurring_ticket'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Recurring Ticket Forced";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
} else {
|
||||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Recurring Ticket Force failed";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -2408,7 +2408,7 @@ if (isset($_GET['delete_recurring_ticket'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Recurring ticket <strong>$subject - $frequency</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_delete_recurring_tickets'])) {
|
||||
|
|
@ -2437,7 +2437,7 @@ if (isset($_POST['bulk_delete_recurring_tickets'])) {
|
|||
$_SESSION['alert_message'] = "Deleted <strong>$count</strong> recurring ticket(s)";
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['edit_ticket_billable_status'])) {
|
||||
|
|
@ -2465,7 +2465,7 @@ if (isset($_POST['edit_ticket_billable_status'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Ticket marked <strong>$billable_wording Billable</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['edit_ticket_schedule'])) {
|
||||
|
|
@ -2626,7 +2626,7 @@ if (isset($_POST['edit_ticket_schedule'])) {
|
|||
|
||||
if (empty($conflicting_tickets)) {
|
||||
$_SESSION['alert_message'] = "Ticket scheduled for $email_datetime";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
} else {
|
||||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Ticket scheduled for $email_datetime. Yet there are conflicting tickets scheduled for the same time: <br>" . implode(", <br>", $conflicting_tickets);
|
||||
|
|
@ -2778,5 +2778,5 @@ if (isset($_GET['cancel_ticket_schedule'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Ticket schedule cancelled";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ if (isset($_POST['add_transfer'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Transferred <strong>" . numfmt_format_currency($currency_format, $amount, $account_currency_code) . "</strong> from <strong>$source_account_name</strong> to <strong>$destination_account_name</strong>";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ if (isset($_POST['edit_transfer'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Transfer edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -91,6 +91,6 @@ if (isset($_GET['delete_transfer'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Transfer deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ if (isset($_POST['add_trip'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Trip from <strong>$source</strong> to <strong>$destination</strong> logged";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ if (isset($_POST['edit_trip'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Trip edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ if (isset($_GET['delete_trip'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Trip ($trip_source - $trip_destination) deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ if (isset($_POST['add_vendor_from_template'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Vendor <strong>$name</strong> created from template";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ if (isset($_POST['add_vendor'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Vendor <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['edit_vendor'])) {
|
||||
|
|
@ -84,7 +84,7 @@ if (isset($_POST['edit_vendor'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Vendor <strong>$name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['archive_vendor'])) {
|
||||
|
|
@ -104,7 +104,7 @@ if (isset($_GET['archive_vendor'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Vendor <strong>$vendor_name</strong> archived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if(isset($_GET['unarchive_vendor'])){
|
||||
|
|
@ -124,7 +124,7 @@ if(isset($_GET['unarchive_vendor'])){
|
|||
|
||||
$_SESSION['alert_message'] = "Vendor <strong>$vendor_name</strong> restored";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_GET['delete_vendor'])) {
|
||||
|
|
@ -150,7 +150,7 @@ if (isset($_GET['delete_vendor'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Vendor <strong>$vendor_name</strong> deleted";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_archive_vendors'])) {
|
||||
|
|
@ -187,7 +187,7 @@ if (isset($_POST['bulk_archive_vendors'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_unarchive_vendors'])) {
|
||||
|
|
@ -224,7 +224,7 @@ if (isset($_POST['bulk_unarchive_vendors'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_delete_vendors'])) {
|
||||
|
|
@ -268,7 +268,7 @@ if (isset($_POST['bulk_delete_vendors'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['export_vendors_csv'])) {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ if (isset($_POST['add_vendor_contact'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Vendor Contact <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ if (isset($_POST['edit_vendor_contact'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Vendor Contact <strong>$name</strong> updated";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ if (isset($_POST['bulk_archive_vendor_contacts'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_unarchive_vendor_contacts'])) {
|
||||
|
|
@ -123,7 +123,7 @@ if (isset($_POST['bulk_unarchive_vendor_contacts'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
if (isset($_POST['bulk_delete_vendor_contacts'])) {
|
||||
|
|
@ -175,7 +175,7 @@ if (isset($_POST['bulk_delete_vendor_contacts'])) {
|
|||
|
||||
}
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -206,7 +206,7 @@ if (isset($_GET['archive_vendor_contact'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Contact <strong>$contact_name</strong> has been archived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -235,7 +235,7 @@ if (isset($_GET['unarchive_vendor_contact'])) {
|
|||
|
||||
$_SESSION['alert_message'] = "Contact <strong>$contact_name</strong> has been Unarchived";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -273,7 +273,7 @@ if (isset($_GET['delete_vendor_contact'])) {
|
|||
$_SESSION['alert_type'] = "error";
|
||||
$_SESSION['alert_message'] = "Contact <strong>$contact_name</strong> has been deleted.";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -342,7 +342,7 @@ if (isset($_POST["import_vendor_contacts_csv"])) {
|
|||
} else {
|
||||
$_SESSION['alert_message'] = "Please select a file to upload.";
|
||||
$_SESSION['alert_type'] = "error";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
@ -424,12 +424,12 @@ if (isset($_POST["import_vendor_contacts_csv"])) {
|
|||
logAction("Contact", "Import", "$session_name imported $row_count contact(s) via CSV file", $client_id);
|
||||
|
||||
$_SESSION['alert_message'] = "$row_count Contact(s) added, $duplicate_count duplicate(s) detected";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
//Check for any errors, if there are notify user and redirect
|
||||
if ($error) {
|
||||
$_SESSION['alert_type'] = "warning";
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
redirect();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue