mirror of https://github.com/itflow-org/itflow
Show Red Badge Count next to client domains if Domain is expired or expires within 5 days
This commit is contained in:
parent
3eb6ee57fb
commit
a4a110f1e7
|
|
@ -203,7 +203,7 @@
|
|||
|
||||
<?php
|
||||
if ($num_domains > 0) { ?>
|
||||
<span class="right badge <?php if ($num_domains_expiring > 0) { ?> badge-warning text-dark<?php } ?> text-light"><?php echo $num_domains; ?></span>
|
||||
<span class="right badge <?php if ($num_domains_expiring > 0) { ?> badge-warning text-dark<?php } ?> <?php if ($num_domains_expired > 0) { ?> badge-danger <?php } ?> text-white"><?php echo $num_domains; ?></span>
|
||||
<?php } ?>
|
||||
</p>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -223,6 +223,20 @@ if (isset($_GET['client_id'])) {
|
|||
));
|
||||
$num_domains_expiring = intval($row['num']);
|
||||
|
||||
// Count Domains Expired or within 5 days
|
||||
$row = mysqli_fetch_assoc(mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT COUNT('domain_id') AS num FROM domains
|
||||
WHERE domain_client_id = $client_id
|
||||
AND domain_expire IS NOT NULL
|
||||
AND (
|
||||
domain_expire < CURRENT_DATE
|
||||
OR domain_expire < CURRENT_DATE + INTERVAL 5 DAY
|
||||
)
|
||||
AND domain_archived_at IS NULL"
|
||||
));
|
||||
$num_domains_expired = intval($row['num']);
|
||||
|
||||
// Count Certificates Expiring within 30 Days
|
||||
$row = mysqli_fetch_assoc(mysqli_query(
|
||||
$mysqli,
|
||||
|
|
|
|||
Loading…
Reference in New Issue