IMMREX7

aku nok ndi : /home/spdtg/www/schoolmis/storage/framework/views/
File Up :
aku nok ndi : /home/spdtg/www/schoolmis/storage/framework/views/654bc15ecc8b4f6efbfa1d6f649f000b43be0cc8.php

<?php $__env->startSection('content'); ?>
<div class="row clearfix">

<!--</div>
<div class="row clearfix">-->
    <div class="col-sm-12">
        <div class="card">
            <div class="header">
                <h2><strong>List Of Exams</strong></h2>
            </div>
            <div class="body table-responsive">
                <table class="table table-bordered table-striped table-hover">
                    <thead>
                        <tr>
                            <th>S. No.</th>
                            <th>Exam Name</th>
                            <th>Start Date</th>
                            <th>End Date</th>
                            <th>Result Publish Date</th>
                            <th>Action</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $i = 1; ?>
                        <?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <th scope="row"><?php echo e($i); ?></th>
                            <td><?php echo e($value->name); ?></td>
                            <td><?php echo e(Carbon\Carbon::parse($value->from_date)->format('d-M-Y')); ?></td>
                            <td><?php echo e(Carbon\Carbon::parse($value->to_date)->format('d-M-Y')); ?></td>
                            <td><?php echo e(Carbon\Carbon::parse($value->publish_date)->format('d-M-Y H:i:s')); ?></td>
                            <td class="countdown" data-id="<?php echo e($value->idType); ?>"><?php echo e(Carbon\Carbon::parse($value->publish_date)->format('d-M-Y H:i:s')); ?></td>
                        </tr>
                        <?php $i++; ?>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script>
document.querySelectorAll(".countdown").forEach(cd => {
  setupCountdown(cd)
})

function setupCountdown(field){
    var countDownDate = new Date(field.innerHTML).getTime();
    console.log(countDownDate)
    var x = setInterval(function() {
      // Get today's date and time
      var now = new Date().getTime();

      // Find the distance between now and the count down date
      var distance = countDownDate - now;

      // Time calculations for days, hours, minutes and seconds
      var days = Math.floor(distance / (1000 * 60 * 60 * 24));
      var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
      var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
      var seconds = Math.floor((distance % (1000 * 60)) / 1000);

      // Display the result 
      field.innerHTML = days + "d " + hours + "h " + minutes + "m " + seconds + "s ";

      // If the count down is finished, write some text
      if (distance < 0) {
        clearInterval(x);
        field.innerHTML = '<a href="https://online-login.online/student/exam-result/'+field.getAttribute('data-id')+'/view" target="_blank">View Results</a>';
      }
    }, 1000);
}
</script>
<?php $__env->stopSection(); ?>


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

Copyright © 2021 - 2025 IMMREX7