tech4biz/admin/feedback-review.php
2024-10-24 17:20:08 +05:30

225 lines
14 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&amp;display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i,700,700i,900&amp;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>
<script src="./assets/js/ckeditor.js"></script>
</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>Job List</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">Job List</li>
<li class="breadcrumb-item active">Job List</li>
</ol>
</div>
</div>
</div>
</div> -->
<!-- Container-fluid starts-->
<div class="container-fluid">
<div class="row">
<div class="col-sm-12">
<div class="card mt-3">
<div class="job-title-admin">
<h3>Feedback Review</h3>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="display" id="advance-1">
<thead>
<tr>
<th>Feedback Title</th>
<th>Email</th>
<th>Feedback Type</th>
<th>Description</th>
<th>Rating</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$careersData = $connection->query("SELECT * FROM `feedback_report` ");
foreach ($careersData as $val) {
?>
<tr>
<td><?php echo $val['feedback_title']; ?></td>
<td><?php echo $val['email']; ?></td>
<td><?php echo $val['feedback_type']; ?></td>
<td><?php echo $val['description']; ?></td>
<td><?php echo $val['rating']; ?></td>
<td>
<div class="job-list-action">
<span class="job-list-action-icon">
<?php
if($val['image']){
?>
<a href="./feedback_image/<?php echo $val['image']; ?>" target="_blank">
<svg xmlns="http://www.w3.org/2000/svg" width="29.25" height="29.25" viewBox="0 0 29.25 29.25">
<g id="Icon_ionic-ios-image" data-name="Icon ionic-ios-image" transform="translate(-3.375 -3.375)">
<path id="Path_10" data-name="Path 10" d="M7.917,21.959H21.326a.392.392,0,0,0,.316-.619L14.934,10.554a.388.388,0,0,0-.64,0L7.594,21.34A.394.394,0,0,0,7.917,21.959Z"/>
<path id="Path_11" data-name="Path 11" d="M21.565,17.88,24.026,21.8a.381.381,0,0,0,.316.169h3.741a.392.392,0,0,0,.316-.619L24.068,15.18a.388.388,0,0,0-.64,0l-1.87,2.257A.405.405,0,0,0,21.565,17.88Z"/>
<path id="Path_12" data-name="Path 12" d="M24.687,11.805a1.968,1.968,0,1,0-2.159-2.159A1.976,1.976,0,0,0,24.687,11.805Z"/>
<path id="Path_13" data-name="Path 13" d="M30.375,3.375H5.625a2.248,2.248,0,0,0-2.25,2.25v24.75a2.248,2.248,0,0,0,2.25,2.25h24.75a2.248,2.248,0,0,0,2.25-2.25V5.625A2.248,2.248,0,0,0,30.375,3.375Zm-.19,19.688a.564.564,0,0,1-.562.563H6.377a.564.564,0,0,1-.562-.562V6.377a.564.564,0,0,1,.563-.562H29.63a.564.564,0,0,1,.563.563V23.063Z"/>
</g>
</svg>
</a>
<?php
}
if($val['video']){
?>
<a href="./feedback_image/<?php echo $val['video']; ?>" target="_blank">
<svg xmlns="http://www.w3.org/2000/svg" width="33" height="27" viewBox="0 0 33 27">
<path id="Icon_material-ondemand-video" data-name="Icon material-ondemand-video" d="M31.5,4.5H4.5a2.99,2.99,0,0,0-3,3v18a3,3,0,0,0,3,3H12v3H24v-3h7.5a3,3,0,0,0,2.985-3l.015-18A3,3,0,0,0,31.5,4.5Zm0,21H4.5V7.5h27Zm-7.5-9-10.5,6v-12Z" transform="translate(-1.5 -4.5)"/>
</svg>
</a>
<?php
}
?>
</span>
<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'; ?>
<script src="./assets/js/jquery-3.5.1.min.js"></script>
<script src="./assets/js/bootstrap/bootstrap.bundle.min.js"></script>
<script src="./assets/js/icons/feather-icon/feather.min.js"></script>
<script src="./assets/js/icons/feather-icon/feather-icon.js"></script>
<script src="./assets/js/scrollbar/simplebar.js"></script>
<script src="./assets/js/scrollbar/custom.js"></script>
<script src="./assets/js/config.js"></script>
<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>
<script src="./assets/js/script.js"></script>
<script>
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: "./api/feedback-review-delete-data.php",
data: "api_type=delete&id=" + id,
success: function (text) {
let data = JSON.parse(text)
if (data.status == 200) {
Swal.fire(
'Deleted!',
'Your job has been deleted.',
'success'
)
setTimeout(() => {
window.location.reload();
}, 1000);
} else {
formError();
submitMSG(false, text);
}
}
});
}
})
}
</script>
</body>
</html>