BBnepal-Accounts/application/views/teacher/teacher-calendar_old.php

84 lines
3.2 KiB
PHP
Raw Permalink Normal View History

2024-07-10 12:43:19 +00:00
<main class="common_margin" id="main">
<div class="main-wrap">
<div class="calendar-section">
<div class="calendar-section-wrap">
<div class="calendar-main">
<div class="class-head">
<h3 class="common-heading">Calendar</h3>
</div>
<div class="calendar-cover" id="calendar">
<div class="calendar-date-year">
<img src="<?= base_url(); ?>assets_student/images/calendar2.png">
</div>
<div id="Datepicker1" onchange = "showsessions($(this).datepicker().val())"></div>
</div>
</div>
<div class="upcoming-section-wrap">
<div class="class-head">
<h3 class="common-heading"><span><?php echo date("d/m/Y"); ?></span></h3>
</div>
<div class="upcoming-cover">
<?php if($student_sess != ''){ foreach($student_sess as $c) { ?>
<div class="upcoming-tab upcoming-classes-tab">
<div class="class-Sec">
<h4><?= $c['classroom_name']; ?></h4>
<p>Grade</p>
<img src="<?php echo base_url(); ?>assets_teacher/images/class2.png">
</div>
<div class="class-det">
<div class="class-det-head">
<h5><?= $c['subject_name']; ?></h5>
<div class="class-time">
<?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['start_link']; ?>" ><button class="join-class-btn">Start</button></a></div>
<?php } else { ?>
<div class="date"><?php echo ucfirst($c['day']).', '.date('h:i a',strtotime($c['start'])); ?></div>
<?php } ?>
<div class="time"><i class="far fa-clock"></i><span><?php echo $c['duration']; ?></span></div>
</div>
</div>
<p>Lorem ipsum dolor in sit amet, of consetetursadip scing elitr, sed. diam </p>
</div>
</div>
<?php }
} else { ?>
<div class="upcoming-tab">No Sessions scheduled </div>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
</main>
<script>
function showsessions(dateval){
// alert(dateval);
$.ajax({
type : 'POST',
url : "<?= base_url(); ?>Teacher/calenderSessions",
data:{dateval:dateval},
success:function(resposne){
$('.upcoming-section-wrap').html(resposne);
}
});
}
</script>