remove folder location vars as no longer needed as files and documents have been merged
This commit is contained in:
@@ -51,10 +51,10 @@ $page_title = $row['document_name'];
|
||||
|
||||
<ol class="breadcrumb d-print-none">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="client_overview.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a>
|
||||
<a href="client_overview.php?client_id=<?= $client_id ?>"><?= $client_name ?></a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="documents.php?client_id=<?php echo $client_id; ?>">Documents</a>
|
||||
<a href="files.php?client_id=<?= $client_id ?>">Files</a>
|
||||
</li>
|
||||
<?php
|
||||
// Build the full folder path
|
||||
@@ -84,7 +84,7 @@ $page_title = $row['document_name'];
|
||||
$bread_crumb_folder_name = $folder['folder_name']; // Sanitized before put in array
|
||||
?>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="documents.php?client_id=<?php echo $client_id; ?>&folder_id=<?php echo $bread_crumb_folder_id; ?>">
|
||||
<a href="files.php?client_id=<?php echo $client_id; ?>&folder_id=<?php echo $bread_crumb_folder_id; ?>">
|
||||
<i class="fas fa-fw fa-folder-open mr-2"></i><?php echo $bread_crumb_folder_name; ?>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -45,7 +45,7 @@ ob_start();
|
||||
<select class="form-control select2" name="folder">
|
||||
<option value="0">/</option>
|
||||
<?php
|
||||
$sql_folders_select = mysqli_query($mysqli, "SELECT * FROM folders WHERE folder_location = 0 AND folder_client_id = $client_id ORDER BY folder_name ASC");
|
||||
$sql_folders_select = mysqli_query($mysqli, "SELECT * FROM folders WHERE folder_client_id = $client_id ORDER BY folder_name ASC");
|
||||
while ($row = mysqli_fetch_array($sql_folders_select)) {
|
||||
$folder_id_select = intval($row['folder_id']);
|
||||
$folder_name_select = nullable_htmlentities($row['folder_name']);
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
require_once '../../../includes/modal_header.php';
|
||||
|
||||
$client_id = intval($_GET['client_id'] ?? 0);
|
||||
$folder_location = intval($_GET['folder_location'] ?? 0);
|
||||
$current_folder_id = intval($_GET['current_folder_id'] ?? 0);
|
||||
$folder_name = nullable_htmlentities(getFieldByID('folders', $current_folder_id, 'folder_name') ?? '/');
|
||||
|
||||
@@ -18,7 +17,6 @@ ob_start();
|
||||
</div>
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||
<input type="hidden" name="folder_location" value="<?= $folder_location ?>">
|
||||
<input type="hidden" name="parent_folder" value="<?= $current_folder_id ?>">
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
@@ -1576,14 +1576,10 @@ function getFieldById($table, $id, $field, $escape_method = 'sql') {
|
||||
}
|
||||
|
||||
// Recursive function to display folder options - Used in folders files and documents
|
||||
function display_folder_options($parent_folder_id, $client_id, $folder_location = 0, $indent = 0) {
|
||||
function display_folder_options($parent_folder_id, $client_id, $indent = 0) {
|
||||
global $mysqli;
|
||||
|
||||
$folder_location = intval($folder_location);
|
||||
// 0 = Document Folders
|
||||
// 1 = File Folders
|
||||
|
||||
$sql_folders = mysqli_query($mysqli, "SELECT * FROM folders WHERE parent_folder = $parent_folder_id AND folder_location = $folder_location AND folder_client_id = $client_id ORDER BY folder_name ASC");
|
||||
$sql_folders = mysqli_query($mysqli, "SELECT * FROM folders WHERE parent_folder = $parent_folder_id AND folder_client_id = $client_id ORDER BY folder_name ASC");
|
||||
while ($row = mysqli_fetch_array($sql_folders)) {
|
||||
$folder_id = intval($row['folder_id']);
|
||||
$folder_name = nullable_htmlentities($row['folder_name']);
|
||||
@@ -1601,7 +1597,7 @@ function display_folder_options($parent_folder_id, $client_id, $folder_location
|
||||
echo "<option value=\"$folder_id\" $selected>$indentation$folder_name</option>";
|
||||
|
||||
// Recursively display subfolders
|
||||
display_folder_options($folder_id, $client_id, $folder_location, $indent + 1);
|
||||
display_folder_options($folder_id, $client_id, $indent + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user