policybot/application/views/front/user-review.php
2021-11-30 16:26:55 +05:30

111 lines
2.7 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"> User 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>Your Reviews</h3>
<div class="table-responsive">
<table class="table table-striped table-bordered datatable1" cellspacing="0" width="100%">
<thead>
<tr>
<th>S.No</th>
<th>Agent Name</th>
<th>Rating</th>
<th>Review</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<?php
if(isset($rev)&& $rev->num_rows()>0)
{
$i=1;
foreach($rev->result() as $r)
{
$id=$r->id;
$username=$r->agentname;
$rating=$r->rating;
$text=$r->text;
$status=$r->status;
if($status==0){ $mgsstatus="Not Approved"; $msg="Approve"; $colors="red"; $color="success";}
else { $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>
</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>