<?php
  $level = auth()->user()->level;
  $special = \App\Helper::isUserRegisteredByAdmin();
?>

<?php $__env->startSection('css'); ?>
  <link href="<?php echo e(url('/')); ?>/assets/plugins/tablesaw/dist/tablesaw.css" rel="stylesheet" type="text/css" />
<?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">
            <div class="col-xs-12 col-md-6 col-lg-6 col-xl-3">
                <div class="card-box tilebox-one">
                    <i class="fa fa-group float-right text-muted"></i>
                    <h6 class="text-muted text-uppercase m-b-20">Total User</h6>
                    <h2 class="m-b-20" data-plugin="counterup"><?php echo e($totalUser); ?></h2>
                    <span class="label label-success"> <?php echo \App\Helper::panelName(); ?> </span> <span class="text-muted">User Aktif : <?php echo e(\App\Helper::getUserAktif()); ?></span>
                </div>
            </div>

            <div class="col-xs-12 col-md-6 col-lg-6 col-xl-3">
                <div class="card-box tilebox-one">
                    <i class="fa fa-book float-right text-muted"></i>
                    <h6 class="text-muted text-uppercase m-b-20">Total History</h6>
                    <h2 class="m-b-20"><span data-plugin="counterup"><?php echo e($totalSubmit+135082); ?></span></h2>
                    <span class="label label-danger"> <?php echo \App\Helper::panelName(); ?> </span> <span class="text-muted">Total History</span>
                </div>
            </div>

            <div class="col-xs-12 col-md-6 col-lg-6 col-xl-3">
                <div class="card-box tilebox-one">
                    <i class="fa fa-database float-right text-muted"></i>
                    <h6 class="text-muted text-uppercase m-b-20">Total Database</h6>
                    <h2 class="m-b-20"><span data-plugin="counterup">5000</span>±</h2>
                    <span class="label label-pink"> <?php echo \App\Helper::panelName(); ?> </span> <span class="text-muted">Total Database</span>
                </div>
            </div>

            <div class="col-xs-12 col-md-6 col-lg-6 col-xl-3">
                <div class="card-box tilebox-one">
                    <i class="fa fa-cogs float-right text-muted"></i>
                    <h6 class="text-muted text-uppercase m-b-20">Total Service</h6>
                    <h2 class="m-b-20" data-plugin="counterup">5</h2>
                    <span class="label label-warning"> <?php echo \App\Helper::panelName(); ?> </span> <span class="text-muted">Total Service</span>
                </div>
            </div>
        </div>
        <!-- end row -->

        <div class="row">
            <div class="col-md-12 ui-sortable">
              <div class="text">
                <div class="alert alert-success alert-alt">
                <span class="text-semibold">
                  <marquee>
                    <strong>
                      Selamat Datang Di  <?php echo \App\Helper::panelName(); ?>

                      PANEL Gunakan Fitur Dengan Bijak, Harap Gunakan Panel Ini Dengan Wajar, Jika Menemukan Bug Atau Eror Silahkan Lapor Demi Kebaikan Bersama Dan Terima Kasih Sudah Mengikuti Aturan Submit Pada Server Panel..
                    </strong>
                  </marquee>
                </span>
                </div>
              </div>
            </div>
            <div class="col-md-4">
              <div class="card-box" style="padding:0;">
    						<div class="profile-card">
    							<div class="profile-card-photo">
    								<img src="assets/images/logo.png" alt="">
    							</div>
    							<div class="profile-card-name"><?php echo e(auth()->user()->username); ?></div>
    							<div class="profile-card-status <?php echo e(auth()->user()->level); ?>"><?php echo e(auth()->user()->level); ?></div>

    						</div><!--.profile-card-->
                <ul class="profile-links-list">
                  <li class="divider"></li>
    							<li class="nowrap">
    								<i class="zmdi zmdi-balance-wallet"></i>
    								<span>&nbsp;Balance&nbsp;:&nbsp;&nbsp;Rp <?php echo e(number_format(auth()->user()->saldo, 0)); ?></span>
    							</li>
    							<li class="nowrap">
    								<i class="zmdi zmdi-alarm"></i>
    								<span>&nbsp;Expired&nbsp;:&nbsp;&nbsp;<?php echo e(\Carbon\Carbon::parse(auth()->user()->expired_date)->diffInDays()); ?> Hari lagi</span>
    							</li>
    						</ul>
    						<div class="profile-statistic tbl">
    							<div class="tbl-row">
    								<div class="tbl-cell">
    									<b>Server 1 Like</b>
                      <?php if(\Carbon\Carbon::now() > auth()->user()->delay->like_global): ?>
                          <button class="btn btn-rounded waves-effect btn-success">Available</span>
                      <?php else: ?>
                          <button class="btn btn-rounded waves-effect btn-danger">
                            <div class="countdown" data-countdown="<?php echo e(date('Y/m/d H:i:s', strtotime(auth()->user()->delay->like_global))); ?>"></div>
                          </button>
                      <?php endif; ?>
    								</div>
    								<div class="tbl-cell">
    									<b>Server 2 Like</b>
                      <?php if(\Carbon\Carbon::now() > auth()->user()->delay->like_global): ?>
                          <button class="btn btn-rounded waves-effect btn-success">Available</span>
                      <?php else: ?>
                          <button class="btn btn-rounded waves-effect btn-danger">
                            <div class="countdown" data-countdown="<?php echo e(date('Y/m/d H:i:s', strtotime(auth()->user()->delay->like_global))); ?>"></div>
                          </button>
                      <?php endif; ?>
    								
    								</div>
    								<div class="tbl-cell">
    									<b>Server Comment</b>
                      <?php if(\Carbon\Carbon::now() > auth()->user()->delay->comment): ?>
                          <button class="btn btn-rounded waves-effect btn-success">Available</span>
                      <?php else: ?>
                          <button class="btn btn-rounded waves-effect btn-danger">
                            <div class="countdown" data-countdown="<?php echo e(date('Y/m/d H:i:s', strtotime(auth()->user()->delay->comment))); ?>"></div>
                          </button>
                      <?php endif; ?>
    								</div>
    							</div>
    						</div>
              </div>
            </div>
            <div class="col-md-8">
              <div class="row">
                <?php if($special): ?>
                <div class="col-sm-5">
                  <div class="card-box" style="padding:0px;overflow:hidden;height:335px;">
                    <div class="panel-body profile">
                        <div class="profile-image">
                            <center><img src="<?php echo e(url('/')); ?>/assets/images/logo.png" height="80px;border-radius:50%;" alt="IVMEDIA">
                        </div>
                        <div class="profile-data">
                            <div class="profile-data-name"><center>Ivan Satriawan</center></div>
                            <div class="profile-data-title"><center>CEO &amp; Founder <?php echo IVMEDIA; ?></center></div>
                        </div></center>
                    </div>
                    <div class="panel-body">
                        <a href="https://www.facebook.com/ivansatriawan.id" target="_blank" style="margin: 0;border-radius:0;" class="btn btn-block btn-facebook"><span class="fa fa-facebook"></span> Facebook</a>
                        <a href="https://www.instagram.com/jualfollowerslikemurahhh/" style="margin: 0;border-radius:0;" target="_blank" class="btn btn-block btn-instagram"><span class="fa fa-instagram"></span> Instagram</a>
                        <a href="http://line.me/R/ti/p/%40zoy8069s" target="_blank" style="margin: 0;border-radius:0;" class="btn btn-block btn-line"><span class="fa fa-comment"></span> Line</a>
                    </div>
                  </div>
                </div>
                <?php endif; ?>
                <?php if(\App\Helper::isUserRegisteredByAlv()): ?>

                <div class="col-sm-5">
                  <div class="card-box" style="padding:0px;overflow:hidden;height:335px;">
                    <div class="panel-body profile2">
                        <div class="profile-image">
                            <center><img src="<?php echo e(url('/')); ?>/assets/images/alv.jpg" style="height:80px;border-radius:50%;" alt="ALV MEDIA"></center>
                        </div>
                        <div class="profile-data">
                            <div class="profile-data-name"><center>ALV</center></div>
                            <div class="profile-data-title"><center>CEO &amp; Founder ALV MEDIA</center></div>
                            <div class="profile-data-title"><center><i class="fa fa-envelope"></i> Email : alvmedia@alvcorp.com</center></div>
                            <div class="profile-data-title"><center><i class="fa fa-phone"></i> Whatsapp : 0851-1032-8180</center></div>
                        </div>
                    </div>
                    <div class="panel-body">
                        <a href="http://alvmedia.co.id" target="_blank" style="margin: 0;border-radius:0;" class="btn btn-block btn-dark"><span class="fa fa-envelope"></span> Web : www.alvmedia.co.id</a>
                        <a href="http://line.me/ti/p/%40alvmedia" target="_blank" style="margin: 0;border-radius:0;" class="btn btn-block btn-line"><span class="fa fa-comment"></span> Line : <?php echo e('@'); ?>ALVMEDIA</a>
                    </div>
                  </div>
                </div>
                <?php endif; ?>
                <div class="col-sm-12 col-md-<?php echo e(($special || \App\Helper::isUserRegisteredByAlv()) ? '7' : '12'); ?>">
                  <div class="card-box">
                    <h4 class="header-title m-t-0" style="margin-bottom:0;">Latest Submit</h4>
                    <div class="table-responsive">
                      <table class="tablesaw table-bordered table m-b-0" data-tablesaw-mode="swipe" data-tablesaw-minimap>
                        <thead>
                          <tr>
                              <th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="persist">Submitted By</th>
                              <th scope="col" data-tablesaw-sortable-col data-tablesaw-sortable-default-col data-tablesaw-priority="1">Target</th>
                              <th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="2">Jumlah</th>
                              <th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="5">IP</th>
                              <th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="3">Type</th>
                              <th scope="col" data-tablesaw-sortable-col data-tablesaw-priority="4">Date</th>
                          </tr>
                        </thead>
                        <tbody>
                          <?php $__currentLoopData = $latestSubmit; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $skey => $sub): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td><?php echo e($sub->submitted_by); ?></td>
                                <td><?php echo e($sub->target); ?></td>
                                <td><?php echo e($sub->total_submit); ?></td>
                                <td><?php echo e($sub->ip); ?></td>
                                <td><?php echo e($sub->type); ?></td>
                                <td><?php echo e(date('Y-m-d H:i:s', strtotime($sub->created_at))); ?></td>
                            </tr>
                          <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </tbody>
                    </table>
                    </div>
              		</div>
                </div>
              </div>


            </div>

            <!-- end col-->


        </div>
        <!-- end row -->


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

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

<?php $__env->startSection('js'); ?>
<script src="<?php echo e(url('/')); ?>/assets/plugins/tablesaw/dist/tablesaw.js"></script>
<script src="<?php echo e(url('/')); ?>/assets/plugins/tablesaw/dist/tablesaw-init.js"></script>
<script>
  var resizefunc = [];
</script>
<?php $__env->stopSection(); ?>

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