:: **Zploit** v1.0 | Current Path: **/home/kreativepixelz/www/crm/quatation/**
:: Editing File: notifications_list.php
<?php include_once("session.php"); include("header.php"); include("db.php"); // Assume $conn is established here ?> <main> <div class="container-fluid"> <div class="row m-1"> <div class="col-12"> <h4 class="main-title">Notification</h4> <ul class="app-line-breadcrumbs mb-3"> <li><a class="f-s-14 f-w-500" href="dashboard.php"><i class="ph-duotone ph-bank f-s-16"></i> Home</a></li> <li><a class="f-s-14 f-w-500" href="notifications_list.php"><i class="ph-duotone ph-table f-s-16"></i> Notification</a></li> </ul> </div> </div> <div class="row"> <div class="col-12"> <div class="card"> <div class="card-body"> <div class="row"> <div class="col-lg-12 mb-12 mb-lg-0"> <h6 class="mb-3"><?php echo $_SESSION['user_fullname']; ?></h6> <?php //$user_id = $_SESSION['user_id']; if($user_id == '1') { $sql = "SELECT * FROM notifications WHERE is_read='0' ORDER BY created_at desc "; } else { $sql = "SELECT * FROM notifications WHERE is_read='0' AND `user_id` ='$user_id' ORDER BY created_at desc "; } $result = mysqli_query($conn, $sql); ?> <?php if (mysqli_num_rows($result) > 0) { ?> <?php while ($note = mysqli_fetch_assoc($result)) { ?> <div aria-atomic="true" aria-live="assertive" class="toast d-block b-1-primary bg-light-primary" role="alert" style="width: 100%;margin-bottom:20px;"> <div class="toast-header b-b-1-primary bg-light-primary"> <strong class="me-auto"> <span class="<?php echo ($note['type'] == 'success') ? 'text-success' : (($note['type'] == 'error') ? 'text-danger' : 'text-secondary'); ?>"> <?php echo htmlspecialchars($note['message']);?> </span> </strong> </div> <div class="toast-body border-primary border-opacity-25"> <span class="badge text-light-primary"> <?php echo date("d-M-Y H:i", strtotime($note['created_at'])); ?></span> </div> </div> <?php } } ?> </div> </div> </div> </div> </div> </div> </div> </main> <?php include("footer.php"); ?>