bbone/application/modules/User/views/user_list.php
suseendhiran17 3ae47e1bd1 suseendhiran
2023-01-12 17:22:38 +05:30

87 lines
3.2 KiB
PHP

<div class="col-md-12 col-sm-12 ">
<div class="x_panel">
<div class="x_title">
<h2>User Details </h2>
<ul class="nav navbar-right panel_toolbox">
<a href="<?php echo base_url();?>user/addUser" class="btn btn-sm btn-primary">Add User</a>
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
</ul>
<div class="clearfix"></div>
</div>
<div class="x_content">
<div class="row">
<div class="col-sm-12">
<table id="datatable" class="table table-striped table-bordered" width="100%">
<thead>
<tr class="headings">
<th class="column-title">Name </th>
<th class="column-title">Email </th>
<th class="column-title">Mobile </th>
<th class="column-title" >Role </th>
<th class="column-title" >Permit </th>
<th class="column-title" >Action </th>
</tr>
</thead>
<tbody>
<?php foreach ($tableData as $key => $value) { ?>
<tr class="even pointer">
<td class=" "> <?php echo $value->name; ?> </td>
<td class=" "><?php echo $value->email; ?> </td>
<td class=" "><?php echo $value->mobile; ?></td>
<td class=" "><?php echo $value->role; ?></td>
<td class=" "><?php echo $value->action_permit; ?></td>
<td style=" text-align: center; font-size: 16px;">
<?php if ($value->is_active == 1) { ?>
<a href="<?php echo base_url()?>user/editUser/<?php echo md5($value->id);?>" ><i class="fa fa-pencil"></i></a>
&nbsp;
<a href="<?php echo base_url()?>user/deleteUser/<?php echo md5($value->id);?>" >
<i class="#008000 fa fa-check-circle" style="font-size:20px;" title="deactivate"></i></a>
&nbsp;
<a> <i id="<?php echo $value->id;?>" class="fa fa-eye"></i></a>
<?php } ?>
<?php if ($value->is_active == 0) { ?>
<a href="<?php echo base_url()?>user/activateUser/<?php echo md5($value->id);?>" >
<i class="green fa fa-check-circle" style="font-size:20px;" title="activate"></i></a>
&nbsp;
<a> <i id="<?php echo $value->id;?>" class="fa fa-eye"></i></a>
&nbsp;
<?php } ?>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<br/>
<!-- Large modal -->
<!-- <button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-lg" hidden>Large modal</button> -->
<div class="modal fade bs-example-modal-lg" id="ItemModal" tabindex="-1" role="dialog" aria-hidden="true"></div>
<div style="display:none" id="sub-value">
</div>
<script>
$(document).on('click','.fa-eye',function(){
var id = $(this).attr("id")
$.ajax({
type: "get",
url: "<?php echo base_url()?>user/view_user_history/"+id,
success: function(response) {
response = JSON.parse(response);
console.log(response);
$('.bs-example-modal-lg').html(response);
$('.bs-example-modal-lg').modal("show");
},
error: function(jqXHR, textStatus, err) { alert('text status '+textStatus+', err '+err) }
});
});
</script>