mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 10:54:52 +00:00
Fix non existent record in contact details, document details, document template, ticket template also add limit 1
This commit is contained in:
@@ -20,9 +20,16 @@ $folder_location = 0;
|
||||
$sql_document = mysqli_query($mysqli, "SELECT * FROM documents
|
||||
LEFT JOIN folders ON document_folder_id = folder_id
|
||||
LEFT JOIN users ON document_created_by = user_id
|
||||
WHERE document_client_id = $client_id AND document_id = $document_id"
|
||||
WHERE document_client_id = $client_id AND document_id = $document_id
|
||||
LIMIT 1"
|
||||
);
|
||||
|
||||
if (mysqli_num_rows($sql_document) == 0) {
|
||||
echo "<center><h1 class='text-secondary mt-5'>Nothing to see here</h1><a class='btn btn-lg btn-secondary mt-3' href='javascript:history.back()'><i class='fa fa-fw fa-arrow-left'></i> Go Back</a></center>";
|
||||
require_once "../includes/footer.php";
|
||||
exit();
|
||||
}
|
||||
|
||||
$row = mysqli_fetch_array($sql_document);
|
||||
|
||||
$folder_name = nullable_htmlentities($row['folder_name']);
|
||||
|
||||
Reference in New Issue
Block a user