File "show_emails.php"
Full Path: /home/ccipcixf/public_html/hirepro/a_company/show_emails.php
File size: 4.77 KB
MIME-type: text/x-php
Charset: utf-8
<?php
session_start();
if (isset($_SESSION['company_a_role']) && $_SESSION['company_a_role'] !== "A") {
header("location:index.php");
exit(); // Add an exit to stop further execution after redirection
}
include "menu.php";
$title = "Company A";
?>
<?php if (isset($_SESSION["company_a_role"]) == "A") : ?>
<!DOCTYPE html>
<html lang="en" class="light-style layout-menu-fixed" dir="ltr" data-theme="theme-default" data-assets-path="../assets/" data-template="vertical-menu-template-free">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
<title><?php echo $title ?></title>
<link rel="stylesheet" href="//cdn.datatables.net/1.13.7/css/jquery.dataTables.min.css">
<!-- This page plugin CSS -->
<!-- <link href="assets/extra-libs/datatables.net-bs4/css/dataTables.bootstrap4.css" rel="stylesheet"> -->
<meta name="description" content="" />
</head>
<body>
<!-- Content wrapper -->
<div class="content-wrapper">
<!-- Content -->
<div class="container-xxl flex-grow-1 container-p-y ">
<!-- <a href="EMS_form.php"><button class=" btn btn-primary float-end mt-3 mb-2" style="background: linear-gradient(#0052D4, #2B32B2 );">Add New Form</button></a> -->
<h4 class="fw-bold py-3 mb-4"><span class="text-muted fw-light"><?php echo $title . " " . "Users" ?></h4>
<!-- Basic Bootstrap Table -->
<!-- Striped Rows -->
<div class="card p-3">
<div class="table-responsive">
<?php
include "config.php";
$query = "SELECT * FROM `a_messages`";
$result = mysqli_query($conn, $query);
if (mysqli_num_rows($result) > 0) {
// echo "<pre>";
// print_r($result);
?>
<table id="my_Table" class="table table-striped table-bordered no-wrap" style="width:100%">
<thead>
<tr>
<th>ID</th>
<th>Email</th>
<th>Designation</th>
<th>Test Send</th>
<th>Message</th>
</tr>
</thead>
<tbody class="table-border-bottom-0">
<?php
while ($row = mysqli_fetch_assoc($result)) {
?>
<tr>
<td class='id'><?php echo $row["id"] ?></td>
<td><?php echo $row["email"] ?></td>
<td class="text-center"><?php echo $row["designation"] ?></td>
<td class="text-center"><?php echo $row["test"] ?></td>
<td class="text-start"><?php echo $row["text_message"] ?></td>
<!-- <td class='view'><a href='users_view.php?id=<?php echo $row["id"] ?>'><i class="bx bx-show me-1" style="color: #0350d2;"></i></a></td> -->
<!-- <td class='delete'><a href='users_view.php?id=<?php echo $row["id"] ?>'><i class="bx bx-trash me-1" style="color: #0350d2;"></i></a></td> -->
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
<?php } ?>
<!--/ Striped Rows -->
<hr class="my-5" />
</div>
<!-- / Content -->
<!--This page plugins -->
<script src="https://code.jquery.com/jquery-3.7.0.js">
</script>
<!-- <script src="https://cdn.datatables.net/1.13.7/js/dataTables.bootstrap5.min.js"></script> -->
<script src="https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js"></script>
<script>
$(document).ready(function() {
$('#my_Table').DataTable();
});
</script>
</body>
</html>
<?php endif; ?>