222 lines
12 KiB
PHP
222 lines
12 KiB
PHP
<?PHP
|
|
require_once "./db/config.php";
|
|
require_once "./includes/functions.php";
|
|
|
|
if (!isset($_SESSION["loggedAdmin"]) || empty($_SESSION["loggedAdmin"])) {
|
|
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
|
|
header("location: login.php?redirect_to=$actual_link");
|
|
}
|
|
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>Tech4Biz - Category Manage</title>
|
|
<?PHP include "./includes/links.php"; ?>
|
|
<link href="https://fonts.googleapis.com/css?family=Rubik:400,400i,500,500i,700,700i&display=swap" rel="stylesheet">
|
|
<link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i,700,700i,900&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" type="text/css" href="./assets/css/font-awesome.css">
|
|
<!-- ico-font-->
|
|
<link rel="stylesheet" type="text/css" href="./assets/css/vendors/icofont.css">
|
|
<!-- Themify icon-->
|
|
<link rel="stylesheet" type="text/css" href="./assets/css/vendors/themify.css">
|
|
<!-- Flag icon-->
|
|
<link rel="stylesheet" type="text/css" href="./assets/css/vendors/flag-icon.css">
|
|
<!-- Feather icon-->
|
|
<link rel="stylesheet" type="text/css" href="./assets/css/vendors/feather-icon.css">
|
|
<!-- Plugins css start-->
|
|
<link rel="stylesheet" type="text/css" href="./assets/css/vendors/scrollbar.css">
|
|
<link rel="stylesheet" type="text/css" href="./assets/css/vendors/datatables.css">
|
|
<!-- Plugins css Ends-->
|
|
<!-- Bootstrap css-->
|
|
<link rel="stylesheet" type="text/css" href="./assets/css/vendors/bootstrap.css">
|
|
<!-- App css-->
|
|
<link rel="stylesheet" type="text/css" href="./assets/css/style.css">
|
|
<link id="color" rel="stylesheet" href="./assets/css/color-1.css" media="screen">
|
|
<!-- Responsive css-->
|
|
<link rel="stylesheet" type="text/css" href="./assets/css/responsive.css">
|
|
<style>
|
|
|
|
.flex-justify-column {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<!-- loader starts-->
|
|
<?PHP include "./includes/loader.php"; ?>
|
|
<!-- loader ends-->
|
|
<!-- tap on top starts-->
|
|
<div class="tap-top"><i data-feather="chevrons-up"></i></div>
|
|
<!-- tap on tap ends-->
|
|
<!-- page-wrapper Start-->
|
|
<div class="page-wrapper compact-wrapper" id="pageWrapper">
|
|
<!-- Page Header Start-->
|
|
<?PHP include "./includes/header.php"; ?>
|
|
<!-- Page Header Ends -->
|
|
<!-- Page Body Start-->
|
|
<div class="page-body-wrapper">
|
|
<!-- Page Sidebar Start-->
|
|
<?PHP include "./includes/sidebar.php"; ?>
|
|
<!-- Page Sidebar Ends-->
|
|
<div class="page-body">
|
|
<div class="container-fluid">
|
|
<div class="page-title">
|
|
<div class="row">
|
|
<div class="col-6">
|
|
<h3>Support</h3>
|
|
</div>
|
|
<div class="col-6">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item"><a href="index-2.html" data-bs-original-title="" title="">
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-home">
|
|
<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path>
|
|
<polyline points="9 22 9 12 15 12 15 22"></polyline>
|
|
</svg>
|
|
</a></li>
|
|
<li class="breadcrumb-item">Support</li>
|
|
<li class="breadcrumb-item active">Support</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Container-fluid starts-->
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<div class="table-responsive">
|
|
<table class="display" id="advance-1">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Email</th>
|
|
<th>Phone</th>
|
|
<th>Subject</th>
|
|
<th>Date</th>
|
|
<th>Message</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<!-- <tbody>
|
|
<tr>
|
|
<td>For Testing</td>
|
|
<td>testing#@gmail.com</td>
|
|
<td>0000000000</td>
|
|
<td>Testing Subject</td>
|
|
<td>16-11-2022</td>
|
|
<td>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s</td>
|
|
</tr>
|
|
</tbody> -->
|
|
<tbody>
|
|
<?php
|
|
$userData = $connection->query("SELECT * FROM `contact_us` ");
|
|
foreach ($userData as $val) {
|
|
?>
|
|
<tr>
|
|
<td><?php echo $val['name']; ?></td>
|
|
<td><?php echo $val['email']; ?></td>
|
|
<td><?php echo $val['phone']; ?></td>
|
|
<td><?php echo $val['subject']; ?></td>
|
|
<td>
|
|
<?php
|
|
$timestamp = strtotime($val['created_date']);
|
|
echo date('d-n-Y g:i a', $timestamp);
|
|
?>
|
|
</td>
|
|
<td><?php echo $val['message']; ?></td>
|
|
<td>
|
|
<div class="job-list-action">
|
|
<span class="job-list-action-icon">
|
|
<svg onclick='deleteModel(<?php echo json_encode($val['id']);?>)' xmlns="http://www.w3.org/2000/svg" width="32" height="36" viewBox="0 0 32 36">
|
|
<path id="Path_1" data-name="Path 1" d="M13.05,42a2.988,2.988,0,0,1-3-3V10.5H8v-3h9.4V6H30.6V7.5H40v3H37.95V39a3.076,3.076,0,0,1-3,3Zm21.9-31.5H13.05V39h21.9ZM18.35,34.7h3V14.75h-3Zm8.3,0h3V14.75h-3ZM13.05,10.5v0Z" transform="translate(-8 -6)"/>
|
|
</svg>
|
|
</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<?php }?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Container-fluid Ends-->
|
|
</div>
|
|
<!-- footer start-->
|
|
<?PHP include './includes/footer.php'; ?>
|
|
<!-- footer end-->
|
|
</div>
|
|
</div>
|
|
<?PHP include './includes/scripts.php'; ?>
|
|
<!-- latest jquery-->
|
|
<script src="./assets/js/jquery-3.5.1.min.js"></script>
|
|
<!-- Bootstrap js-->
|
|
<script src="./assets/js/bootstrap/bootstrap.bundle.min.js"></script>
|
|
<!-- feather icon js-->
|
|
<script src="./assets/js/icons/feather-icon/feather.min.js"></script>
|
|
<script src="./assets/js/icons/feather-icon/feather-icon.js"></script>
|
|
<!-- scrollbar js-->
|
|
<script src="./assets/js/scrollbar/simplebar.js"></script>
|
|
<script src="./assets/js/scrollbar/custom.js"></script>
|
|
<!-- Sidebar jquery-->
|
|
<script src="./assets/js/config.js"></script>
|
|
<!-- Plugins JS start-->
|
|
<script src="./assets/js/sidebar-menu.js"></script>
|
|
<script src="./assets/js/datatable/datatables/jquery.dataTables.min.js"></script>
|
|
<script src="./assets/js/datatable/datatables/datatable.custom.js"></script>
|
|
<!-- Plugins JS Ends-->
|
|
<!-- Theme js-->
|
|
<script src="./assets/js/script.js"></script>
|
|
<script src="./assets/js/theme-customizer/customizer.js"></script>
|
|
<!-- login js-->
|
|
<!-- Plugin used-->
|
|
<script type="text/javascript">
|
|
function deleteModel(id){
|
|
Swal.fire({
|
|
title: 'Are you sure?',
|
|
text: "You won't be able to revert this!",
|
|
icon: 'warning',
|
|
showCancelButton: true,
|
|
confirmButtonColor: '#3085d6',
|
|
cancelButtonColor: '#d33',
|
|
confirmButtonText: 'Yes, delete it!'
|
|
}).then((result) => {
|
|
if (result.isConfirmed) {
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "add_contact_us.php",
|
|
data: "api_type=delete&id=" + id,
|
|
success: function (text) {
|
|
let data = JSON.parse(text)
|
|
if (data.status == 200) {
|
|
Swal.fire(
|
|
'Deleted!',
|
|
'Your contact has been deleted.',
|
|
'success'
|
|
)
|
|
setTimeout(() => {
|
|
window.location.reload();
|
|
}, 1000);
|
|
} else {
|
|
formError();
|
|
submitMSG(false, text);
|
|
}
|
|
}
|
|
});
|
|
|
|
}
|
|
})
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|