<?php  $this->load->view('staff/common/header.php',$data);
$base_name = $data['base_name'];
?>

    <div class="content">
        
        <!-- Start Content-->
        <div class="container-fluid">
            
            <!-- start page title -->
            <div class="row">
                <div class="col-12">
                    <div class="page-title-box">
                        <div class="page-title-right">
                            <ol class="breadcrumb m-0">
                                <li class="breadcrumb-item"><a href="javascript: void(0);"><?= $base_name;?></a></li>
                                <li class="breadcrumb-item active text-capitalize"><?= $page;?></li>
                            </ol>
                        </div>
                        <h4 class="page-title text-uppercase"><?= $page;?></h4>
                    </div>
                </div>
            </div>     
            <!-- end page title --> 

            <div class="row">
                <div class="col-md-12 col-xl-12">
                    <div class="card-box">
                        <div class="row">
                            <div class="col-sm-12">
							    <table id="key-table" class="table table-bordered dt-responsive nowrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
                                    <thead>
                                        <tr>
                                            <th>#</th>
        									<th>Photo</th>
        									<th>Name</th>
        								
        									<th>Mobile Number </th>
        									<th>Address</th>
        									<th>Registration </th>
        									<th>Status</th>
        								
                                        </tr>
                                    </thead>


                                        <tbody>
                                        
								<?php if (!empty($customer)) {
								    $i=0;
								?>
								
									<?php foreach ($customer as $row) {
									$i++;
									?>
								        <tr>
                                            <td><?=$i;?></td>
        									<td>
        									    <?php
        									        if(file_exists('./uploads/website/customer/'.$row['cust_image'])  && !empty($row['cust_image'])){
        									            ?>
        									            <img src="<?=base_url('./uploads/website/customer/'.$row['cust_image']);?>" class="img-fluid" style="width:60px;" alt="<?=$row['cust_name'];?>" title="<?=$row['cust_name'];?>" />
        									            <?php
        									        } else{
        									            ?>
        									            <img src="<?=base_url('./uploads/website/customer/customer.png');?>" class="img-fluid" style="width:60px;" alt="<?=$row['cust_name'];?>" title="<?=$row['cust_name'];?>" />
        									            <?php
        									        }
        									    ?>
        									    
        									</td>
        									<td><?=$row['cust_name'];?></td>
        								
        									<td><?=$row['cust_phone'];?></td>
        										<td><?=$row['cust_address'];?></td>
        									<!--<td><?=$row['cust_state'];?></td>-->
        									<!--<td><?=$row['cust_city'];?></td>-->
        									<!--<td><?=$row['cust_address'];?></td>-->
        									<td><?=date('d-m-Y',strtotime($row['cust_datetime']))   ;?></td>
        									<td>
        										<?php if ($row['cust_status'] == 1) {?>
        											<span class="badge badge-success">Active</span>
        										<?php } else {?>
        											<span class="badge badge-danger">Block</span>
        										<?php }?>
        									</td>
        								
        								</tr>
								<?php }?>
								<?php } else {?>
								<tr>
									<td colspan="7" class="text-center">Records Not Found</td>
								</tr>
								<?php }?>
							</tbody>
							</table>
							</div>
					    </div>
					</div>
				</div>
				<!-- /.col-md-6 -->
			</div>
			<!-- /.row -->
		</div>
		<!-- /.container-fluid -->
	</div>
	<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<?php $this->load->view('staff/common/footer.php'); ?>

<script type="text/javascript">
	function deletecustomer() {
		if (confirm("Are You Sure You Want TO Delete Shipping Cost ?")) {
            return true;
		}
		return false;
	}
</script>