policybot/application/views/admin/list/review_list.php
2021-11-30 16:26:55 +05:30

200 lines
5.2 KiB
PHP

<link href="<?=base_url();?>bassets/jquery-tags-input/jquery-tags-input.css" rel="stylesheet">
<?php $this->load->view('admin/includes/header');?>
<style>
.switch {
position: relative;
display: inline-block;
width: 60px;
height: 34px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.sliderrr {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #e43a45;
-webkit-transition: .4s;
transition: .4s;
width: 50px;
height: 30px;
border-radius: 20px !important;
}
.sliderrr:before {
position: absolute;
content: "";
height: 22px;
width: 22px;
left: 0px;
bottom: 4px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
input:checked + .sliderrr {
background-color: #26c281;
width: 50px;
height: 30px;
border-radius: 20px !important;
}
input:focus + .sliderrr {
box-shadow: 0 0 1px #2196F3;
}
input:checked + .sliderrr:before {
-webkit-transform: translateX(26px);
-ms-transform: translateX(26px);
transform: translateX(26px);
}
/* Rounded sliders */
.sliderrr.round {
border-radius: 34px;
}
.sliderrr.round:before {
border-radius: 50%;
}
a.morelink {
text-decoration:none;
outline: none;
}
.morecontent span {
display: none;
}
</style>
<div class="page-container">
<?php $this->load->view('admin/includes/sidebar');?>
<!-- start page content -->
<div class="page-content-wrapper">
<div class="page-content">
<div class="page-bar">
<div class="page-title-breadcrumb">
<div class=" pull-left">
<div class="page-title">Reviews List</div>
</div>
<ol class="breadcrumb page-breadcrumb pull-right">
<li><i class="fa fa-home"></i>&nbsp;<a class="parent-item" href="index.html">Home</a>&nbsp;<i class="fa fa-angle-right"></i>
</li>
<li><a class="parent-item" href="#">Reviews</a>&nbsp;<i class="fa fa-angle-right"></i>
</li>
<li class="active">Reviews List</li>
</ol>
</div>
</div>
<?php $this->load->view('admin/includes/msg');?>
<div class="row">
<div class="col-md-12">
<div class="card card-topline-orange">
<div class="white-box">
<div class="card card-box">
<div class="card-head">
<header>Reviews</header>
</div>
<div class="card-body ">
<div class="table-scrollable">
<table class="table table-hover table-checkable order-column full-width" id="example4">
<thead>
<tr>
<th>S no</th>
<th> User </th>
<th> Agent </th>
<th> Rating </th>
<th> text </th>
<th> IP Address </th>
<th> Browser </th>
<th> Post Date </th>
<th> Status </th>
</tr>
</thead>
<tbody>
<?php
if(isset($rev)&& $rev->num_rows()>0)
{
$i=1;
foreach($rev->result() as $s)
{
$id=$s->id;
$username=$s->username;
$agentname=$s->agentname;
$rating=$s->rating;
$text=$s->text;
$ip=$s->ip;
$browser=$s->browser;
$cdate=$s->cdate;
$status=$s->status;
if($status=="1"){ $revstatus="Approved"; $color="green";}
else{ $revstatus="Not Approved";$color="red";}
?>
<tr class="odd gradeX">
<td><?=$i;?></td>
<td><?=ucwords($username);?></td>
<td><?=ucwords($agentname);?></td>
<td><?= ($rating);?></td>
<td><?= ($text);?></td>
<td><?= ($ip);?></td>
<td><?= ($browser);?></td>
<td><?php if($cdate!="0000-00-00 00:00:00"){?><?= date("d-m-Y H:i:s",strtotime($cdate));?><?php } ?></td>
<td style="color:<?=$color;?>"><?= ($revstatus);?></td>
</tr>
<?php $i++; } } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="cmppop" tabindex="-1" role="basic" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="viewdetails">
<img src="<?=base_url();?>bassets/admin/img/process.gif" class="loader-img">
</div>
</div>
</div>
</div>
<?php $this->load->view('admin/includes/footer');?>
<script type="text/javascript" src="<?=base_url();?>bassets/admin/js/jquery.cookie.min.js"></script>
<script>
var base_url=$('body').attr('data-path');
$(".showmore").on('click',function(){
var id = $(this).attr('data-id');
$('#cmppop').modal('show');
$('.viewdetails').html('<img src='+base_url+'bassets/admin/img/process.gif class="loader-img">');
var url23=base_url+"lists/get_enquire";
$.post(url23,{id:id,csrf_test_name:$.cookie('csrf_cookie_name')},function(res23){
$('.viewdetails').html(res23);
});
});
</script>