From aeeac12f11e444aec26c77e6f37956625962003e Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Fri, 30 Aug 2024 23:04:20 +0100 Subject: [PATCH 1/2] Log when client pack is exported to PDF --- post/client.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/post/client.php b/post/client.php index 2524077e3..da599fab6 100644 --- a/post/client.php +++ b/post/client.php @@ -508,15 +508,15 @@ // Create Contact mysqli_query($mysqli, "INSERT INTO contacts SET contact_name = '$contact_name', contact_title = '$title', contact_phone = '$contact_phone', contact_extension = '$contact_extension', contact_mobile = '$contact_mobile', contact_email = '$contact_email', contact_primary = 1, contact_important = 1, contact_client_id = $client_id"); - + $row_count = $row_count + 1; - + }else{ - + $duplicate_count = $duplicate_count + 1; - + } - + } fclose($file); @@ -583,6 +583,9 @@ $export_trips = intval($_POST['export_trips']); $export_logs = intval($_POST['export_logs']); + //Logging + mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Client', log_action = 'Export', log_description = '$session_name exported client data to a PDF file', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_client_id = $client_id, log_user_id = $session_user_id"); + //get records from database $sql = mysqli_query($mysqli,"SELECT * FROM clients From 00e4e8a24b8faa0126356bcaae5bb9c05545cfe7 Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Fri, 30 Aug 2024 23:05:04 +0100 Subject: [PATCH 2/2] Log when client pack is exported to PDF --- post/client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/post/client.php b/post/client.php index da599fab6..548eb8924 100644 --- a/post/client.php +++ b/post/client.php @@ -511,7 +511,7 @@ $row_count = $row_count + 1; - }else{ + } else { $duplicate_count = $duplicate_count + 1;