<?php $__env->startSection('css'); ?>
<script type="text/javascript">


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

<?php $__env->startSection('title', 'IV Media - Increase your popularity'); ?>
<?php $__env->startSection('content'); ?>
<!-- Start content -->
<div class="content">
    <div class="container-fluid">

        <div class="row">
            <div class="col-xl-12">
                <div class="page-title-box">
                    <h4 class="page-title float-left">Dashboard</h4>

                    <ol class="breadcrumb float-right">
                        <li class="breadcrumb-item"><a href="<?php echo e(url('/')); ?>"><?php echo \App\Helper::panelName(); ?></a>
                        </li>
                        <li class="breadcrumb-item active">Dashboard</li>
                    </ol>

                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
        <!-- end row -->


        <div class="row">
            <?php if($flash = session('message')): ?>
              <div class="col-md-12">
                <div class="alert alert-success" role="alert">
                  <ul style="margin-bottom:0;">
                  <?php $__currentLoopData = $flash; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <li><?php echo e($key.' => '.$val); ?></li>
                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                  </ul>
                </div>
              </div>
            <?php endif; ?>
            <?php if(isset($errors) && count($errors) != 0): ?>
              <div class="col-md-12">
                <div class="alert alert-danger" role="alert">
                  <ul style="margin-bottom:0;">
                  <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <li><?php echo e($error); ?></li>
                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                  </ul>
                </div>
              </div>
            <?php endif; ?>
            <div class="col-md-6 col-xs-12">
                <div class="card-box">

                    <h4 class="header-title m-t-0 m-b-30">Perpanjang Durasi</h4>
                    <div class="row">
                        <div class="col-12">
                            <form action="<?php echo e(url('user/extend')); ?>" method="POST">
                                
                                
                                
                                <?php echo e(csrf_field()); ?>

                            <?php if(\Carbon\Carbon::now() > auth()->user()->delay->like_9): ?>
                                <fieldset class="form-group">
                                    <label for="url">Saldo Sekarang</label>
                                    <input type="text" class="form-control" value="Rp. <?php echo e(number_format(auth()->user()->saldo, 0)); ?>" readonly>
                                </fieldset>

                                <fieldset class="form-group">
                                    <label for="url">User</label>
                                    <select name="user" class="form-control select2">
                                      <option></option>
                                      <?php $__currentLoopData = $user; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $u): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                      <option value="<?php echo e($u->username); ?>"><?php echo e($u->username); ?></option>
                                      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                </fieldset>

                                <fieldset class="form-group">
                                    <label for="durasi">Durasi</label>
                                    <select class="form-control" id="durasi" name="durasi">
                                      <option value="7">1 Minggu</option>
                                      <option value="14">2 Minggu</option>
                                      <option value="30">1 Bulan</option>
                                      <option value="custom">Custom /hari</option>
                                    </select>
                                </fieldset>
                                
                                <fieldset class="form-group">
                                    <div id="timer" style="display:none;"></div>
                                </fieldset>

                                <button type="submit" onclick="javascript=this.disabled = true; form.submit();" class="btn btn-primary btn-block">Submit</button>
                            <?php else: ?>
                                <div class="alert alert-danger" role="alert">
                                    Please wait <?php echo e(\Carbon\Carbon::parse(auth()->user()->delay->like_9)->diffForHumans()); ?>

                                </div>
                                
                                
                            <?php endif; ?>
                            </form>
                        </div>
                    </div><!-- end row -->
                </div>
            </div>
            <div class="col-md-6 col-xs-12">
                <div class="card-box">
                    <h4 class="header-title m-t-0 m-b-30"><span class="label label-primary"><?php echo e(auth()->user()->level); ?></span> <?php echo \App\Helper::panelName(); ?> PERPANJANG DURASI</h4>
                    <ul class="list-group">
                      <li class="list-group-item">Selamat Datang Di <?php echo \App\Helper::panelName(); ?> PANEL</li>
                      <li class="list-group-item">Jika ingin menambah durasi expire date </li>
                      <li class="list-group-item">pilih durasi perpanjangan</li>
                      <li class="list-group-item">
                        <strong>
                          Setiap Perpanjangan Member Saldo Berkurang<br>
                          1 Minggu : Rp 30.000 Saldo<br>
                          2 Minggu : Rp 55.000 Saldo<br>
                          1 Bulan : Rp 100.000 Saldo
                        </strong>
                      </li>
                    </ul>
                </div>
                <?php if($data = session('data')): ?>
                <div class="card-box">
                    <h4 class="header-title m-t-0 m-b-30">Success add <span class="label label-primary"><?php echo e($data['level']); ?></span></h4>
                    <ul class="list-group">
                      <li class="list-group-item">Uplink: <?php echo e(auth()->user()->username); ?></li>
                      <li class="list-group-item">Username: <?php echo e($data['username']); ?></li>
                      <li class="list-group-item">Durasi: <?php echo e($data['durasi']); ?> hari</li>
                      <li class="list-group-item">Tanggal Transaksi: <?php echo e(date('d M Y H:i')); ?></li>
                      <li class="list-group-item">Expired: <?php echo e(date('d M Y H:i', strtotime($data['expired_date']))); ?></li>
                      <li class="list-group-item">Link: <?php echo e(url('/')); ?></li>
                    </ul>
                </div>
                <?php endif; ?>
            </div>
        </div>
        <!-- end row -->


    </div>
    <!-- container -->

</div>
<!-- content -->
<?php $__env->stopSection(); ?>

<?php $__env->startSection('js'); ?>

<script>
    var resizefunc = [];
</script>  


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

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