Show if a Credential, Document or File is Shared by a Link, added a new status column
This commit is contained in:
@@ -217,6 +217,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<th>
|
<th>
|
||||||
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=document_updated_at&order=<?php echo $disp; ?>">Last Update</a>
|
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=document_updated_at&order=<?php echo $disp; ?>">Last Update</a>
|
||||||
</th>
|
</th>
|
||||||
|
<th></th>
|
||||||
<th class="text-center">
|
<th class="text-center">
|
||||||
Action
|
Action
|
||||||
</th>
|
</th>
|
||||||
@@ -235,6 +236,31 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
$document_updated_at = date("m/d/Y",strtotime($row['document_updated_at']));
|
$document_updated_at = date("m/d/Y",strtotime($row['document_updated_at']));
|
||||||
$document_folder_id = intval($row['document_folder_id']);
|
$document_folder_id = intval($row['document_folder_id']);
|
||||||
|
|
||||||
|
// Check if shared
|
||||||
|
$sql_shared = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT * FROM shared_items
|
||||||
|
WHERE item_client_id = $client_id
|
||||||
|
AND item_active = 1
|
||||||
|
AND item_views != item_view_limit
|
||||||
|
AND item_expire_at > NOW()
|
||||||
|
AND item_type = 'Document'
|
||||||
|
AND item_related_id = $document_id
|
||||||
|
LIMIT 1"
|
||||||
|
);
|
||||||
|
$row = mysqli_fetch_array($sql_shared);
|
||||||
|
$item_id = intval($row['item_id']);
|
||||||
|
$item_active = nullable_htmlentities($row['item_active']);
|
||||||
|
$item_key = nullable_htmlentities($row['item_key']);
|
||||||
|
$item_type = nullable_htmlentities($row['item_type']);
|
||||||
|
$item_related_id = intval($row['item_related_id']);
|
||||||
|
$item_note = nullable_htmlentities($row['item_note']);
|
||||||
|
$item_views = nullable_htmlentities($row['item_views']);
|
||||||
|
$item_view_limit = nullable_htmlentities($row['item_view_limit']);
|
||||||
|
$item_created_at = nullable_htmlentities($row['item_created_at']);
|
||||||
|
$item_expire_at = nullable_htmlentities($row['item_expire_at']);
|
||||||
|
$item_expire_at_human = timeAgo($row['item_expire_at']);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
@@ -252,6 +278,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<div class="text-secondary mt-1"><?php echo $document_created_by_name; ?>
|
<div class="text-secondary mt-1"><?php echo $document_created_by_name; ?>
|
||||||
</td>
|
</td>
|
||||||
<td><?php echo $document_updated_at; ?></td>
|
<td><?php echo $document_updated_at; ?></td>
|
||||||
|
<td>
|
||||||
|
<?php if($item_id) { ?>
|
||||||
|
<i class="fas fa-fw fa-link"></i> Shared
|
||||||
|
<?php } ?>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="dropdown dropleft text-center">
|
<div class="dropdown dropleft text-center">
|
||||||
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown">
|
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown">
|
||||||
|
|||||||
@@ -256,6 +256,7 @@ $num_of_files = mysqli_num_rows($sql);
|
|||||||
</td>
|
</td>
|
||||||
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=file_name&order=<?php echo $disp; ?>">Name</a></th>
|
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=file_name&order=<?php echo $disp; ?>">Name</a></th>
|
||||||
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=file_created_at&order=<?php echo $disp; ?>">Uploaded</a></th>
|
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=file_created_at&order=<?php echo $disp; ?>">Uploaded</a></th>
|
||||||
|
<th></th>
|
||||||
<th class="text-center">Action</th>
|
<th class="text-center">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -293,6 +294,32 @@ $num_of_files = mysqli_num_rows($sql);
|
|||||||
$file_icon = "file";
|
$file_icon = "file";
|
||||||
}
|
}
|
||||||
$file_created_at = nullable_htmlentities($row['file_created_at']);
|
$file_created_at = nullable_htmlentities($row['file_created_at']);
|
||||||
|
|
||||||
|
// Check if shared
|
||||||
|
$sql_shared = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT * FROM shared_items
|
||||||
|
WHERE item_client_id = $client_id
|
||||||
|
AND item_active = 1
|
||||||
|
AND item_views != item_view_limit
|
||||||
|
AND item_expire_at > NOW()
|
||||||
|
AND item_type = 'File'
|
||||||
|
AND item_related_id = $file_id
|
||||||
|
LIMIT 1"
|
||||||
|
);
|
||||||
|
$row = mysqli_fetch_array($sql_shared);
|
||||||
|
$item_id = intval($row['item_id']);
|
||||||
|
$item_active = nullable_htmlentities($row['item_active']);
|
||||||
|
$item_key = nullable_htmlentities($row['item_key']);
|
||||||
|
$item_type = nullable_htmlentities($row['item_type']);
|
||||||
|
$item_related_id = intval($row['item_related_id']);
|
||||||
|
$item_note = nullable_htmlentities($row['item_note']);
|
||||||
|
$item_views = nullable_htmlentities($row['item_views']);
|
||||||
|
$item_view_limit = nullable_htmlentities($row['item_view_limit']);
|
||||||
|
$item_created_at = nullable_htmlentities($row['item_created_at']);
|
||||||
|
$item_expire_at = nullable_htmlentities($row['item_expire_at']);
|
||||||
|
$item_expire_at_human = timeAgo($row['item_expire_at']);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
@@ -316,6 +343,11 @@ $num_of_files = mysqli_num_rows($sql);
|
|||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td><?php echo $file_created_at; ?></td>
|
<td><?php echo $file_created_at; ?></td>
|
||||||
|
<td>
|
||||||
|
<?php if($item_id) { ?>
|
||||||
|
<i class="fas fa-fw fa-link"></i> Shared
|
||||||
|
<?php } ?>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="dropdown dropleft text-center">
|
<div class="dropdown dropleft text-center">
|
||||||
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown">
|
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown">
|
||||||
|
|||||||
@@ -145,6 +145,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<th>Password / Key</th>
|
<th>Password / Key</th>
|
||||||
<th>OTP</th>
|
<th>OTP</th>
|
||||||
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=login_uri&order=<?php echo $disp; ?>">URI</a></th>
|
<th><a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=login_uri&order=<?php echo $disp; ?>">URI</a></th>
|
||||||
|
<th></th>
|
||||||
<th class="text-center">Action</th>
|
<th class="text-center">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -185,6 +186,32 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
$login_asset_id = intval($row['login_asset_id']);
|
$login_asset_id = intval($row['login_asset_id']);
|
||||||
$login_software_id = intval($row['login_software_id']);
|
$login_software_id = intval($row['login_software_id']);
|
||||||
|
|
||||||
|
// Check if shared
|
||||||
|
$sql_shared = mysqli_query(
|
||||||
|
$mysqli,
|
||||||
|
"SELECT * FROM shared_items
|
||||||
|
WHERE item_client_id = $client_id
|
||||||
|
AND item_active = 1
|
||||||
|
AND item_views != item_view_limit
|
||||||
|
AND item_expire_at > NOW()
|
||||||
|
AND item_type = 'Login'
|
||||||
|
AND item_related_id = $login_id
|
||||||
|
LIMIT 1"
|
||||||
|
);
|
||||||
|
$row = mysqli_fetch_array($sql_shared);
|
||||||
|
$item_id = intval($row['item_id']);
|
||||||
|
$item_active = nullable_htmlentities($row['item_active']);
|
||||||
|
$item_key = nullable_htmlentities($row['item_key']);
|
||||||
|
$item_type = nullable_htmlentities($row['item_type']);
|
||||||
|
$item_related_id = intval($row['item_related_id']);
|
||||||
|
$item_note = nullable_htmlentities($row['item_note']);
|
||||||
|
$item_views = nullable_htmlentities($row['item_views']);
|
||||||
|
$item_view_limit = nullable_htmlentities($row['item_view_limit']);
|
||||||
|
$item_created_at = nullable_htmlentities($row['item_created_at']);
|
||||||
|
$item_expire_at = nullable_htmlentities($row['item_expire_at']);
|
||||||
|
$item_expire_at_human = timeAgo($row['item_expire_at']);
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<tr class="<?php if (!empty($login_important)) { echo "text-bold"; } ?>">
|
<tr class="<?php if (!empty($login_important)) { echo "text-bold"; } ?>">
|
||||||
<td class="pr-0">
|
<td class="pr-0">
|
||||||
@@ -209,6 +236,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</td>
|
</td>
|
||||||
<td><?php echo $otp_display; ?></td>
|
<td><?php echo $otp_display; ?></td>
|
||||||
<td><?php echo $login_uri_display; ?></td>
|
<td><?php echo $login_uri_display; ?></td>
|
||||||
|
<td>
|
||||||
|
<?php if($item_id) { ?>
|
||||||
|
<i class="fas fa-fw fa-link"></i> Shared
|
||||||
|
<?php } ?>
|
||||||
|
</td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<?php if ( !empty($login_uri) || !empty($login_uri_2) ) { ?>
|
<?php if ( !empty($login_uri) || !empty($login_uri_2) ) { ?>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ $sql_recent_activities = mysqli_query(
|
|||||||
$mysqli,
|
$mysqli,
|
||||||
"SELECT * FROM logs
|
"SELECT * FROM logs
|
||||||
WHERE log_client_id = $client_id
|
WHERE log_client_id = $client_id
|
||||||
ORDER BY log_created_at DESC LIMIT 10"
|
ORDER BY log_created_at DESC LIMIT 5"
|
||||||
);
|
);
|
||||||
|
|
||||||
$sql_important_contacts = mysqli_query(
|
$sql_important_contacts = mysqli_query(
|
||||||
@@ -16,7 +16,7 @@ $sql_important_contacts = mysqli_query(
|
|||||||
WHERE contact_client_id = $client_id
|
WHERE contact_client_id = $client_id
|
||||||
AND (contact_important = 1 OR contact_billing = 1 OR contact_technical = 1 OR contact_primary = 1)
|
AND (contact_important = 1 OR contact_billing = 1 OR contact_technical = 1 OR contact_primary = 1)
|
||||||
AND contact_archived_at IS NULL
|
AND contact_archived_at IS NULL
|
||||||
ORDER BY contact_primary DESC, contact_name DESC"
|
ORDER BY contact_primary DESC, contact_name DESC LIMIT 5"
|
||||||
);
|
);
|
||||||
|
|
||||||
$sql_recent_tickets = mysqli_query(
|
$sql_recent_tickets = mysqli_query(
|
||||||
@@ -40,7 +40,7 @@ $sql_shared_items = mysqli_query(
|
|||||||
AND item_active = 1
|
AND item_active = 1
|
||||||
AND item_views != item_view_limit
|
AND item_views != item_view_limit
|
||||||
AND item_expire_at > NOW()
|
AND item_expire_at > NOW()
|
||||||
ORDER BY item_created_at DESC LIMIT 10"
|
ORDER BY item_created_at DESC LIMIT 5"
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -54,7 +54,7 @@ $sql_stale_tickets = mysqli_query(
|
|||||||
WHERE ticket_client_id = $client_id
|
WHERE ticket_client_id = $client_id
|
||||||
AND ticket_updated_at < CURRENT_DATE - INTERVAL 3 DAY
|
AND ticket_updated_at < CURRENT_DATE - INTERVAL 3 DAY
|
||||||
AND ticket_closed_at IS NULL
|
AND ticket_closed_at IS NULL
|
||||||
ORDER BY ticket_updated_at DESC"
|
ORDER BY ticket_updated_at DESC LIMIT 5"
|
||||||
);
|
);
|
||||||
|
|
||||||
// Get Domains Expiring
|
// Get Domains Expiring
|
||||||
@@ -65,7 +65,7 @@ $sql_domains_expiring = mysqli_query(
|
|||||||
AND domain_expire IS NOT NULL
|
AND domain_expire IS NOT NULL
|
||||||
AND domain_archived_at IS NULL
|
AND domain_archived_at IS NULL
|
||||||
AND domain_expire < CURRENT_DATE + INTERVAL 90 DAY
|
AND domain_expire < CURRENT_DATE + INTERVAL 90 DAY
|
||||||
ORDER BY domain_expire DESC"
|
ORDER BY domain_expire DESC LIMIT 5"
|
||||||
);
|
);
|
||||||
|
|
||||||
// Get Licenses Expiring
|
// Get Licenses Expiring
|
||||||
@@ -76,7 +76,7 @@ $sql_licenses_expiring = mysqli_query(
|
|||||||
AND software_expire IS NOT NULL
|
AND software_expire IS NOT NULL
|
||||||
AND software_archived_at IS NULL
|
AND software_archived_at IS NULL
|
||||||
AND software_expire < CURRENT_DATE + INTERVAL 90 DAY
|
AND software_expire < CURRENT_DATE + INTERVAL 90 DAY
|
||||||
ORDER BY software_expire DESC"
|
ORDER BY software_expire DESC LIMIT 5"
|
||||||
);
|
);
|
||||||
|
|
||||||
// Get Asset Warranties Expiring
|
// Get Asset Warranties Expiring
|
||||||
@@ -87,7 +87,7 @@ $sql_asset_warranties_expiring = mysqli_query(
|
|||||||
AND asset_warranty_expire IS NOT NULL
|
AND asset_warranty_expire IS NOT NULL
|
||||||
AND asset_archived_at IS NULL
|
AND asset_archived_at IS NULL
|
||||||
AND asset_warranty_expire < CURRENT_DATE + INTERVAL 90 DAY
|
AND asset_warranty_expire < CURRENT_DATE + INTERVAL 90 DAY
|
||||||
ORDER BY asset_warranty_expire DESC"
|
ORDER BY asset_warranty_expire DESC LIMIT 5"
|
||||||
);
|
);
|
||||||
|
|
||||||
// Get Assets Retiring
|
// Get Assets Retiring
|
||||||
@@ -98,7 +98,7 @@ $sql_asset_retire = mysqli_query(
|
|||||||
AND asset_install_date IS NOT NULL
|
AND asset_install_date IS NOT NULL
|
||||||
AND asset_archived_at IS NULL
|
AND asset_archived_at IS NULL
|
||||||
AND asset_install_date + INTERVAL 7 YEAR < CURRENT_DATE + INTERVAL 90 DAY
|
AND asset_install_date + INTERVAL 7 YEAR < CURRENT_DATE + INTERVAL 90 DAY
|
||||||
ORDER BY asset_install_date DESC"
|
ORDER BY asset_install_date DESC LIMIT 5"
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -107,7 +107,7 @@ $sql_asset_retire = mysqli_query(
|
|||||||
|
|
||||||
<!-- Notes -->
|
<!-- Notes -->
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-4">
|
||||||
|
|
||||||
<div class="card card-dark mb-3">
|
<div class="card card-dark mb-3">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
@@ -378,7 +378,7 @@ $sql_asset_retire = mysqli_query(
|
|||||||
|
|
||||||
<!-- Recent Activities -->
|
<!-- Recent Activities -->
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-4">
|
||||||
|
|
||||||
<div class="card card-dark mb-3">
|
<div class="card card-dark mb-3">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
|
|||||||
Reference in New Issue
Block a user