|
Server : LiteSpeed System : Linux terra.hostitbro.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64 User : outerorb ( 1091) PHP Version : 8.1.34 Disable Function : mail Directory : /home2/outerorb/assetradar.outerorbittech.com/ | |
|
Path: /home2/outerorb/assetradar.outerorbittech.com/notifications.php
Size: 1.06 KB
Permissions: 0666
<?php
require_once 'inc/auth.php';
require_login();
$user = current_user();
include 'inc/header.php';
if (isset($_GET['mark']) && is_numeric($_GET['mark'])) {
mark_notification_read((int)$_GET['mark']);
header('Location: notifications.php');
exit;
}
$notes = get_notifications($user['id'], 100);
?>
<div class="card p-3 card-hero">
<h5>Your Notifications</h5>
<table class="table">
<thead><tr><th>Message</th><th>Date</th><th>Action</th></tr></thead>
<tbody>
<?php foreach($notes as $n): ?>
<tr class="<?php echo $n['is_read']? 'text-muted': ''; ?>">
<td><?php echo esc($n['message']); ?></td>
<td><?php echo $n['created_at']; ?></td>
<td>
<?php if (!$n['is_read']): ?>
<a href="?mark=<?php echo $n['id']; ?>" class="btn btn-sm btn-outline-primary">Mark read</a>
<?php else: ?>
<span class="small">Read</span>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php include 'inc/footer.php'; ?>