<?php $__env->startSection('header-script'); ?>
<?php echo $__env->make('admin.layouts.datatable-header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php $__env->stopSection(); ?>


<?php $__env->startSection('content'); ?>
<!-- Page-Title -->
<div class="col-md-12">
    <div class="col-md-12 pd-0">
        <div class="u-shadow-v21 nbr g-bg-white rounded notice-board  mg-0 wow slideInUp" data-wow-duration="3s">
            <div class="media g-mb-15">
                <div>
                    <div class="bar-title">
                        <h5><a href=""><span> অংশগ্রহনকারীদরে নামের তালিকা
                                </span></a></h5>
                    </div>
                    <div style="overflow-x:auto;">
                        <table class="table table-dark table-responsive">
                        <thead>
                            <tr>
                                <th scope="col">ক্রমিক</th>
                                <th scope="col">অংশগ্রহনকারীর নাম</th>
                                <th scope="col">শ্রেণি</th>
                                <th scope="col">রোল</th>
                                <th scope="col">ছবি</th>
                                <th scope="col"> Published</th>
                                <th scope="col"> বাছাই</th>
                                <th scope="col"> এক </th>
                                <th scope="col"> দুই</th>
                                <th scope="col"> তিন</th>
                                <th scope="col"> চার</th>
                                <th scope="col"> পাঁচ</th>
                                <th scope="col"> ফাইনাল</th>
                                <th scope="col"> সম্পাদনা</th>
                                <th scope="col"> ডিলিট</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $i = 0; ?>
                            <?php if(count($users) > 0): ?>

                            <?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <?php $i+=1; ?>
                                <th scope="row"><?php echo e($i); ?></th>
                                <td><?php echo e($user->name); ?></td>
                                <td><?php echo e($user->class); ?></td>
                                <td><?php echo e($user->roll); ?></td>
                                <td>
                                    <div> <a href="<?php echo e(url('admin/perticipentlist')); ?>/<?php echo e($user->id); ?>">
                                            <img src="<?php echo e(URL::to('public/images/'.$user->picture)); ?>" height="45"
                                                width="45" />
                                        </a>

                                    </div>
                                </td>
                                <td>
                                    <?php if($user->permission == 1): ?>
                                    <?php echo Form::open(['action' => ['AdminController@permission', $user->id],
                                    'method'=> 'POST']); ?>

                                    <?php echo Form::hidden('permission', 0); ?>

                                    <?php echo Form::hidden('_method', 'POST'); ?>

                                    <button class="btn btn-success" type="submit"><i class="fa fa-check">
                                        </i></button>
                                    <?php echo Form::close(); ?>

                                    <?php else: ?>

                                    <?php echo Form::open(['action' => ['AdminController@permission', $user->id],
                                    'method'=> 'POST']); ?>

                                    <?php echo Form::hidden('permission', 1); ?>

                                    <?php echo Form::hidden('user_id', $user->id); ?>

                                    <?php echo Form::hidden('round_id', 0); ?>

                                    <?php echo Form::hidden('status', 0); ?>

                                    <?php echo Form::hidden('_method', 'POST'); ?>

                                    <button class="btn btn-danger" type="submit"><i class="fa fa-close">
                                        </i></button>
                                    <?php echo Form::close(); ?>

                                    <?php endif; ?>
                                </td>


                                <td>
                                    <?php if($user->permission == 1): ?>
                                    <?php if($user->selection == 1): ?>
                                    <?php echo Form::open(['action' => ['AdminController@selection', $user->id],
                                    'method'=> 'POST']); ?>

                                    <?php echo Form::hidden('selection', 0); ?>

                                    <?php echo Form::hidden('_method', 'POST'); ?>

                                    <button class="btn btn-success" type="submit"><i class="fa fa-refresh"> No
                                        </i></button>
                                    <?php echo Form::close(); ?>


                                    <?php else: ?>

                                    <?php echo Form::open(['action' => ['AdminController@selection', $user->id],
                                    'method'=> 'POST']); ?>

                                    <?php echo Form::hidden('selection', 1); ?>

                                    <?php echo Form::hidden('user_id', $user->id); ?>

                                    <?php echo Form::hidden('round_id', 1); ?>

                                    <?php echo Form::hidden('status', 0); ?>

                                    <?php echo Form::hidden('_method', 'POST'); ?>

                                    <button class="btn btn-danger" type="submit"><i class="fa fa-close">
                                        </i></button>
                                    <?php echo Form::close(); ?>


                                    <?php endif; ?>
                                    <?php else: ?>
                                    <div class="btn btn-warning"> Disable</div>
                                    <?php endif; ?>
                                </td>
                                <td>
                                    <?php if($user->selection == 1): ?>
                                    <?php if($user->round_1 == 1): ?>
                                    <?php echo Form::open(['action' => ['AdminController@roundone', $user->id],
                                    'method'=> 'POST']); ?>

                                    <?php echo Form::hidden('round_1', 0); ?>

                                    <?php echo Form::hidden('_method', 'POST'); ?>

                                    <button class="btn btn-success" type="submit"><i class="fa fa-refresh"> No
                                        </i></button>
                                    <?php echo Form::close(); ?>

                                    <?php else: ?>
                                    <?php echo Form::open(['action' => ['AdminController@roundone', $user->id],
                                    'method'=> 'POST']); ?>

                                    <?php echo Form::hidden('round_1', 1); ?>

                                    <?php echo Form::hidden('_method', 'POST'); ?>

                                    <button class="btn btn-danger" type="submit"><i class="fa fa-refresh"> yes
                                        </i></button>
                                    <?php echo Form::close(); ?>

                                    <?php endif; ?>
                                    <?php else: ?>
                                    <div class="btn btn-warning"> Disable</div>
                                    <?php endif; ?>
                                </td>
                                <td>
                                    <?php if($user->round_1 == 1): ?>
                                    <?php if($user->round_2 == 1): ?>
                                    <?php echo Form::open(['action' => ['AdminController@roundtwo', $user->id],
                                    'method'=> 'POST']); ?>

                                    <?php echo Form::hidden('round_2', 0); ?>

                                    <?php echo Form::hidden('_method', 'POST'); ?>

                                    <button class="btn btn-success" type="submit"><i class="fa fa-refresh"> No
                                        </i></button>
                                    <?php echo Form::close(); ?>

                                    <?php else: ?>
                                    <?php echo Form::open(['action' => ['AdminController@roundtwo', $user->id],
                                    'method'=> 'POST']); ?>

                                    <?php echo Form::hidden('round_2', 1); ?>

                                    <?php echo Form::hidden('_method', 'POST'); ?>

                                    <button class="btn btn-danger" type="submit"><i class="fa fa-refresh"> Yes
                                        </i></button>
                                    <?php echo Form::close(); ?>

                                    <?php endif; ?>
                                    <?php else: ?>
                                    <div class="btn btn-warning"> Disable</div>
                                    <?php endif; ?>
                                </td>
                                <td>
                                    <?php if($user->round_2 == 1): ?>
                                    <?php if($user->round_3 == 1): ?>
                                    <?php echo Form::open(['action' => ['AdminController@roundthree', $user->id],
                                    'method'=> 'POST']); ?>

                                    <?php echo Form::hidden('round_3', 0); ?>

                                    <?php echo Form::hidden('_method', 'POST'); ?>

                                    <button class="btn btn-success" type="submit"><i class="fa fa-refresh"> No
                                        </i></button>
                                    <?php echo Form::close(); ?>

                                    <?php else: ?>
                                    <?php echo Form::open(['action' => ['AdminController@roundthree', $user->id],
                                    'method'=> 'POST']); ?>

                                    <?php echo Form::hidden('round_3', 1); ?>

                                    <?php echo Form::hidden('_method', 'POST'); ?>

                                    <button class="btn btn-danger" type="submit"><i class="fa fa-refresh"> Yes
                                        </i></button>
                                    <?php echo Form::close(); ?>

                                    <?php endif; ?>
                                    <?php else: ?>
                                    <div class="btn btn-warning"> Disable</div>
                                    <?php endif; ?>

                                </td>

                                <td>
                                    <?php if($user->round_3 == 1): ?>
                                    <?php if($user->round_4 == 1): ?>
                                    <?php echo Form::open(['action' => ['AdminController@roundfour', $user->id],
                                    'method'=> 'POST']); ?>

                                    <?php echo Form::hidden('round_4', 0); ?>

                                    <?php echo Form::hidden('_method', 'POST'); ?>

                                    <button class="btn btn-success" type="submit"><i class="fa fa-refresh"> No
                                        </i></button>
                                    <?php echo Form::close(); ?>


                                    <?php else: ?>

                                    <?php echo Form::open(['action' => ['AdminController@roundfour', $user->id],
                                    'method'=> 'POST']); ?>

                                    <?php echo Form::hidden('round_4', 1); ?>

                                    <?php echo Form::hidden('_method', 'POST'); ?>

                                    <button class="btn btn-danger" type="submit"><i class="fa fa-refresh"> yes
                                        </i></button>
                                    <?php echo Form::close(); ?>

                                    <?php endif; ?>
                                    <?php else: ?>
                                    <div class="btn btn-warning"> Disable</div>
                                    <?php endif; ?>
                                </td>
                                <td>
                                    <?php if($user->round_4 == 1): ?>
                                    <?php if($user->round_5 == 1): ?>
                                    <?php echo Form::open(['action' => ['AdminController@roundfive', $user->id],
                                    'method'=> 'POST']); ?>

                                    <?php echo Form::hidden('round_5', 0); ?>

                                    <?php echo Form::hidden('_method', 'POST'); ?>

                                    <button class="btn btn-success" type="submit"><i class="fa fa-refresh"> No
                                        </i></button>
                                    <?php echo Form::close(); ?>


                                    <?php else: ?>

                                    <?php echo Form::open(['action' => ['AdminController@roundfive', $user->id],
                                    'method'=> 'POST']); ?>

                                    <?php echo Form::hidden('round_5', 1); ?>

                                    <?php echo Form::hidden('_method', 'POST'); ?>

                                    <button class="btn btn-danger" type="submit"><i class="fa fa-refresh"> Yes
                                        </i></button>
                                    <?php echo Form::close(); ?>

                                    <?php endif; ?>
                                    <?php else: ?>
                                    <div class="btn btn-warning"> Disable</div>
                                    <?php endif; ?>
                                </td>
                                <td>
                                    <?php if($user->round_5 == 1): ?>
                                    <?php if($user->round_6 == 1): ?>
                                    <?php echo Form::open(['action' => ['AdminController@roundsix', $user->id],
                                    'method'=> 'POST']); ?>

                                    <?php echo Form::hidden('round_6', 0); ?>

                                    <?php echo Form::hidden('_method', 'POST'); ?>

                                    <button class="btn btn-success" type="submit"><i class="fa fa-refresh"> No
                                        </i></button>
                                    <?php echo Form::close(); ?>


                                    <?php else: ?>

                                    <?php echo Form::open(['action' => ['AdminController@roundsix', $user->id],
                                    'method'=> 'POST']); ?>

                                    <?php echo Form::hidden('round_6', 1); ?>

                                    <?php echo Form::hidden('_method', 'POST'); ?>

                                    <button class="btn btn-danger" type="submit"><i class="fa fa-refresh"> Yes
                                        </i></button>
                                    <?php echo Form::close(); ?>

                                    <?php endif; ?>
                                    <?php else: ?>
                                    <div class="btn btn-warning"> Disable</div>
                                    <?php endif; ?>
                                </td>
                                <td> <a href="<?php echo e(url('admin/perticipentlist')); ?>/<?php echo e($user->id); ?>/edit"
                                        class="btn btn-danger btn-sm">
                                        <span class="glyphicon glyphicon-pencil"> </span>
                                    </a></td>
                                <td>
                                    <form class="form-horizontal" enctype="multipart/form-data" method="POST"
                                        action="<?php echo e(action('UserController@delete', $user->id)); ?>">
                                        <?php echo e(csrf_field()); ?>

                                        <a href="<?php echo e(url('admin/perticipentlist')); ?>/<?php echo e($user->id); ?>/delete"
                                            class="btn btn-danger btn-sm">
                                            <span class="glyphicon glyphicon-trash"> </span>
                                        </a>
                                    </form>
                                </td>
                            </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <?php else: ?>
                            <tr>
                                <td> No Data Found</td>
                            </tr>
                            <?php endif; ?>

                        </tbody>
                    </table>
                    <?php echo e($users->links()); ?>

                    </div>
                    <div>



                    </div>
                </div>

            </div>
        </div>
    </div>


    <!-- end row -->
    <?php $__env->stopSection(); ?>

    <?php $__env->startSection('footer-script'); ?>
    <?php echo $__env->make('admin.layouts.datatable-footer-script', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
    <?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>