From 883976529d1b7550ccfa117bbca13b8d6b8b27e2 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Wed, 30 Oct 2024 17:05:58 -0400 Subject: [PATCH] UI Update to files, add Breadcrumbs, change file icon to dark --- client_documents.php | 48 +++++++++++++++++++------------------- client_files.php | 55 ++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 75 insertions(+), 28 deletions(-) diff --git a/client_documents.php b/client_documents.php index 13b56855..823d05b7 100644 --- a/client_documents.php +++ b/client_documents.php @@ -63,8 +63,32 @@ if ($get_folder_id == 0 && $_GET["q"]) { $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); +// Breadcrumbs +// Build the full folder path +$folder_id = $get_folder_id; +$folder_path = array(); + +while ($folder_id > 0) { + $sql_folder = mysqli_query($mysqli, "SELECT folder_name, parent_folder FROM folders WHERE folder_id = $folder_id"); + if ($row_folder = mysqli_fetch_assoc($sql_folder)) { + $folder_name = nullable_htmlentities($row_folder['folder_name']); + $parent_folder = intval($row_folder['parent_folder']); + + // Prepend the folder to the beginning of the array + array_unshift($folder_path, array('folder_id' => $folder_id, 'folder_name' => $folder_name)); + + // Move up to the parent folder + $folder_id = $parent_folder; + } else { + // If the folder is not found, break the loop + break; + } +} + ?> + +

@@ -90,30 +114,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));

- - 0) { - $sql_folder = mysqli_query($mysqli, "SELECT folder_name, parent_folder FROM folders WHERE folder_id = $folder_id"); - if ($row_folder = mysqli_fetch_assoc($sql_folder)) { - $folder_name = nullable_htmlentities($row_folder['folder_name']); - $parent_folder = intval($row_folder['parent_folder']); - - // Prepend the folder to the beginning of the array - array_unshift($folder_path, array('folder_id' => $folder_id, 'folder_name' => $folder_name)); - - // Move up to the parent folder - $folder_id = $parent_folder; - } else { - // If the folder is not found, break the loop - break; - } - } - ?> -
diff --git a/client_files.php b/client_files.php index 588aa7f0..c60b5178 100644 --- a/client_files.php +++ b/client_files.php @@ -67,6 +67,28 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); $num_of_files = mysqli_num_rows($sql); +// Breadcrumbs +// Build the full folder path +$folder_id = $get_folder_id; +$folder_path = array(); + +while ($folder_id > 0) { + $sql_folder = mysqli_query($mysqli, "SELECT folder_name, parent_folder FROM folders WHERE folder_id = $folder_id"); + if ($row_folder = mysqli_fetch_assoc($sql_folder)) { + $folder_name = nullable_htmlentities($row_folder['folder_name']); + $parent_folder = intval($row_folder['parent_folder']); + + // Prepend the folder to the beginning of the array + array_unshift($folder_path, array('folder_id' => $folder_id, 'folder_name' => $folder_name)); + + // Move up to the parent folder + $folder_id = $parent_folder; + } else { + // If the folder is not found, break the loop + break; + } +} + ?>
@@ -218,7 +240,7 @@ $num_of_files = mysqli_num_rows($sql);
-
+
">
@@ -226,7 +248,7 @@ $num_of_files = mysqli_num_rows($sql);
-
+
"> "> @@ -247,6 +269,31 @@ $num_of_files = mysqli_num_rows($sql);
+ +
- " target="_blank" class="text-secondary"> + " target="_blank">
- +