File: /home/barbeatleanalyti/www/mbaris.beatleanalytics.com/application/views/beatleAdmin/userlist.php
<?php
include('include/header.php');
// echo '<pre>'; print_r($Editdata);die;
//$this->load->model('Admin_model');
?>
<body>
<!-- BEGIN CONTENT AREA -->
<div id="content" class="main-content">
<div class="layout-px-spacing">
<div class="row layout-top-spacing">
<div id="tabsLine" class="col-lg-12 col-12 layout-spacing">
<div class="statbox widget box box-shadow">
<div class="widget-content widget-content-area underline-content">
<ul class="nav nav-tabs mb-3" id="lineTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="underline-home-tab" data-toggle="tab"
href="#underline-home" role="tab" aria-controls="underline-home" aria-selected="true">
Owner</a>
</li>
<li class="nav-item">
<a class="nav-link" id="underline-profile-tab" data-toggle="tab"
href="#underline-profile" role="tab" aria-controls="underline-profile"
aria-selected="false">
Auditor</a>
</li>
</ul>
<div class="tab-content" id="lineTabContent-3">
<div class="tab-pane fade show active" id="underline-home" role="tabpanel" aria-labelledby="underline-home-tab">
<div class="">
<div class="">
<div class="table-responsive mb-4 mt-4">
<table id="html5-extension" class="table table-hover non-hover" style="width:100%">
<thead>
<tr>
<th>Sr.no.</th>
<th>Name</th>
<th>Username</th>
<th>Mobile</th>
<th>email</th>
<th>organization</th>
<th>Division Office</th>
<th>Station</th>
<th>Dep id</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$no = 1;
foreach ($AllOwner as $key => $value) { ?>
<tr id="rowid_<?php echo $value->userId;?>">
<td><?php echo $no++; ?></td>
<td><?php echo $value->db_username; ?></td>
<td><?php echo $value->db_userLoginName; ?></td>
<td><?php echo $value->db_phone; ?></td>
<td><?php echo $value->db_email; ?></td>
<td><?php if($value->OrgID != 0)echo $this->Admin_model->getDataById('baris_organization','OrgID',$value->OrgID)[0]->db_Orgname; else echo "NA"; ?></td>
<td><?php if($value->DivisionId != 0)echo $this->Admin_model->getDataById('baris_division','DivisionId',$value->DivisionId)[0]->DivisionName; else echo "NA"; ?></td>
<td><?php if($value->StationId != 0)echo $this->Admin_model->getDataById('baris_station','stationId',$value->StationId)[0]->stationName; else echo "NA"; ?></td>
<td><?php if($value->StationId != 0)echo $this->Admin_model->getDataById('baris_station','stationId',$value->StationId)[0]->db_stLoginId; else echo "NA"; ?></td>
<td>
<div class="btn-group">
<a target="_blank" href="<?php echo base_url().'index.php/barisAdmin/directlogin/'.$value->db_userLoginName ?>" class="btn btn-dark btn-sm">Login</a>
<button type="button" class="btn btn-dark btn-sm dropdown-toggle dropdown-toggle-split" id="dropdownMenuReference1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-reference="parent">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuReference1">
<a class="dropdown-item deluser" data-uid="<?php echo $value->userId;?>" href="javascript:;">Delete</a>
<a class="dropdown-item" href="<?php echo base_url().'index.php/barisAdmin/users/'.$value->userId ?>">Edit</a>
</div>
</div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="underline-profile" role="tabpanel" aria-labelledby="underline-profile-tab">
<div class="">
<div class="">
<div class="table-responsive mb-4 mt-4">
<table id="html5-extension2" class="table table-hover non-hover" style="width:100%">
<thead>
<tr>
<th>Sr.no.</th>
<th>Name</th>
<th>Username</th>
<th>Mobile</th>
<th>email</th>
<th>organization</th>
<th>Division Office</th>
<th>Dep id</th>
<th>Type </th>
<!-- <th>Action</th> -->
</tr>
</thead>
<tbody>
<?php
$no = 1;
foreach ($AllAuditor as $key => $value) { ?>
<tr>
<td><?php echo $no++; ?></td>
<td><?php echo $value->db_username; ?></td>
<td><?php echo $value->db_userLoginName; ?></td>
<td><?php echo $value->db_phone; ?></td>
<td><?php echo $value->db_email; ?></td>
<td><?php if($value->OrgID != 0)echo $this->Admin_model->getDataById('baris_organization','OrgID',$value->OrgID)[0]->db_Orgname; else echo "NA"; ?></td>
<td><?php if($value->DivisionId != 0)echo $this->Admin_model->getDataById('baris_division','DivisionId',$value->DivisionId)[0]->DivisionName; else echo "NA"; ?></td>
<td><?php if($value->StationId != 0)echo $this->Admin_model->getDataById('baris_station','stationId',$value->StationId)[0]->db_stLoginId; else echo "NA"; ?></td>
<td><?php echo $value->reportType; ?></td>
<!-- <td>
<div class="btn-group">
<button type="button" class="btn btn-dark btn-sm">Open</button>
<button type="button" class="btn btn-dark btn-sm dropdown-toggle dropdown-toggle-split" id="dropdownMenuReference1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-reference="parent">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuReference1">
<a class="dropdown-item" href="#">Delete</a>
<a class="dropdown-item" href="">Edit</a>
</div>
</div>
</td> -->
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer-wrapper">
<div class="footer-section f-section-1">
<p class="">Copyright © 2020 <a target="_blank" href="http://www.beatlebuddy.com/">Beatlebuddy</a>, All rights reserved.</p>
</div>
</div>
</div>
<!-- END CONTENT AREA -->
</div>
<!-- END MAIN CONTAINER -->
<style>body {
zoom: 93%;
}
.table > tbody > tr > td {
color: #000000;
}
p.type_filed span {
margin: 0 4px;
/* float: left; */
}
p.type_filed {
float: left;
display: flex;
}
</style>
<?php include ('include/footer.php');?>
<script>
$(document).ready(function(){
// ================== DELETE USER START FROM HERE ========================
$(".deluser").click(function(){
var txt;
var r = confirm("Would you like to delete this user");
if (r == true)
{
var deluser = $(this);
var id = deluser.attr('data-uid');
var token = 'deleteuser';
$.ajax({
type : 'POST',
url : 'deleteUserById',
data : {id:id,token:token},
success : function(res)
{
//alert(res);
$("#rowid_"+id).hide('500');
}
});
}
else
{
}
});
});
</script>
<script>
$('#html5-extension').DataTable( {
dom: '<"row"<"col-md-12"<"row"<"col-md-6"B><"col-md-6"f> > ><"col-md-12"rt> <"col-md-12"<"row"<"col-md-5"i><"col-md-7"p>>> >',
buttons: {
buttons: [
{ extend: 'copy', className: 'btn' },
{ extend: 'csv', className: 'btn' },
{ extend: 'excel', className: 'btn' },
{ extend: 'print', className: 'btn' }
]
},
"oLanguage": {
"oPaginate": { "sPrevious": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg>', "sNext": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>' },
"sInfo": "Showing page _PAGE_ of _PAGES_",
"sSearch": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>',
"sSearchPlaceholder": "Search...",
"sLengthMenu": "Results : _MENU_",
},
"stripeClasses": [],
"lengthMenu": [7, 10, 20, 50],
"pageLength": 7
} );
</script>
<script>
$('#html5-extension2').DataTable( {
dom: '<"row"<"col-md-12"<"row"<"col-md-6"B><"col-md-6"f> > ><"col-md-12"rt> <"col-md-12"<"row"<"col-md-5"i><"col-md-7"p>>> >',
buttons: {
buttons: [
{ extend: 'copy', className: 'btn' },
{ extend: 'csv', className: 'btn' },
{ extend: 'excel', className: 'btn' },
{ extend: 'print', className: 'btn' }
]
},
"oLanguage": {
"oPaginate": { "sPrevious": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg>', "sNext": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>' },
"sInfo": "Showing page _PAGE_ of _PAGES_",
"sSearch": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>',
"sSearchPlaceholder": "Search...",
"sLengthMenu": "Results : _MENU_",
},
"stripeClasses": [],
"lengthMenu": [7, 10, 20, 50],
"pageLength": 7
} );
</script>
<!-- END PAGE LEVEL CUSTOM SCRIPTS -->