123 lines
3.4 KiB
PHP
123 lines
3.4 KiB
PHP
<?php $this->load->view('front/includes/header'); ?>
|
|
<link rel="stylesheet" href="<?=base_url();?>fassets/css/components/bs-filestyle.css" type="text/css" />
|
|
<?php $primaryid=$this->session->userdata('primaryid');
|
|
$userrole=$this->session->userdata('userrole');
|
|
$loggedname=$this->session->userdata('loggedname');
|
|
|
|
$tables="users";
|
|
$wheres=array("id"=>$primaryid);
|
|
$shows=("*");
|
|
|
|
$userdets=$this->commonsql_model->selectTable($tables,$wheres,$shows);
|
|
if($userdets->num_rows()>0)
|
|
{
|
|
$u=$userdets->row();
|
|
$loggedusername=$u->name;
|
|
}
|
|
|
|
$tables="wishlist";
|
|
$wheres=array("user_id"=>$primaryid,"status"=>1);
|
|
$shows=("*");
|
|
|
|
$userdet=$this->commonsql_model->selectTable($tables,$wheres,$shows);
|
|
|
|
?>
|
|
<style>
|
|
.fbox-center .fbox-icon {
|
|
margin-bottom: 1rem!important;
|
|
}
|
|
.fbox-bg.fbox-center {
|
|
|
|
padding: 0 1rem 1rem !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>
|
|
<!-- Content
|
|
============================================= -->
|
|
<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>Favourites</h3>
|
|
<div class="row">
|
|
<?php
|
|
if(isset($userdet)&& $userdet->num_rows()>0)
|
|
{
|
|
foreach($userdet->result() as $pd)
|
|
{
|
|
|
|
$wid=$pd->id;
|
|
$policy_id=$pd->policy_id;
|
|
$tables="policies";
|
|
$wheres=array("id"=>$policy_id);
|
|
$shows=("*");
|
|
|
|
$img=$this->commonsql_model->selectTable($tables,$wheres,$shows);
|
|
if($img->num_rows()>0){
|
|
$i=$img->row();
|
|
$name=$i->name;
|
|
$policyimg=$i->image;
|
|
}
|
|
?>
|
|
<div class="col-md-4">
|
|
|
|
<div class="file-preview-frame krajee-default kv-preview-thumb" >
|
|
<div class="kv-file-content">
|
|
<img class="file-preview-image kv-preview-data" style="width: 200px;height: 150px;max-width: 100%;max-height: 100%;image-orientation: from-image;" src="<?=base_url();?><?=$policyimg;?>">
|
|
</div> <h5><?=$name;?></h5>
|
|
<div class="file-footer-buttons">
|
|
<button type="button" class="kv-file-zoom btn btn-sm btn-kv btn-default btn-outline-secondary removewish" data-id="<?=$wid;?>" title="Remove from favourite"><i class="icon-line-cross"></i></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php }}else
|
|
{
|
|
echo "No Favourites..!";
|
|
}
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<?php $this->load->view('front/includes/footer'); ?>
|
|
<script src="<?=base_url();?>fassets/js/components/bs-filestyle.js"></script>
|
|
<script>
|
|
var base_path=$('body').attr('data-path');
|
|
$(".removewish").on("click",function()
|
|
{
|
|
var wid=$(this).attr("data-id");
|
|
var url23=base_path+"frontend/remocefavoyrite";
|
|
|
|
$.post(url23,{wid:wid,csrf_test_name:$.cookie('csrf_cookie_name')},function(res23){
|
|
if(res23==1)
|
|
{
|
|
location.href = base_path+'user-favourite';
|
|
<?php $this->session->set_userdata('suc','Wishlist removed successfully...!'); ?>
|
|
|
|
|
|
|
|
|
|
}
|
|
});
|
|
});
|
|
</script>
|