diff --git a/ajax.php b/ajax.php index 39a88a6b..a9247a13 100644 --- a/ajax.php +++ b/ajax.php @@ -163,6 +163,18 @@ if (isset($_POST['client_set_notes'])) { } +if (isset($_POST['contact_set_notes'])) { + $contact_id = intval($_POST['contact_id']); + $notes = trim(strip_tags(mysqli_real_escape_string($mysqli, $_POST['notes']))); + + // Update notes + mysqli_query($mysqli, "UPDATE contacts SET contact_notes = '$notes' WHERE contact_id = contact_id"); + + // Logging + mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Contact', log_action = 'Modify', log_description = '$session_name modified contact notes', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_user_id = $session_user_id, company_id = $session_company_id"); + +} + /* * Collision Detection/Avoidance * Called upon loading a ticket, and every 2 mins thereafter diff --git a/client_contact_details.php b/client_contact_details.php index 6f8e1c00..0ff9194c 100644 --- a/client_contact_details.php +++ b/client_contact_details.php @@ -95,6 +95,17 @@ if (isset($_GET['contact_id'])) { Edit + + + + + +
+
+
Notes
+
+
+
@@ -119,7 +130,6 @@ if (isset($_GET['contact_id'])) { -
">

Assets

@@ -354,17 +364,248 @@ if (isset($_GET['contact_id'])) {
+
"> +
+

Licenses

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
SoftwareTypeLicense TypeSeatsAction
$software_version"; ?> + +
+
+
+
+ + + + +
"> +
+

Tickets

+
+
+
+ + + + + + + + + + + + + + + Never

"; + } else { + $ticket_updated_at_display = "

Never

"; + } + } else { + $ticket_updated_at_display = $ticket_updated_at; + } + $ticket_closed_at = $row['ticket_closed_at']; + + if ($ticket_status == "Open") { + $ticket_status_display = "$ticket_status"; + } elseif ($ticket_status == "Working") { + $ticket_status_display = "$ticket_status"; + } else { + $ticket_status_display = "$ticket_status"; + } + + if ($ticket_priority == "High") { + $ticket_priority_display = "$ticket_priority"; + } elseif ($ticket_priority == "Medium") { + $ticket_priority_display = "$ticket_priority"; + } elseif ($ticket_priority == "Low") { + $ticket_priority_display = "$ticket_priority"; + } else { + $ticket_priority_display = "-"; + } + $ticket_assigned_to = $row['ticket_assigned_to']; + if (empty($ticket_assigned_to)) { + if ($ticket_status == "Closed") { + $ticket_assigned_to_display = "

Not Assigned

"; + } else { + $ticket_assigned_to_display = "

Not Assigned

"; + } + } else { + $ticket_assigned_to_display = htmlentities($row['user_name']); + } + $contact_id = $row['contact_id']; + $contact_name = htmlentities($row['contact_name']); + if (empty($contact_name)) { + $contact_display = "-"; + } else { + $contact_display = "$contact_name
$contact_email"; + } + $contact_title = htmlentities($row['contact_title']); + $contact_email = htmlentities($row['contact_email']); + $contact_phone = formatPhoneNumber($row['contact_phone']); + $contact_extension = htmlentities($row['contact_extension']); + $contact_mobile = formatPhoneNumber($row['contact_mobile']); + + ?> + + + + + + + + + + + + + + + + +
NumberSubjectPriorityStatusAssignedLast ResponseCreatedAction
+ + + +
+
+
+
+
+ + diff --git a/client_tickets.php b/client_tickets.php index 6b8fef45..5ef30065 100644 --- a/client_tickets.php +++ b/client_tickets.php @@ -78,7 +78,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); Subject Contact Priority - Status + Status Assigned Last Response Created