From fe5635f1dcbfa8396dd03376e7d2ddc5d412992a Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Sat, 12 Feb 2022 17:37:56 +0000 Subject: [PATCH 1/4] Add contact read to api --- api/v1/contacts/read.php | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 api/v1/contacts/read.php diff --git a/api/v1/contacts/read.php b/api/v1/contacts/read.php new file mode 100644 index 00000000..5b4409ea --- /dev/null +++ b/api/v1/contacts/read.php @@ -0,0 +1,30 @@ + Date: Sat, 12 Feb 2022 17:41:48 +0000 Subject: [PATCH 2/4] Add ticket read to api --- api/v1/tickets/read.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 api/v1/tickets/read.php diff --git a/api/v1/tickets/read.php b/api/v1/tickets/read.php new file mode 100644 index 00000000..3470b32d --- /dev/null +++ b/api/v1/tickets/read.php @@ -0,0 +1,24 @@ + Date: Sat, 12 Feb 2022 18:02:43 +0000 Subject: [PATCH 3/4] Add documents to global search --- global_search.php | 74 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 59 insertions(+), 15 deletions(-) diff --git a/global_search.php b/global_search.php index 9759a044..b67eec48 100644 --- a/global_search.php +++ b/global_search.php @@ -9,8 +9,9 @@ if(isset($_GET['query'])){ $sql_clients = mysqli_query($mysqli,"SELECT * FROM clients LEFT JOIN locations ON clients.client_id = locations.location_client_id WHERE client_name LIKE '%$query%' AND clients.company_id = $session_company_id ORDER BY client_id DESC LIMIT 5"); $sql_vendors = mysqli_query($mysqli,"SELECT * FROM vendors WHERE vendor_name LIKE '%$query%' AND company_id = $session_company_id ORDER BY vendor_id DESC LIMIT 5"); $sql_products = mysqli_query($mysqli,"SELECT * FROM products WHERE product_name LIKE '%$query%' AND company_id = $session_company_id ORDER BY product_id DESC LIMIT 5"); - $sql_logins = mysqli_query($mysqli,"SELECT * FROM logins WHERE (login_name LIKE '%$query%' OR login_username LIKE '%$query%') AND company_id = $session_company_id ORDER BY login_id DESC LIMIT 5"); + $sql_documents = mysqli_query($mysqli, "SELECT * FROM documents LEFT JOIN clients on document_client_id = clients.client_id WHERE document_name LIKE '%$query%' AND documents.company_id = $session_company_id ORDER BY document_id DESC LIMIT 5"); $sql_tickets = mysqli_query($mysqli, "SELECT * FROM tickets LEFT JOIN clients on tickets.ticket_client_id = clients.client_id WHERE (ticket_subject LIKE '%$query%' OR ticket_number = '$query') AND tickets.company_id = $session_company_id ORDER BY ticket_id DESC LIMIT 5"); + $sql_logins = mysqli_query($mysqli,"SELECT * FROM logins WHERE (login_name LIKE '%$query%' OR login_username LIKE '%$query%') AND company_id = $session_company_id ORDER BY login_id DESC LIMIT 5"); $q = htmlentities($_GET['query']); ?> @@ -140,37 +141,36 @@ if(isset($_GET['query'])){ +
-
Logins
+
Documents
- - - + + + - - - - - + + + +
@@ -225,6 +226,49 @@ if(isset($_GET['query'])){
+ +
+
+
+
Logins
+
+
+
DescriptionUsernamePasswordDocumentClientUpdated
+ + + + + + + + + + + + + + + + + + + + +
DescriptionUsernamePassword
+
+
+
+ From 03d00f76efa3fba5e4bb930e4740844ae926c59b Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Sat, 12 Feb 2022 18:05:19 +0000 Subject: [PATCH 4/4] Typo --- global_search.php | 1 - 1 file changed, 1 deletion(-) diff --git a/global_search.php b/global_search.php index b67eec48..cb628179 100644 --- a/global_search.php +++ b/global_search.php @@ -142,7 +142,6 @@ if(isset($_GET['query'])){ -