112 lines
2.9 KiB
PHP
112 lines
2.9 KiB
PHP
<?php $this->load->view('front/includes/header'); ?>
|
|
<?php $primaryid=$this->session->userdata('primaryid');
|
|
$userrole=$this->session->userdata('userrole');
|
|
$loggedname=$this->session->userdata('loggedname');
|
|
|
|
|
|
$tables="users";
|
|
$wheres=array("id"=>$primaryid);
|
|
$shows=("*");
|
|
|
|
$userdet=$this->commonsql_model->selectTable($tables,$wheres,$shows);
|
|
if($userdet->num_rows()>0)
|
|
{
|
|
$u=$userdet->row();
|
|
$loggedusername=$u->name;
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
<style>
|
|
.fbox-center .fbox-icon {
|
|
margin-bottom: 1rem!important;
|
|
}
|
|
.fbox-bg.fbox-center {
|
|
|
|
padding: 0 1rem 1rem !important;
|
|
|
|
}
|
|
.form-error{ text-align:end!important; }
|
|
</style>
|
|
<section id="page-title" style="background-image: url('<?=base_url();?>fassets/images/about/333.jpg');">
|
|
|
|
<div class="container clearfix">
|
|
<h1 style="text-align:center"> Agent Profile </h1>
|
|
<span style="text-align:center;font-weight:500">Hi <?=ucwords($loggedusername);?> , Welcome to policybot</span>
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<section id="content">
|
|
<div class="content-wrap ">
|
|
<div class="container clearfix">
|
|
<div class="row" >
|
|
<div class="col-md-4 col-lg-3">
|
|
<?php $this->load->view('front/includes/leftmenu'); ?>
|
|
</div>
|
|
<div class="col-md-8 col-lg-9">
|
|
<h3>Reviews From User</h3>
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-bordered datatable1" cellspacing="0" width="100%">
|
|
<thead>
|
|
<tr>
|
|
<th>S.No</th>
|
|
<th>User Name</th>
|
|
<th>Rating</th>
|
|
<th>Review</th>
|
|
<th>Status</th>
|
|
<th>Action</th>
|
|
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php
|
|
if(isset($rev)&& $rev->num_rows()>0)
|
|
{
|
|
$i=1;
|
|
foreach($rev->result() as $r)
|
|
{
|
|
$id=$r->id;
|
|
$username=$r->username;
|
|
$rating=$r->rating;
|
|
$text=$r->text;
|
|
$status=$r->status;
|
|
if($status==0){ $val="1";$mgsstatus="Not Approved"; $msg="Approve"; $colors="red"; $color="success";}
|
|
else { $val="0";$mgsstatus="Approved"; $msg="Not Approve"; $color="danger";$colors="green"; }
|
|
?>
|
|
<tr>
|
|
<td><?=$i;?></td>
|
|
<td><?=ucwords($username);?></td>
|
|
<td><?=$rating;?></td>
|
|
<td><?=$text;?></td>
|
|
<td style="color:<?=$colors;?>"><?=$mgsstatus;?></td>
|
|
<td><a href="<?=base_url();?>frontend/approvereview/<?=$id;?>/<?=$val;?>"><button type="button" class="btn btn-outline-<?=$color;?>"><?=$msg;?></button></td>
|
|
|
|
</tr>
|
|
<?php $i++; } } ?>
|
|
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<?php $this->load->view('front/includes/footer'); ?>
|
|
<script>
|
|
|
|
$(document).ready(function() {
|
|
$('.datatable1').dataTable();
|
|
});
|
|
|
|
</script>
|