mirror of
https://github.com/itflow-org/itflow
synced 2026-07-26 18:27:14 +00:00
Replaces the duplicated primary/billing/technical checks across portal pages, post.php handlers, nav, and dashboard with contactCan()/enforceContactCan(). Same behavior, but the rules now live in one place instead of being copy-pasted, which is what let them drift before. file.php keeps its 404 response; ticket-visibility and approval-routing checks are intentionally left as-is.
59 lines
1.8 KiB
PHP
59 lines
1.8 KiB
PHP
<?php
|
|
/*
|
|
* Client Portal
|
|
* Certificate listing for PTC / technical contacts
|
|
*/
|
|
|
|
header("Content-Security-Policy: default-src 'self'");
|
|
|
|
require_once "includes/inc_all.php";
|
|
|
|
enforceContactCan('itdoc');
|
|
|
|
$certificates_sql = mysqli_query($mysqli, "SELECT certificate_id, certificate_name, certificate_domain, certificate_issued_by, certificate_expire FROM certificates WHERE certificate_client_id = $session_client_id AND certificate_archived_at IS NULL ORDER BY certificate_expire ASC");
|
|
?>
|
|
|
|
<h3>Web Certificates</h3>
|
|
<div class="row">
|
|
|
|
<div class="col-md-10">
|
|
|
|
<table class="table tabled-bordered border border-dark">
|
|
<thead class="thead-dark">
|
|
<tr>
|
|
<th>Certificate Name</th>
|
|
<th>FQDN</th>
|
|
<th>Issuer</th>
|
|
<th>Expiry</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<?php
|
|
while ($row = mysqli_fetch_assoc($certificates_sql)) {
|
|
$certificate_name = escapeHtml($row['certificate_name']);
|
|
$certificate_domain = escapeHtml($row['certificate_domain']);
|
|
$certificate_issued_by = escapeHtml($row['certificate_issued_by']);
|
|
$certificate_expire = escapeHtml($row['certificate_expire']);
|
|
|
|
?>
|
|
|
|
<tr>
|
|
<td><?php echo $certificate_name; ?></td>
|
|
<td><?php echo $certificate_domain; ?></td>
|
|
<td><?php echo $certificate_issued_by; ?></td>
|
|
<td><?php echo $certificate_expire; ?></td>
|
|
</tr>
|
|
|
|
<?php } ?>
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php
|
|
require_once "includes/footer.php";
|