<?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>
                  <?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; ?>
            <div class="col-lg-6 col-md-12">

                <?php if($result = session('result')): ?>
                    <?php echo $result; ?>

                <?php endif; ?>
                <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(); ?> PANEL COMMENT</h4>
                    

                    <div class="row">
                        <div class="col-12">
                            <form action="<?php echo e(url('server/comment')); ?>" method="POST">
                                
                                <?php echo app('captcha')->render(); ?>
                                <?php echo e(csrf_field()); ?>

                                <?php if(\Carbon\Carbon::now() > auth()->user()->delay->comment): ?>
                                
                                <fieldset class="form-group">
                                    <label for="url">URL Foto</label>
                                    <input type="text" class="form-control <?php echo e($errors->has('jumlah') ? 'parsley-error' : ''); ?>" id="url" placeholder="https://www.instagram.com/p/Ba6Cz_7hMnT/" name="url">
                                    <?php if($errors->has('url')): ?>
                                        <span class="help-block">
                                            <ul class="parsley-errors-list filled"><li class="parsley-required"><?php echo e($errors->first('url')); ?></li></ul>
                                        </span>
                                    <?php endif; ?>
                                </fieldset>
                                <fieldset class="form-group">
                                    <label for="jumlah">Komentar (Max 10 baris = 10 comment) Submit Lebih Kan Dari Target</label>
<textarea class="form-control <?php echo e($errors->has('comment') ? 'parsley-error' : ''); ?>" rows="4" cols="500" name="comment" placeholder="1 Baris 1 Komentar
Iv media keren
Follback kak
Like Back Please
Fotonya Bagus kak
Kerja bagus, selamat !
ok, gud" id="jumlah"></textarea>
                                    <?php if($errors->has('comment')): ?>
                                        <span class="help-block">
                                            <ul class="parsley-errors-list filled"><li class="parsley-required"><?php echo e($errors->first('comment')); ?></li></ul>
                                        </span>
                                    <?php endif; ?>
                                    <div class="mt-3">Total Baris: <span id="linesUsed">0</span><div>
                                </fieldset>
                                <button type="submit" id="submitBtn" class="btn btn-block btn-primary">Submit</button>
                                
                        
                    <?php else: ?>
                        <div class="alert alert-danger" role="alert">
                            Please wait <?php echo e(\Carbon\Carbon::parse(auth()->user()->delay->comment)->diffForHumans()); ?> to submit comment
                        </div>
                        
                        <div class="alert alert-success" role="alert">
                            Success Submit Comment ! ^_^ 
                        </div>
                        <?php ($button = '<button type="submit" id="submitBtn" class="btn btn-block btn-danger" disabled>Please Wait</button>'); ?>
                    <?php endif; ?>
                    
                                
                            </form>
                        </div>
                    </div><!-- end row -->
                </div>
            </div>
            <div class="col-lg-6 col-md-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(); ?> PANEL COMMENT</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">Data Base UNLIMITED</li>
                      <li class="list-group-item">1 Baris 1 Komentar</li>
                      <li class="list-group-item">Maksimal 10 Baris</li>
                      <li class="list-group-item">Instagram Jangan Di <span class="label label-danger"><i class="fa fa-lock"></i> Private</span></li>
                      
                    </ul>
                </div>
            </div>
        </div>
        <!-- end row -->


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

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

<?php $__env->startSection('js'); ?>
<script>
  var resizefunc = [];
  var lines = 10;
    var linesUsed = $('#linesUsed');

    $('#jumlah').keydown(function(e) {

        newLines = $(this).val().split("\n").length;
        linesUsed.text(newLines);

        if(e.keyCode == 13 && newLines >= lines) {
linesUsed.css('color', 'red');
            return false;
            
        }
        else {
            linesUsed.css('color', '');
        }
        
    });

    $('#jumlah').on('paste', function(){
        newLines = $(this).val().split("\n").length;
        linesUsed.text(newLines);

        if(newLines >= lines) {
            linesUsed.css('color', 'red');
            
            return false;
        }
        else {
            linesUsed.css('color', '');
        }
    });
    

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

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