<?php $__env->startSection('title'); ?>
    BETLOADED | Members
<?php $__env->stopSection(); ?>
<?php $__env->startSection('page'); ?>
    Flagged Members <button class="btn btn-sm btn-success pull-right" id="exportbtn"><span class="fa fa-download"></span> DOWNLOAD AS SPREADSHEET</button>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
    <div class="col" style="min-height: 323px;;">
        <br><br>
        <?php
        $date = new dateTime();
        $d = $date->format('j F, Y');
        ?>
        <table id="datatable" class="table table-striped table-bordered nowrap" cellspacing="0" width="100%">
            <thead>
            <tr>
                <th>ID</th>
                <th>FULL NAME</th>
                <th>EMAIL ADDRESS</th>
                <th>USERNAME</th>
                <th>COUNTRY</th>
                <th>REGISTERED</th>

                <?php /*<th>Details</th>*/ ?>
                <th>Controls</th>
            </tr>
            </thead>
            <tbody>
            <?php foreach($members->all() as $user): ?>

                <tr id="d<?php echo e($user->id); ?>">
                    <td class="red"><?php echo e($user->id); ?></td>
                    <td><?php echo e($user->full_name); ?></td>
                    <td><?php echo e($user->email); ?></td>
                    <td><?php echo e($user->username); ?></td>
                    <td><?php echo e($user->country); ?></td>
                    <td><?php echo e($user->created_at->format('d M, Y')); ?></td>

                    <?php /*<td><a class="gameview" href="<?php echo e($user->id); ?>" data-target="#userdetail" data-toggle="modal"><span style="color: green;"><span class="fa fa-eye"></span> VIEW</span></a></td>*/ ?>
                    <?php /*<td>*/ ?>
                    <td>
                        <div class="btn-group">
                            <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
                                Actions
                                <span class="caret"></span>
                            </button>
                            <ul class="dropdown-menu pull-right" role="menu" style="background: whitesmoke; -webkit-box-shadow: inset 0px 0px 10px grey;-moz-box-shadow: inset 0px 0px 10px grey;box-shadow: inset 0px 0px 10px grey;">
                                <li></li>
                                <li style="cursor: pointer;"><a class="userdetails" href="<?php echo e($user->id); ?>" data-target="#userdetails" data-toggle="modal">VIEW DETAILS</a></li>
                                <li style="cursor: pointer;"><a class="updateuser" href="<?php echo e($user->id); ?>" data-target="#updateuserinfo" data-toggle="modal">EDIT/UPDATE</a></li>
                                <li style="cursor: pointer;"><a class="upgradeuser" href="<?php echo e($user->id); ?>" data-target="#upgradeuser" data-toggle="modal"><span class="fa fa-credit-card"></span> UPGRADE ACCOUNT</a></li>
                                <li class="divider"></li>
                                <?php if($user->flag=='0'): ?>
                                    <li style="cursor: pointer;"><a class="flaguser" href="<?php echo e($user->id); ?>" id="f<?php echo e($user->id); ?>">FLAG USER</a>
                                <?php else: ?>
                                    <li style="cursor: pointer;"><a class="unflaguser" href="<?php echo e($user->id); ?>" id="f<?php echo e($user->id); ?>"><span style="color: red;">UNFLAG USER</span></a>
                                <?php endif; ?>

                                <?php if($user->status=='0'): ?>
                                    <li style="cursor: pointer;"><a class="disableuser" href="<?php echo e($user->id); ?>" id="h<?php echo e($user->id); ?>">DISABLE USER</a>
                                <?php else: ?>
                                    <li style="cursor: pointer;"><a class="enableuser" href="<?php echo e($user->id); ?>" id="h<?php echo e($user->id); ?>"><span style="color: green;">ENABLE USER</span></a>
                                <?php endif; ?>

                                <li style="cursor: pointer;"><a class="userdelete" href="<?php echo e($user->id); ?>" data-target="#userdelete" data-toggle="modal">DELETE USER</a>
                                </li>
                            </ul>
                        </div>
                    </td>
                </tr>
            <?php endforeach; ?>
            </tbody>
        </table>
    </div>
    <div class="row" id="excon">
        <table class="table" id="exportthis">
            <thead>
            <tr>
                <th>S/N</th>
                <th>FULL NAME</th>
                <th>EMAIL ADDRESS</th>
                <th>USERNAME</th>
                <th>DATE/TIME REGISTERED</th>
            </tr>
            </thead>
            <tbody>
            <?php foreach($members->all() as $p): ?>
                <tr>
                    <td><?php echo e($p->id); ?></td>
                    <td><?php echo e($p->full_name); ?></td>
                    <td><?php echo e($p->email); ?></td>
                    <td><?php echo e($p->username); ?></td>
                    <td><?php echo e($p->created_at); ?></td>
                </tr>
            <?php endforeach; ?>
            </tbody>
        </table>
    </div>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>