<!-- Begin Page Content -->
<div class="container-fluid">

    <!-- Page Heading -->
    <h1 class="h3 mb-2 text-gray-800">All Users</h1>
    <!-- DataTales Example -->
    <div class="card shadow mb-4">
        <div class="card-header py-3">
            <!-- <h6 class="m-0 font-weight-bold text-primary">DataTables Example</h6> -->
        </div>
        <div class="card-body">
            <div class="table-responsive">
                <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
                    <thead>
                        <tr>
                            <th>Name</th>
                            <th>Phone</th>
                            <th>Email</th>
                            <th>User Type</th>
                            <th>Image</th>
                            <th>Verification</th>
                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tfoot>
                        <tr>
                            <th>Name</th>
                            <th>Phone</th>
                            <th>Email</th>
                            <th>User Type</th>
                            <th>Image</th>
                                                        <th>Verification</th>
                            <th>Actions</th>
                        </tr>
                    </tfoot>
                    <tbody>
                        <?php
                           if (!empty($customerlist)) {
                              $count = 1;
                              foreach ($customerlist["user"] as $id => $customerlists) {
                                if($customerlists['isAnonymus']!= true){
                        ?>
                        <tr>
                            <td> <?php echo output($customerlists['userName']); ?></td>
                            <td> <?php echo output($customerlists['phoneNumber']); ?></td>
                            <td><?php echo output($customerlists['email']); ?></td>
                            <td><?php echo output($customerlists['category']); ?></td>


                            <td>
                                <?php if ($customerlists['image'] != "") { ?>

                                <img class="img-thumbnail" width="100" height="100" src="<?php echo output($customerlists['image']); ?>">
                                <?php } else { ?>
                                <img class="img-thumbnail" src="http://placehold.jp/100x100.png">
                                <?php } ?>
                            </td>
                            <td>
                                 <?php if ($customerlists["isAdminVerify"] == false) {
                                    ?>
                                <a class="icon" style="text-decoration: none;" href="<?php echo base_url(); ?>customer/adminvarify/<?php echo output($id); ?>">
                                    <button class="btn btn-warning btn-block mt-2">Verify</button>
                                </a>
                                <?php
                                    } else {
                                    ?>
                                <a class="icon" style="text-decoration: none;" >
                                    <button class="btn btn-success btn-block mt-2">Varified</button>
                                </a>
                                <?php
                                    } ?>
                            </td>
                            <td>
                                 <?php if ($customerlists["isActive"] == false) {
                                    ?>
                                <a class="icon" style="text-decoration: none;" href="<?php echo base_url(); ?>customer/unSuspendCustomer/<?php echo output($id); ?>">
                                    <button class="btn btn-success btn-block mt-2">Activate</button>
                                </a>
                                <?php
                                    } else {
                                    ?>
                                <a class="icon" style="text-decoration: none;" href="<?php echo base_url(); ?>customer/suspendCustomer/<?php echo output($id); ?>">
                                    <button class="btn btn-warning btn-block mt-2">Suspend</button>
                                </a>
                                <?php
                                    } ?> 
                                <!-- <a class="icon" style="text-decoration: none;" href="<?php echo base_url(); ?>customer/editcustomer/<?php echo output($id); ?>">
                                    <button class="btn btn-info btn-block mt-2">Update</button>
                                </a> -->
                                <a class="icon" style="text-decoration: none;" href="<?php echo base_url(); ?>customer/deleteCustomer/<?php echo output($id); ?>">
                                    <button class="btn btn-danger btn-block mt-2">Delete</button>
                                </a>
                            </td>
                        </tr>
                        <?php } } } ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>

</div>
<!-- /.container-fluid -->