36 lines
1.7 KiB
PHP
36 lines
1.7 KiB
PHP
<div class="class-head">
|
|
<h3 class="common-heading"><span><?php echo date('d/m/Y',strtotime($day)); ?></span></h3>
|
|
</div>
|
|
<div class="upcoming-cover">
|
|
<?php if($student_sess != ''){ foreach($student_sess as $c) { ?>
|
|
<div class="upcoming-tab">
|
|
<div class="upcoming-sub-img"><img src="<?= base_url(); ?>assets_admin/images/icons/<?= $c['subject_icon']; ?>"></div>
|
|
<div class="upcoming-subject">
|
|
<h4><?php echo $c['subject_name']; ?></h4>
|
|
<p>By:<span> <?php echo $c['teacher_name']; ?></span></p>
|
|
</div>
|
|
<div class="upcoming-date">
|
|
<?php
|
|
$pday = date("l");
|
|
$sessionDay = $c['day'];
|
|
|
|
$s = $c['start'];
|
|
// $s = "15:03";
|
|
$p = date("H:i");
|
|
|
|
$mins = (strtotime($s)-strtotime($p)) / 60;
|
|
|
|
?>
|
|
<?php if(strtolower($pday) === strtolower($sessionDay) && abs($mins) <= 10)
|
|
{ ?>
|
|
<div class="my-class-btn-wrap"> <a href = "<?php echo $c['join_link']; ?>" <button class="join-class-btn">Join Class</button></a></div>
|
|
<?php } else { ?>
|
|
<span><?php echo ucfirst($c['day']).', '.date('h:i a',strtotime($c['start'])); ?></span>
|
|
<?php } ?>
|
|
</div>
|
|
</div>
|
|
<?php }
|
|
} else { ?>
|
|
<div class="upcoming-tab">No Sessions scheduled </div>
|
|
<?php } ?>
|
|
</div>
|