Fixed Broken Link to all assets on the dashboard, added link for all domains, updated all domains report to highlight domains, expired and expiring

This commit is contained in:
johnnyq 2024-09-13 14:35:46 -04:00
parent 07df444561
commit 6975d6ef44
2 changed files with 27 additions and 4 deletions

View File

@ -597,7 +597,7 @@ if ($user_config_dashboard_technical_enable == 1) {
<!-- ./col -->
<div class="col-lg-4 col-6">
<a class="small-box bg-info" href="/report_all_assets_by_client.php">
<a class="small-box bg-info" href="report_assets.php">
<div class="inner">
<h3><?php echo $assets_added; ?></h3>
<p>New Assets</p>
@ -623,7 +623,7 @@ if ($user_config_dashboard_technical_enable == 1) {
<!-- ./col -->
<div class="col-lg-4 col-6">
<a class="small-box bg-warning">
<a class="small-box bg-warning" href="domains.php">
<div class="inner">
<h3><?php echo $expiring_domains; ?></h3>
<p>Expiring Domains</p>

View File

@ -101,6 +101,26 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
$domain_name = nullable_htmlentities($row['domain_name']);
$domain_description = nullable_htmlentities($row['domain_description']);
$domain_expire = nullable_htmlentities($row['domain_expire']);
$domain_expire_ago = timeAgo($domain_expire);
// Convert the expiry date to a timestamp
$domain_expire_timestamp = strtotime($row['domain_expire']);
$current_timestamp = time(); // Get current timestamp
// Calculate the difference in days
$days_until_expiry = ($domain_expire_timestamp - $current_timestamp) / (60 * 60 * 24);
// Determine the class based on the number of days until expiry
if ($days_until_expiry <= 0) {
$tr_class = "table-secondary";
} elseif ($days_until_expiry <= 14) {
$tr_class = "table-danger";
} elseif ($days_until_expiry <= 90) {
$tr_class = "table-warning";
} else {
$tr_class = '';
}
$domain_registrar_name = nullable_htmlentities($row['registrar_name']);
if($domain_registrar_name) {
$domain_registrar_name_display = $domain_registrar_name;
@ -120,7 +140,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
$client_name = nullable_htmlentities($row['client_name']);
?>
<tr>
<tr class="<?php echo $tr_class; ?>">
<td class="pr-0">
<div class="form-check">
<input class="form-check-input bulk-select" type="checkbox" name="domain_ids[]" value="<?php echo $domain_id ?>">
@ -142,7 +162,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<td><?php echo $domain_webhost_name_display; ?></td>
<td><?php echo $domain_dnshost_name_display; ?></td>
<td><?php echo $domain_mailhost_name_display; ?></td>
<td><?php echo $domain_expire; ?></td>
<td>
<div><?php echo $domain_expire; ?></div>
<div><small><?php echo $domain_expire_ago; ?></small></div>
</td>
<td><?php echo $client_name; ?></td>
<td>
<div class="dropdown dropleft text-center">