diff --git a/README.md b/README.md index 64e1487d..888d2d76 100644 --- a/README.md +++ b/README.md @@ -136,8 +136,7 @@ For help using ITFlow, feature requests, and general ideas / discussions please For bugs, please raise an [issue](https://github.com/itflow-org/itflow/issues). ### Contributing -If you are able to make a contribution that would make ITFlow better, please fork the repo and create a pull request. Please make sure you're following our [code standards](https://docs.itflow.org/code_standards). -For large changes / new features, please discuss the issue with other contributors first. +If you want to improve ITFlow, feel free to fork the repo and create a pull request, but make sure to discuss significant changes or new features with fellow contributors on the forum first. This helps ensure that your contributions are aligned with project goals, and saves time for everyone. All contributions should follow our [code standards](https://docs.itflow.org/code_standards). #### Contributors diff --git a/ajax.php b/ajax.php index 7e7d18a4..ddf5639a 100644 --- a/ajax.php +++ b/ajax.php @@ -303,14 +303,25 @@ if (isset($_GET['share_generate_link'])) { $url = "https://$config_base_url/guest_view_item.php?id=$share_id&key=$item_key"; } + $sql = mysqli_query($mysqli,"SELECT * FROM companies WHERE company_id = 1"); + $row = mysqli_fetch_array($sql); + $company_name = sanitizeInput($row['company_name']); + $company_phone = sanitizeInput(formatPhoneNumber($row['company_phone'])); + + // Sanitize Config vars from get_settings.php + $config_ticket_from_name = sanitizeInput($config_ticket_from_name); + $config_ticket_from_email = sanitizeInput($config_ticket_from_email); + $config_mail_from_name = sanitizeInput($config_mail_from_name); + $config_mail_from_email = sanitizeInput($config_mail_from_email); + // Send user e-mail, if specified if(!empty($config_smtp_host) && filter_var($item_email, FILTER_VALIDATE_EMAIL)){ - $subject = "Time sensitive - $session_company_name secure link enclosed"; + $subject = "Time sensitive - $company_name secure link enclosed"; if ($item_expires_friendly == "never") { - $subject = "$session_company_name secure link enclosed"; + $subject = "$company_name secure link enclosed"; } - $body = mysqli_real_escape_string($mysqli, "Hello,

$session_name from $session_company_name sent you a time sensitive secure link regarding '$item_name'.

The link will expire in $item_expires_friendly and may only be viewed $item_view_limit times, before the link is destroyed.

Click here to access your secure content

~
$session_company_name
Support Department
$config_ticket_from_email"); + $body = "Hello,

$session_name from $company_name sent you a time sensitive secure link regarding \"$item_name\".

The link will expire in $item_expires_friendly and may only be viewed $item_view_limit times, before the link is destroyed.

Click here to access your secure content

--
$company_name - Support
$config_ticket_from_email
$company_phone"; $data = [ [ @@ -322,7 +333,7 @@ if (isset($_GET['share_generate_link'])) { 'body' => $body ] ]; - + $mail = addToMailQueue($mysqli, $data); if ($mail !== true) { @@ -334,7 +345,6 @@ if (isset($_GET['share_generate_link'])) { echo json_encode($url); - // Logging mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Sharing', log_action = 'Create', log_description = '$session_name created shared link for $item_type - $item_name', log_client_id = $client_id, log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_user_id = $session_user_id"); @@ -489,5 +499,5 @@ if (isset($_GET['get_totp_token_via_id'])) { } if (isset($_GET['get_readable_pass'])) { - echo GenerateReadablePassword(4); + echo json_encode(GenerateReadablePassword(4)); } diff --git a/calendar_event_add_modal.php b/calendar_event_add_modal.php index 9b7ad916..6b14e997 100644 --- a/calendar_event_add_modal.php +++ b/calendar_event_add_modal.php @@ -14,9 +14,6 @@ - @@ -61,24 +58,24 @@ - -
-
- -
-
- -
-
-
- - + +
+
+ +
+ +
+
+ +
+
+
+ +
+ +
- - - -
@@ -96,6 +93,10 @@
+
+ +
+
diff --git a/calendar_event_edit_modal.php b/calendar_event_edit_modal.php index 01b46cce..99eb0207 100644 --- a/calendar_event_edit_modal.php +++ b/calendar_event_edit_modal.php @@ -17,9 +17,6 @@ - @@ -63,24 +60,25 @@
- -
-
- -
-
- -
-
- +
- - + +
+
+ +
+ +
+
+ +
+
+
+ +
+ +
- - - -
@@ -98,6 +96,17 @@
+
+ + +
+ + + +
+ + +
diff --git a/client_asset_add_modal.php b/client_asset_add_modal.php index d546991b..a0248c96 100644 --- a/client_asset_add_modal.php +++ b/client_asset_add_modal.php @@ -345,7 +345,7 @@
- +
diff --git a/client_asset_bulk_assign_contact_modal.php b/client_asset_bulk_assign_contact_modal.php new file mode 100644 index 00000000..c95978cd --- /dev/null +++ b/client_asset_bulk_assign_contact_modal.php @@ -0,0 +1,44 @@ + \ No newline at end of file diff --git a/client_asset_bulk_assign_location_modal.php b/client_asset_bulk_assign_location_modal.php new file mode 100644 index 00000000..c9989c2f --- /dev/null +++ b/client_asset_bulk_assign_location_modal.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/client_asset_bulk_edit_status_modal.php b/client_asset_bulk_edit_status_modal.php new file mode 100644 index 00000000..bc3ddbe1 --- /dev/null +++ b/client_asset_bulk_edit_status_modal.php @@ -0,0 +1,36 @@ + \ No newline at end of file diff --git a/client_asset_copy_modal.php b/client_asset_copy_modal.php index 10ea9946..bf676a8f 100644 --- a/client_asset_copy_modal.php +++ b/client_asset_copy_modal.php @@ -132,7 +132,7 @@ '$asset_created_at' OR network_archived_at IS NULL) AND network_client_id = $client_id ORDER BY network_name ASC"); + $sql_networks = mysqli_query($mysqli, "SELECT * FROM networks WHERE network_archived_at IS NULL AND network_client_id = $client_id ORDER BY network_name ASC"); while ($row = mysqli_fetch_array($sql_networks)) { $network_id_select = intval($row['network_id']); $network_name_select = nullable_htmlentities($row['network_name']); @@ -215,7 +215,7 @@ - Vendor - '$asset_created_at' OR vendor_archived_at IS NULL) AND vendor_client_id = $client_id AND vendor_template = 0 ORDER BY vendor_name ASC"); + $sql_vendors = mysqli_query($mysqli, "SELECT * FROM vendors WHERE vendor_archived_at IS NULL AND vendor_client_id = $client_id AND vendor_template = 0 ORDER BY vendor_name ASC"); while ($row = mysqli_fetch_array($sql_vendors)) { $vendor_id_select = intval($row['vendor_id']); $vendor_name_select = nullable_htmlentities($row['vendor_name']); @@ -341,7 +341,7 @@
- + diff --git a/client_asset_details.php b/client_asset_details.php index 78e635aa..07718006 100644 --- a/client_asset_details.php +++ b/client_asset_details.php @@ -46,17 +46,20 @@ if (isset($_GET['asset_id'])) { $contact_phone = nullable_htmlentities($row['contact_phone']); $contact_mobile = nullable_htmlentities($row['contact_mobile']); $contact_archived_at = nullable_htmlentities($row['contact_archived_at']); - if (empty($contact_archived_at)) { - $contact_archived_display = ""; + if ($contact_archived_at) { + $contact_name_display = "$contact_name"; } else { - $contact_archived_display = "Archived - "; + $contact_name_display = $contact_name; } $location_name = nullable_htmlentities($row['location_name']); + if (empty($location_name)) { + $location_name = "-"; + } $location_archived_at = nullable_htmlentities($row['location_archived_at']); - if (empty($location_archived_at)) { - $location_archived_display = ""; + if ($location_archived_at) { + $location_name_display = "$location_name"; } else { - $location_archived_display = "Archived - "; + $location_name_display = $location_name; } $login_id = intval($row['login_id']); @@ -181,10 +184,10 @@ if (isset($_GET['asset_id'])) {
-
+
-
+
diff --git a/client_asset_edit_modal.php b/client_asset_edit_modal.php index 8f3c73a9..45a07833 100644 --- a/client_asset_edit_modal.php +++ b/client_asset_edit_modal.php @@ -134,20 +134,20 @@ '$asset_created_at' OR network_archived_at IS NULL) AND network_client_id = $client_id ORDER BY network_archived_at ASC, network_name ASC"); + $sql_networks = mysqli_query($mysqli, "SELECT * FROM networks WHERE network_id = $asset_network_id OR network_archived_at IS NULL AND network_client_id = $client_id ORDER BY network_name ASC"); while ($row = mysqli_fetch_array($sql_networks)) { $network_id_select = intval($row['network_id']); $network_name_select = nullable_htmlentities($row['network_name']); $network_select = nullable_htmlentities($row['network']); $network_archived_at = nullable_htmlentities($row['network_archived_at']); - if (empty($network_archived_at)) { - $network_archived_display = ""; + if ($network_archived_at) { + $network_name_select_display = "($network_name_select - $network_select) - ARCHIVED"; } else { - $network_archived_display = "Archived - "; + $network_name_select_display = "$network_name_select - $network_select"; } ?> - + @@ -223,18 +223,18 @@ '$asset_created_at' OR location_archived_at IS NULL) AND location_client_id = $client_id ORDER BY location_archived_at ASC, location_name ASC"); + $sql_locations = mysqli_query($mysqli, "SELECT * FROM locations WHERE location_id = $asset_location_id OR location_archived_at IS NULL AND location_client_id = $client_id ORDER BY location_name ASC"); while ($row = mysqli_fetch_array($sql_locations)) { $location_id_select = intval($row['location_id']); $location_name_select = nullable_htmlentities($row['location_name']); $location_archived_at = nullable_htmlentities($row['location_archived_at']); - if (empty($location_archived_at)) { - $location_archived_display = ""; + if ($location_archived_at) { + $location_name_select_display = "($location_name_select) - ARCHIVED"; } else { - $location_archived_display = "Archived - "; + $location_name_select_display = $location_name_select; } ?> - + @@ -251,19 +251,19 @@ '$asset_created_at' OR contact_archived_at IS NULL) AND contact_client_id = $client_id ORDER BY contact_archived_at ASC, contact_name ASC"); + $sql_contacts = mysqli_query($mysqli, "SELECT * FROM contacts WHERE contact_id = $asset_contact_id OR contact_archived_at IS NULL AND contact_client_id = $client_id ORDER BY contact_name ASC"); while ($row = mysqli_fetch_array($sql_contacts)) { $contact_id_select = intval($row['contact_id']); $contact_name_select = nullable_htmlentities($row['contact_name']); $contact_archived_at = nullable_htmlentities($row['contact_archived_at']); - if (empty($contact_archived_at)) { - $contact_archived_display = ""; + if ($contact_archived_at) { + $contact_name_select_display = "($contact_name_select) - ARCHIVED"; } else { - $contact_archived_display = "Archived - "; + $contact_name_select_display = $contact_name_select; } ?> @@ -299,18 +299,18 @@ '$asset_created_at' OR vendor_archived_at IS NULL) AND vendor_client_id = $client_id ORDER BY vendor_archived_at ASC, vendor_name ASC"); + $sql_vendors = mysqli_query($mysqli, "SELECT * FROM vendors WHERE vendor_id = $asset_vendor_id OR vendor_archived_at IS NULL AND vendor_client_id = $client_id ORDER BY vendor_name ASC"); while ($row = mysqli_fetch_array($sql_vendors)) { $vendor_id_select = intval($row['vendor_id']); $vendor_name_select = nullable_htmlentities($row['vendor_name']); $vendor_archived_at = nullable_htmlentities($row['vendor_archived_at']); - if (empty($vendor_archived_at)) { - $vendor_archived_display = ""; + if ($vendor_archived_at) { + $vendor_name_select_display = "($vendor_name_select) - ARCHIVED"; } else { - $vendor_archived_display = "Archived - "; + $vendor_name_select_display = $vendor_name_select; } ?> - + @@ -369,7 +369,7 @@
- +
diff --git a/client_assets.php b/client_assets.php index 3572c8b1..81356f28 100644 --- a/client_assets.php +++ b/client_assets.php @@ -139,246 +139,287 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); Archived +
-
- - "> - - - - - - - - - - - - - - - - - - - - - - - - "; - } - $asset_nat_ip = nullable_htmlentities($row['asset_nat_ip']); - $asset_mac = nullable_htmlentities($row['asset_mac']); - $asset_uri = nullable_htmlentities($row['asset_uri']); - $asset_uri_2 = nullable_htmlentities($row['asset_uri_2']); - $asset_status = nullable_htmlentities($row['asset_status']); - $asset_purchase_date = nullable_htmlentities($row['asset_purchase_date']); - $asset_warranty_expire = nullable_htmlentities($row['asset_warranty_expire']); - $asset_install_date = nullable_htmlentities($row['asset_install_date']); - if (empty($asset_install_date)) { - $asset_install_date_display = "-"; - } else { - $asset_install_date_display = $asset_install_date; - } - $asset_notes = nullable_htmlentities($row['asset_notes']); - $asset_created_at = nullable_htmlentities($row['asset_created_at']); - $asset_vendor_id = intval($row['asset_vendor_id']); - $asset_location_id = intval($row['asset_location_id']); - $asset_contact_id = intval($row['asset_contact_id']); - $asset_network_id = intval($row['asset_network_id']); - - $device_icon = getAssetIcon($asset_type); - - $contact_name = nullable_htmlentities($row['contact_name']); - if (empty($contact_name)) { - $contact_name = "-"; - } - $contact_archived_at = nullable_htmlentities($row['contact_archived_at']); - if (empty($contact_archived_at)) { - $contact_archived_display = ""; - } else { - $contact_archived_display = "Archived - "; - } - - $location_name = nullable_htmlentities($row['location_name']); - if (empty($location_name)) { - $location_name = "-"; - } - $location_archived_at = nullable_htmlentities($row['location_archived_at']); - if (empty($location_archived_at)) { - $location_archived_display = ""; - } else { - $location_archived_display = "Archived - "; - } - - $login_id = intval($row['login_id']); - $login_username = nullable_htmlentities(decryptLoginEntry($row['login_username'])); - $login_password = nullable_htmlentities(decryptLoginEntry($row['login_password'])); - - ?> + +
+
NameDescriptionTypeMake/ModelSerial NumberOperating SystemIPInstall DateAssigned ToLocationStatusAction
+ "> - + + + + + + + + + + + + + + + + + + + + + + " tabindex="-1"> - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + - + ?> - -
- - - - - - 0) { - ?> - + +
+ +
+
Name / DescriptionTypeMake / ModelSerial NumberOperating SystemIPInstall DateAssigned ToLocationStatusAction
+
+ +
+
+ + + + + + 0) { + ?> + + + + +
+ +
+
+ - - -
-
- + + + + + + + + + + + +
+ +
+
+

Bulk Mail

+
+ +
+
+
+ +
+ +
+ +
Email Message
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+ +
Select Contacts
+
+
+
+ + + + + + + + + + + + + + + + + + + + +
+
+ +
+
NameTitleEmail
+
+ +
+
+ + + +
+
+ +
+ +
+ +
+
+
+ +
+ + + +
- +
- +
- +
diff --git a/client_contact_bulk_assign_location_modal.php b/client_contact_bulk_assign_location_modal.php new file mode 100644 index 00000000..404a545a --- /dev/null +++ b/client_contact_bulk_assign_location_modal.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/client_contact_bulk_edit_department_modal.php b/client_contact_bulk_edit_department_modal.php new file mode 100644 index 00000000..ae6192cb --- /dev/null +++ b/client_contact_bulk_edit_department_modal.php @@ -0,0 +1,31 @@ + \ No newline at end of file diff --git a/client_contact_bulk_edit_phone_modal.php b/client_contact_bulk_edit_phone_modal.php new file mode 100644 index 00000000..cc27c317 --- /dev/null +++ b/client_contact_bulk_edit_phone_modal.php @@ -0,0 +1,31 @@ + \ No newline at end of file diff --git a/client_contact_bulk_edit_role_modal.php b/client_contact_bulk_edit_role_modal.php new file mode 100644 index 00000000..f5b59899 --- /dev/null +++ b/client_contact_bulk_edit_role_modal.php @@ -0,0 +1,49 @@ + \ No newline at end of file diff --git a/client_contact_details.php b/client_contact_details.php index 863b94d8..6eeaffd6 100644 --- a/client_contact_details.php +++ b/client_contact_details.php @@ -84,33 +84,33 @@ if (isset($_GET['contact_id'])) {
-
+
-
+
-
">
+
">
-
+
-
+
-
Primary Contact
+
Primary Contact
-
Important
+
Important
-
Technical
+
Technical
-
Billing
+
Billing
-
+
@@ -149,12 +149,10 @@ if (isset($_GET['contact_id'])) { - - + - @@ -216,12 +214,19 @@ if (isset($_GET['contact_id'])) { - - + - + + + + + + + + + + + + + +
NameDescriptionName/Description Type Make/Model Serial NumberOperating System Install Date Status Action +
+ +
+ +
+ +
+
diff --git a/client_contact_edit_modal.php b/client_contact_edit_modal.php index 5bd6beee..bea22ae9 100644 --- a/client_contact_edit_modal.php +++ b/client_contact_edit_modal.php @@ -66,12 +66,12 @@
- +
- +
- +
@@ -122,14 +122,20 @@ '$contact_created_at' OR location_archived_at IS NULL) AND location_client_id = $client_id ORDER BY location_name ASC"); + $sql_locations = mysqli_query($mysqli, "SELECT * FROM locations WHERE location_id = $contact_location_id OR location_archived_at IS NULL AND location_client_id = $client_id ORDER BY location_name ASC"); while ($row = mysqli_fetch_array($sql_locations)) { $location_id_select = intval($row['location_id']); $location_name_select = nullable_htmlentities($row['location_name']); + $location_archived_at = nullable_htmlentities($row['location_archived_at']); + if ($location_archived_at) { + $location_name_select_display = "($location_name_select) - ARCHIVED"; + } else { + $location_name_select_display = $location_name_select; + } ?> + } ?> value=""> diff --git a/client_contacts.php b/client_contacts.php index 6dce4fd4..1900748c 100644 --- a/client_contacts.php +++ b/client_contacts.php @@ -61,187 +61,229 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
- - "> - - - - - - - - - - $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_mobile = formatPhoneNumber($row['contact_mobile']); - if (empty($contact_mobile)) { - $contact_mobile_display = ""; - } else { - $contact_mobile_display = ""; - } - $contact_email = nullable_htmlentities($row['contact_email']); - if (empty($contact_email)) { - $contact_email_display = ""; - } else { - $contact_email_display = ""; - } - $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_mobile = formatPhoneNumber($row['contact_mobile']); + if (empty($contact_mobile)) { + $contact_mobile_display = ""; + } else { + $contact_mobile_display = ""; + } + $contact_email = nullable_htmlentities($row['contact_email']); + if (empty($contact_email)) { + $contact_email_display = ""; + } else { + $contact_email_display = ""; + } + $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 = "-"; + } + $location_archived_at = nullable_htmlentities($row['location_archived_at']); + if ($location_archived_at) { + $location_name_display = "
$location_name
"; + } 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 +329,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); }); + + + + diff --git a/client_documents.php b/client_documents.php index 67b3749c..c826c5d6 100644 --- a/client_documents.php +++ b/client_documents.php @@ -165,104 +165,128 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
- +
+
+
+ +
-
- - "> - - - - - - - - - +
- Name - - Created - - Last Update - - Action -
+ "> + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - -
+
+ +
+
+ Name + + Created + + Last Update + + Action +
+
+ +
+
+ +
+
+ +
+
+ +
- -
-
- -
-
- -
-
-
+ + +
+ + +
@@ -270,6 +294,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); + + + diff --git a/client_file_upload_modal.php b/client_file_upload_modal.php index 36e70113..2a174023 100644 --- a/client_file_upload_modal.php +++ b/client_file_upload_modal.php @@ -35,7 +35,7 @@
- +
Up to 20 files can be uploaded at once by holding down CTRL and selecting files diff --git a/client_files.php b/client_files.php index 196a11e6..86231d60 100644 --- a/client_files.php +++ b/client_files.php @@ -157,9 +157,21 @@ $num_of_files = mysqli_num_rows($sql);
-
+
"> "> + + +
@@ -213,96 +225,109 @@ $num_of_files = mysqli_num_rows($sql); -
- - - "> - - - - - - - - - - + +
+
NameUploadedAction
+ + "> - - - + + + + + + + - require "client_file_move_modal.php"; + + + + + + + - + require "client_file_move_modal.php"; -
" target="_blank" class="text-secondary"> - +
+
NameUploadedAction
+
+ +
+
" target="_blank" class="text-secondary"> + +
-
- + } + ?> + + + + + + @@ -314,6 +339,8 @@ $num_of_files = mysqli_num_rows($sql); + + - - document.getElementById("otp_" + id).innerText = token - - } - ); - } - - function showOTPViaLoginID(login_id) { - // Send a GET request to ajax.php as ajax.php?get_totp_token_via_id=true&login_id=ID - jQuery.get( - "ajax.php", { - get_totp_token_via_id: 'true', - login_id: login_id - }, - function(data) { - //If we get a response from post.php, parse it as JSON - const token = JSON.parse(data); - - document.getElementById("otp_" + login_id).innerText = token - - } - ); - } - - function generatePassword() { - document.getElementById("password").value = "" - } - - function generatePassword() { - var url = '/ajax.php?get_readable_pass=true'; - - // Make an AJAX request to the server - var xhr = new XMLHttpRequest(); - xhr.open('GET', url, true); - - xhr.onreadystatechange = function() { - if (xhr.readyState == 4 && xhr.status == 200) { - var password = xhr.responseText; - - document.getElementById("password").value = password; - } - }; - xhr.send(); - } - + + MORE + +