diff --git a/client_contact_bulk_assign_location_modal.php b/client_contact_bulk_assign_location_modal.php new file mode 100644 index 00000000..7b522026 --- /dev/null +++ b/client_contact_bulk_assign_location_modal.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/client_contacts.php b/client_contacts.php index 6dce4fd4..f712cf39 100644 --- a/client_contacts.php +++ b/client_contacts.php @@ -61,187 +61,211 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
Archived Archived +

-
- - "> - - - - - - - - - - $contact_title"; - } - $contact_department = nullable_htmlentities($row['contact_department']); - if (empty($contact_department)) { - $contact_department_display = ""; - } else { - $contact_department_display = $contact_department; - } - $contact_extension = nullable_htmlentities($row['contact_extension']); - if (empty($contact_extension)) { - $contact_extension_display = ""; - } else { - $contact_extension_display = "x$contact_extension"; - } - $contact_phone = formatPhoneNumber($row['contact_phone']); - if (empty($contact_phone)) { - $contact_phone_display = ""; - } else { - $contact_phone_display = "
$contact_phone$contact_extension_display
"; - } - - $contact_mobile = formatPhoneNumber($row['contact_mobile']); - if (empty($contact_mobile)) { - $contact_mobile_display = ""; - } else { - $contact_mobile_display = "
$contact_mobile
"; - } - $contact_email = nullable_htmlentities($row['contact_email']); - if (empty($contact_email)) { - $contact_email_display = ""; - } else { - $contact_email_display = "
$contact_email
"; - } - $contact_info_display = "$contact_phone_display $contact_mobile_display $contact_email_display"; - if (empty($contact_info_display)) { - $contact_info_display = "-"; - } - $contact_pin = nullable_htmlentities($row['contact_pin']); - $contact_photo = nullable_htmlentities($row['contact_photo']); - $contact_initials = initials($contact_name); - $contact_notes = nullable_htmlentities($row['contact_notes']); - $contact_primary = intval($row['contact_primary']); - $contact_important = intval($row['contact_important']); - $contact_billing = intval($row['contact_billing']); - $contact_technical = intval($row['contact_technical']); - $contact_created_at = nullable_htmlentities($row['contact_created_at']); - if ($contact_primary == 1) { - $contact_primary_display = "Primary Contact"; - } else { - $contact_primary_display = false; - } - $contact_location_id = intval($row['contact_location_id']); - $location_name = nullable_htmlentities($row['location_name']); - if (empty($location_name)) { - $location_name_display = "-"; - } else { - $location_name_display = $location_name; - } - $auth_method = nullable_htmlentities($row['contact_auth_method']); - - // Related Assets Query - $sql_related_assets = mysqli_query($mysqli, "SELECT * FROM assets WHERE asset_contact_id = $contact_id ORDER BY asset_id DESC"); - $asset_count = mysqli_num_rows($sql_related_assets); - - // Related Logins Query - $sql_related_logins = mysqli_query($mysqli, "SELECT * FROM logins WHERE login_contact_id = $contact_id ORDER BY login_id DESC"); - $login_count = mysqli_num_rows($sql_related_logins); - - // Related Software Query - $sql_related_software = mysqli_query($mysqli, "SELECT * FROM software, software_contacts WHERE software.software_id = software_contacts.software_id AND software_contacts.contact_id = $contact_id ORDER BY software.software_id DESC"); - $software_count = mysqli_num_rows($sql_related_software); - - // Related Tickets Query - $sql_related_tickets = mysqli_query($mysqli, "SELECT * FROM tickets WHERE ticket_contact_id = $contact_id ORDER BY ticket_id DESC"); - $ticket_count = mysqli_num_rows($sql_related_tickets); - - ?> + + + +
+
NameDepartmentContactLocationAction
+ "> - - - - - - + + + + + - + + $contact_title"; + } + $contact_department = nullable_htmlentities($row['contact_department']); + if (empty($contact_department)) { + $contact_department_display = ""; + } else { + $contact_department_display = $contact_department; + } + $contact_extension = nullable_htmlentities($row['contact_extension']); + if (empty($contact_extension)) { + $contact_extension_display = ""; + } else { + $contact_extension_display = "x$contact_extension"; + } + $contact_phone = formatPhoneNumber($row['contact_phone']); + if (empty($contact_phone)) { + $contact_phone_display = ""; + } else { + $contact_phone_display = "
$contact_phone$contact_extension_display
"; + } + $contact_mobile = formatPhoneNumber($row['contact_mobile']); + if (empty($contact_mobile)) { + $contact_mobile_display = ""; + } else { + $contact_mobile_display = "
$contact_mobile
"; + } + $contact_email = nullable_htmlentities($row['contact_email']); + if (empty($contact_email)) { + $contact_email_display = ""; + } else { + $contact_email_display = "
$contact_email
"; + } + $contact_info_display = "$contact_phone_display $contact_mobile_display $contact_email_display"; + if (empty($contact_info_display)) { + $contact_info_display = "-"; + } + $contact_pin = nullable_htmlentities($row['contact_pin']); + $contact_photo = nullable_htmlentities($row['contact_photo']); + $contact_initials = initials($contact_name); + $contact_notes = nullable_htmlentities($row['contact_notes']); + $contact_primary = intval($row['contact_primary']); + $contact_important = intval($row['contact_important']); + $contact_billing = intval($row['contact_billing']); + $contact_technical = intval($row['contact_technical']); + $contact_created_at = nullable_htmlentities($row['contact_created_at']); + if ($contact_primary == 1) { + $contact_primary_display = "Primary Contact"; + } else { + $contact_primary_display = false; + } + $contact_location_id = intval($row['contact_location_id']); + $location_name = nullable_htmlentities($row['location_name']); + if (empty($location_name)) { + $location_name_display = "-"; + } else { + $location_name_display = $location_name; + } + $auth_method = nullable_htmlentities($row['contact_auth_method']); - } + // Related Assets Query + $sql_related_assets = mysqli_query($mysqli, "SELECT * FROM assets WHERE asset_contact_id = $contact_id ORDER BY asset_id DESC"); + $asset_count = mysqli_num_rows($sql_related_assets); - ?> + // Related Logins Query + $sql_related_logins = mysqli_query($mysqli, "SELECT * FROM logins WHERE login_contact_id = $contact_id ORDER BY login_id DESC"); + $login_count = mysqli_num_rows($sql_related_logins); - -
"> - - - - "> - - - - - - - - -
- - -
-
-
-
-
- +
+
NameDepartmentContactLocationAction
-
+ // Related Software Query + $sql_related_software = mysqli_query($mysqli, "SELECT * FROM software, software_contacts WHERE software.software_id = software_contacts.software_id AND software_contacts.contact_id = $contact_id ORDER BY software.software_id DESC"); + $software_count = mysqli_num_rows($sql_related_software); + + // Related Tickets Query + $sql_related_tickets = mysqli_query($mysqli, "SELECT * FROM tickets WHERE ticket_contact_id = $contact_id ORDER BY ticket_id DESC"); + $ticket_count = mysqli_num_rows($sql_related_tickets); + + ?> + + +
+ +
+ + "> + + + + "> + + + + + + + + +
+ + +
+
+
+
+ + + + + + + + + + + + + + + + + @@ -287,6 +311,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); }); + + $contact_count contacts to location $location_name"; + } + + header("Location: " . $_SERVER["HTTP_REFERER"]); + +} + if (isset($_GET['anonymize_contact'])) { validateAdminRole(); diff --git a/tickets.php b/tickets.php index e07abdfb..5096fbab 100644 --- a/tickets.php +++ b/tickets.php @@ -248,7 +248,7 @@ $user_active_assigned_tickets = intval($row['total_tickets_assigned']);
- +
">