<?php
$load = new load;
?>
<!-- Start wrapper -->

     

<div class="main-content">
	<div class="card">
		<div class="card-body">
			<div class="qz-page-title">
				<div class="container-fluid">
					<div class="row">
						<div class="col-12">
							<div class="d-flex justify-content-between align-items-center mb-4">
								<h2>User list</h2>
								<span class="sidebarToggler">
									<i class="fa fa-bars d-lg-none d-block"></i>
								</span>
								<div class="d-flex align-items-center">
								<a href="<?=siteUrl?>add_user"><button class="btn btn-info px-3">Add new user</button></a>
								<span class="sidebarToggler ml-4">
									<i class="fa fa-bars d-lg-none d-block"></i>
								</span>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
    <!-- End page title -->
			<div class="container-fluid">
				<div class="row">
					<div class="col-12">
                            <!-- <div class="table-responsive"> -->
                            <table class="table table-striped" id="table-1" role="grid" aria-describedby="category-table_info">
                                <thead>
                                <tr role="row">
								<th>SL.</th>
								<th>Name</th>
								<th>Username</th>
								<th>Added On</th>
								<!--th>Status</th-->
								<th>Action</th>
								</tr>
                                </thead>
                                <tbody>                         
                                                                
                                     
								<?php
								$data = $load->GetUserAll();
								$i=1;
								foreach($data as $val):
								?>
								<tr role="row" class="odd">
                                    <td tabindex="0" class="sorting_1"><?=$i?></td>
                                    <td><?=$val['name']?></td>
                                    <td><?=$val['username']?></td>
                                    <td><?=date("j M y", strtotime($val['create_at']))?></td>
                                    <!--td><span class="<?=$val['status'] =="1" ? "text-success" : "text-danger" ;?>"><?=$val['status'] =="1" ? "Active" : "Inactive" ;?></span></td--->
                                   
									<td>
                                        <ul class="d-flex list-unstyled">
											<a href="edit_user/<?=$val['id']?>" data-toggle="tooltip" title="Change Password" ><li class="qz-edit"><i data-feather="settings"></i></li></a>
															
											<!--a href="javascript:void(0);" onclick="upstatus('<?=$val['id']?>','user','<?=siteUrl?>')" data-toggle="tooltip" title="<?=$val['status'] =="1" ? "Dectivate" : "Activate" ;?>">
											<li class="ml-2" style="color:<?=$val['status'] =="1" ? "#27C24C" : "#FC9C2C" ;?>"><i data-feather="check-circle"></i></li>
											</a--->
											<a href="javascript:void(0);" data-toggle="tooltip" title="Delete" onclick="del('<?=$val['id']?>','user','<?=siteUrl;?>')">
											<li class="ml-2 qz-close"><i data-feather="delete"></i></li></li></a>
										</ul>
                                    </td>
                                    
                                </tr>
								<?php
								$i++;
								endforeach;
								?>
								</tbody>
                            </table>
                            <!-- </div> -->
                        </div>
				</div>
			</div>
		</div>
	</div>
</div>
