<?php defined('BASEPATH')or exit("NO DIRECT ACCESS iS ALLOWED");?>
<?php echo $this->uri->segment(n);?>
<div class="row">
					<div class="col-md-4">
						<div class="card card-box">
							<div class="card-head">
								<header>Runing Courses </header>

							</div>
							<div class="card-body card_scroll_activity">
							<div class="row">
							<ul class="docListWindow small-slimscroll-style">
								<?php if( count($list2) ):$sn=1;
													$count = $this->uri->segment(4);
													foreach($list2 as $runing ): ?>
							<li class="active-feed">

							<div>
							<span class="clsOnLeave"></span>
							</div>
							<h6>
							<span>
								<?php
							$todays_date = date("Y-m-d");
							$today      =   strtotime($todays_date);
							$stars      =   strtotime($lists->course_start_date);
							$ends       =   strtotime($lists->course_end_date);
							?>
							<?php if(($today>=$stars)&&($today<$ends)){?>
							<a href='<?=$user_url?>' class="label label-mini" style="background: linear-gradient(45deg,#FFB64D,#ffcb80);cursor:pointer;">Running</a>
							<?php }else if(($today<$stars)&&($today<$ends)){?>
								<a href='#' class="label label-info label-mini" style="cursor:pointer;">Upcoming</a>
							<?php    }else if ($today>=$ends){?>
									<a href='#' class="label label-mini" style="background: linear-gradient(45deg,#FF5370,#ff869a);cursor:pointer;">Completed</a>
							<?php    }else{?>
									<a href='#' class="label label-mini" style="background: linear-gradient(45deg,#FF5370,#ff869a);cursor:pointer;">Status not Found </a>
							<?php    }?>
									<span class="clsOnLeave"><?php echo strtoupper($runing->course_id_tag);?></span>
							</span>
							<!--<small class="text-muted" style="color: #919aa3!important;">4 hours ago</small>-->
							</h6>

							</li>
								<?php endforeach; ?>
								<?php endif; ?>
							</ul>
							</div>
							</div>
						</div>
					</div>
					<div class="col-md-4">
										<div class="card card-box">
										<div class="card-head">
										<header>Recent Classes</header>
										</div>
										<div class="card-body card_scroll_activity">
										<div class="row">
										<ul class="docListWindow small-slimscroll-style">
											<?php if( count($list1) ):$sn=1;
															 $count = $this->uri->segment(4);
															 foreach($list1 as $recent ): ?>
										<li>

										<div class="details">
										<div class="title">
										<a href="#"><?php echo strtoupper($lists->course_id_tag);?></a> -<?php echo strtoupper($lists->course_start_date);?>
										</div>
										<div>
										<span class="clsAvailable"><?php echo strtoupper($recent->class_id);?>-<?php echo strtoupper($recent->subject_id);?></span>
										</div>
										</div>
										</li>
											<?php endforeach; ?>
											<?php endif; ?>

										</ul>
										<div class="full-width text-center p-t-10" >
										</div>
										</div>
										</div>
										</div>
				</div>
				<div class="col-md-4">
									<div class="card card-box">
									<div class="card-head">
									<header>Earnings</header>
									</div>
									<div class="card-body card_scroll_activity">
									<div class="row">
									<ul class="docListWindow small-slimscroll-style">
										<?php if( count($list) ):$sn=1;
														 $count = $this->uri->segment(4);
														 foreach($list as $lists ): ?>
									<li>

									<div class="details">
									<div class="title">
									<a href="#"><?php echo ucfirst($lists->faculty);?></a> - <?php echo strtoupper($lists->course_id_tag);?>
									</div>
									<div>
									Total Earnings: <span class="clsOnLeave"><?php echo strtoupper($lists->total_earn);?></span>
									</div>
									<div>
										Class: <span class="clsOnLeave"><?php echo strtoupper($lists->class_id);?></span>

									</div>
									<div>
										Subject: <span class="clsOnLeave"><?php echo strtoupper($lists->subject_id);?></span>

									</div>
									</div>
									</li>
										<?php endforeach; ?>
										<?php endif; ?>

									</ul>
									<div class="full-width text-center p-t-10" >
									</div>
									</div>
									</div>
									</div>
			</div>
</div>
 <div class="row">
	 <?php if( count($list3) ):$sn=1;
 						$count = $this->uri->segment(4);
 						foreach($list3 as $course ): ?>
						<div class="col-md-3">
							<div class="blogThumb">
	                        	<div class="course-box">
	                        	<h4><?php echo  strtoupper($course->course_id_tag);?></h4>
		                            <div class="text-muted"><span class="m-r-10">
																	<?php
 																 $datetime1 = new DateTime("$course->course_start_date");

 																 $datetime2 = new DateTime("$course->course_end_date");

 																 $difference = $datetime1->diff($datetime2);

 																 echo 'Duration: <span class="clsOnLeave">' .$difference->m.' months, '.$difference->d.' days</span>';

																 ?>
																</span></div>
																<div class="text-muted"><span><i class="ti-user"></i> Class: <span class="clsOnLeave"><?php echo  strtoupper($course->class_id);?> </span></span></div>
																<div class="text-muted"><span><i class="ti-user"></i> Subject: <span class="clsOnLeave"><?php echo  strtoupper($course->subject_id);?> </span></span></div>
																<div class="text-muted"><span>Students: <span class="clsOnLeave"><?php echo  strtoupper($course->class_strength);?></span></span></div>
	                        	</div>
	                        </div>

                    	</div>

										<?php endforeach; ?>
										<?php endif; ?>

              </div>

</div>
</div>
</div>
