<?php 
include_once('header.php'); 
$latest_news=get_courses_display('','','',1,6);
?>
<!-- START HOME -->
	<section  id="home" class="home_bg" style="background-image: url(assets/images/banner/home.png);  background-size:cover; background-position: center center;">	
		<div class="container">
			<div class="row">
				<div class="col-lg-6 col-sm-6 col-xs-12">	
					<div class="home_content text-light">
						<h1 style="color:white">Better <span>Learning Future</span> Starts With Robotics</h1>
						<p>It is a long established fact that reader will be distracted readable content of a page when.</p>						
					</div>
					<div class="home_btn">
						<a href="#" class="cta" style="color:white"><span>Explore Courses</span>
						  <svg width="13px" height="10px" viewBox="0 0 13 10">
							<path d="M1,5 L11,5"></path>
							<polyline points="8 1 12 5 8 9"></polyline>
						  </svg>
						</a>
					</div>		
				</div><!-- END COL-->
				<div class="col-lg-6 col-sm-6 col-xs-12">	
					<div class="home_me_img">
						<img src="assets/images/all-img/home-image.png" class="img-fluid" alt="" />
						<div class="home_ps">
							<img src="assets/images/icon/user2.svg" alt="" />
							<h2>7500+</h2>
							<span>Active student</span>
						</div>
						<div class="home_ps2">
							<img src="assets/images/icon/file2.svg" alt="" />
							<h2>4500+</h2>
							<span>Online Course</span>
						</div>
					</div>		
				</div><!-- END COL-->
			</div><!--- END ROW -->			
		</div><!--- END CONTAINER -->
	</section>
	<!-- END  HOME -->
    
    	<!-- START TOP PROMO FEATURES -->
	<section class="tp_feature">
	   <div class="container-fluid">			
			<div class="row">					
						
				<div class="col-lg-4 col-sm-4 col-xs-12 no-padding wow fadeInUp" data-wow-duration="1s" data-wow-delay="0.3s" data-wow-offset="0">
					<div class="single_tp">
						<h3>Learn Without Limits</h3>
						<p>Explore courses designed to match your passion and goals.</p>
						<a href="#" class="cta"><span>DISCOVER MORE </span>
						  <svg width="13px" height="10px" viewBox="0 0 13 10">
							<path d="M1,5 L11,5"></path>
							<polyline points="8 1 12 5 8 9"></polyline>
						  </svg>
						</a>
					</div>
				</div><!-- END COL -->			
				<div class="col-lg-4 col-sm-4 col-xs-12 no-padding wow fadeInUp" data-wow-duration="1s" data-wow-delay="0.4s" data-wow-offset="0">
					<div class="single_tp">
						<h3>Empower Your Future</h3>
						<p>Gain practical skills that transform your career journey.</p>
						<a href="#" class="cta"><span>GET STARTED </span>
						  <svg width="13px" height="10px" viewBox="0 0 13 10">
							<path d="M1,5 L11,5"></path>
							<polyline points="8 1 12 5 8 9"></polyline>
						  </svg>
						</a>
					</div>
				</div><!-- END COL -->
                <div class="col-lg-4 col-sm-4 col-xs-12 no-padding wow fadeInUp" data-wow-duration="1s" data-wow-delay="0.2s" data-wow-offset="0">
					<div class="single_tp">
						<h3>Smart Learning Starts Here</h3>
						<p>Interactive, engaging, and built for real-world success.</p>
						<a href="#" class="cta"><span>LEARN MORE </span>
						  <svg width="13px" height="10px" viewBox="0 0 13 10">
							<path d="M1,5 L11,5"></path>
							<polyline points="8 1 12 5 8 9"></polyline>
						  </svg>
						</a>
					</div>
				</div><!-- END COL -->								
			</div><!-- END ROW -->
		</div><!-- END CONTAINER -->
	</section>
	<!-- END TOP PROMO FEATURES -->
    
    	<!-- START COUNTER -->
    <section id="counts" class="counts section-padding">
      <div class="container" data-aos="fade-up">
		<div class="section-title">
		  <h2>Some Fun Fact</h2>
		  <p>Our Great <span><u>Achievement</u></span></p>
		</div>	  
        <div class="row gy-4">
          <div class="col-lg-3 col-md-6">
            <div class="count-box">
              <i class="ti-face-smile"></i>
              <div>
                <span data-purecounter-start="0" data-purecounter-end="8232" data-purecounter-duration="1" class="purecounter"></span>
                <p>Enrolled Students</p>
              </div>
            </div>
          </div><!--- END COL -->		
          <div class="col-lg-3 col-md-6">
            <div class="count-box">
              <i class="ti-files" style="color: #ee6c20;"></i>
              <div>
                <span data-purecounter-start="0" data-purecounter-end="521" data-purecounter-duration="1" class="purecounter"></span>
                <p>Available Courses</p>
              </div>
            </div>
          </div><!--- END COL -->		
          <div class="col-lg-3 col-md-6">
            <div class="count-box">
              <i class="ti-headphone-alt" style="color: #15be56;"></i>
              <div>
                <span data-purecounter-start="0" data-purecounter-end="163" data-purecounter-duration="1" class="purecounter"></span>
                <p>Winning Award</p>
              </div>
            </div>
          </div><!--- END COL -->		
          <div class="col-lg-3 col-md-6">
            <div class="count-box">
              <i class="ti-user" style="color: #bb0852;"></i>
              <div>
                <span data-purecounter-start="0" data-purecounter-end="93" data-purecounter-duration="1" class="purecounter"></span>
                <p>Certified Students</p>
              </div>
            </div>
          </div><!--- END COL -->		
        </div><!--- END ROW -->		
      </div><!--- END CONTAINER -->		
    </section>	
	<!-- END COUNTER -->	
    
<!--START COURSE -->
	<div class="best-cpurse section-padding">
		<div class="container">
			<div class="section-title">
			  <h2>Popular Courses</h2>
			  <p>Choose Our <span><u>Top Courses</u></span></p>
			</div>				
			<div class="row">					
				  <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" id="form1" > 
                  	<input type="hidden" name="page_index" value="<?php echo $page_index; ?>" />
                  </form>
                  
               <?php
					  for($i=0;$i<count($latest_news);$i++)
					  {
					  
						  $sela=executework("SELECT * FROM  lms_cart_list,lms_cart_course where lms_cart_course.cart_id=lms_cart_list.cart_id and lms_cart_list.purchage_course_id='".$latest_news[$i]['id']."' and lms_cart_course.user_type='Student'");
						$cnta=@mysqli_num_rows($sela);
						$rowa=@mysqli_fetch_array($sela); 
    			?>
                  
                <div class="col-lg-4 col-sm-6 col-xs-12 wow fadeInUp" data-wow-duration="1s" data-wow-delay="0.1s" data-wow-offset="0">
					<div class="course-slide">
						<div class="course-img">
                        	<?php if(!empty($latest_news[$i]['course_img'])){ ?>
								<img src="../instructor/courses_upload/<?php echo $latest_news[$i]['course_img']; ?>" alt="">
							<?php } else{ ?>
                           		 <img src="assets/images/banner/course-bg-p2.png" alt="">
                            <?php } ?>
                            <div class="course-date"> 
								<span class="month">$<?php echo $latest_news[$i]['course_price']; ?></span>
							</div>
						</div> 
						<div class="course-content"><a class="c_btn" href="view_course.php?course_id=<?php echo $latest_news[$i]['id']; ?>"><?php $result = str_replace("_", " ", $latest_news[$i]['course_type']); echo mb_strtoupper($result); ?></a>
							 <h3>
                                <a href="view_course.php?course_id=<?php echo $latest_news[$i]['id']; ?>">
                                    <?php 
                                        $text = $latest_news[$i]['course_title'];
										$text = trim($text);
										
										if (mb_strlen($text) > 26) {
											echo mb_substr($text, 0, 26) . '...';
										} else {
											echo $text;
										}
                                    ?>
                                </a>
                            </h3>
							<span><i class="fa fa-calendar"></i><?php echo $latest_news[$i]['no_of_class']; ?> Classes</span> <br />
							<span><i class="fa fa-clock-o"></i><?php echo $latest_news[$i]['duration']; ?> Days Course Duration</span> 
						</div>
					</div><!--END COURSE SLIDE -->	
				</div><!--END COL -->
               <?php } 
			    if(count($latest_news)==0)
				{
			   ?> 
              		 <div> <center> <strong style="color:red"> No Data Found </strong> </center> </div>
               <?php }  
			   	if(count($latest_news)==6)
				{
			   ?>
               		<div class="col-lg-12 text-center">
                        <div class="cc_btn">
                            <a class="btn_one" href="<?php if(empty($_SESSION['login_id'])){ ?> login.php <?php } else{ ?> filter_courses.php <?php } ?>">Shop All Courses</a>
                        </div>
                    </div><!--END COL -->
               <?php } ?>
               
                			
			</div><!--END ROW -->		
		</div><!--END CONTAINER -->
	</div>
    
    	<!-- START TESTIMONIALS-->
	<section class="testi_home_area section-padding">
	   <div class="container">
			<div class="section-title">
				<h2>Testimonial</h2>
				<p>What Says <span><u>Our Students</u></span></p>
			</div>		
			<div class="row">								
				<div class="col-lg-12">
					<div id="testimonial-slider" class="owl-carousel">
						<div class="testimonial">
							<div class="testimonial_content">													
								<i class="fa fa-star"></i>
								<i class="fa fa-star"></i>
								<i class="fa fa-star"></i>
								<i class="fa fa-star"></i>
								<i class="fa fa-star"></i>
								<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr sed diam nonumy eirmod tempor.</p>
							</div>
							<div class="testi_pic_title tpt_one">
								<div class="pic">
									<img src="assets/images/all-img/t1.png" alt="">
								</div>
								<h4>James Clayton</h4>
								<small class="post">- Design Expert</small>	
							</div>
						</div><!-- END TESTIMONIAL -->
						<div class="testimonial">
							<div class="testimonial_content">													
								<i class="fa fa-star"></i>
								<i class="fa fa-star"></i>
								<i class="fa fa-star"></i>
								<i class="fa fa-star"></i>
								<i class="fa fa-star"></i>
								<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr sed diam nonumy eirmod tempor.</p>
							</div>
							<div class="testi_pic_title tpt_two">
								<div class="pic">
									<img src="assets/images/all-img/t2.png" alt="">
								</div>
								<h4>James Simmons</h4>
								<small class="post">- Marketing Expert</small>	
							</div>
						</div><!-- END TESTIMONIAL -->
						<div class="testimonial">
							<div class="testimonial_content">													
								<i class="fa fa-star"></i>
								<i class="fa fa-star"></i>
								<i class="fa fa-star"></i>
								<i class="fa fa-star"></i>
								<i class="fa fa-star"></i>
								<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr sed diam nonumy eirmod tempor.</p>
							</div>
							<div class="testi_pic_title tpt_three">
								<div class="pic">
									<img src="assets/images/all-img/t3.png" alt="">
								</div>
								<h4>Alex feroundo</h4>
								<small class="post">- Founder</small>	
							</div>
						</div><!-- END TESTIMONIAL -->
						<div class="testimonial">
							<div class="testimonial_content">													
								<i class="fa fa-star"></i>
								<i class="fa fa-star"></i>
								<i class="fa fa-star"></i>
								<i class="fa fa-star"></i>
								<i class="fa fa-star"></i>
								<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr sed diam nonumy eirmod tempor.</p>
							</div>
							<div class="testi_pic_title tpt_one">
								<div class="pic">
									<img src="assets/images/all-img/t4.png" alt="">
								</div>
								<h4>Kallu Mastan</h4>
								<small class="post">- Mastan group</small>	
							</div>
						</div><!-- END TESTIMONIAL -->
						<div class="testimonial">
							<div class="testimonial_content">													
								<i class="fa fa-star"></i>
								<i class="fa fa-star"></i>
								<i class="fa fa-star"></i>
								<i class="fa fa-star"></i>
								<i class="fa fa-star"></i>
								<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr sed diam nonumy eirmod tempor.</p>
							</div>
							<div class="testi_pic_title tpt_two">
								<div class="pic">
									<img src="assets/images/all-img/t1.png" alt="">
								</div>
								<h4>Devid max</h4>
								<small class="post">- Max iNC</small>	
							</div>
						</div><!-- END TESTIMONIAL -->
					</div><!-- END TESTIMONIAL SLIDER -->
				</div><!-- END COL  -->																							
			</div><!-- END ROW -->
		</div><!-- END CONTAINER -->
	</section>
	<!-- END TESTIMONIALS -->
    
    	<!-- START COURSE PROMOTION -->
	<section class="course_promo section-padding">
		<div class="container">									
			<div class="row">								
				<div class="col-lg-6 col-sm-12 col-xs-12 wow fadeInUp" data-wow-duration="1s" data-wow-delay="0.1s" data-wow-offset="0">
					<div class="cp_content">
						<h4>Best Online Learning Platform</h4>
						<h2>One Platfrom & Many <span><u>Courses</u></span> For You</h2>
						<p>Transform your skills into success stories with expert-led, career-focused learning.</p>
						<ul>
							<li><span class="ti-check"></span>9/10 Average Satisfaction Rate</li>
							<li><span class="ti-check"></span>96% Completitation Rate</li>
							<li><span class="ti-check"></span>Friendly Environment & Expert Teacher</li>
						</ul>
					</div>
					<div class="cp_btn">
						<a href="#" class="cta"><span>Sign Up Now</span>
						  <svg width="13px" height="10px" viewBox="0 0 13 10">
							<path d="M1,5 L11,5"></path>
							<polyline points="8 1 12 5 8 9"></polyline>
						  </svg>
						</a>
					</div>
				</div><!--- END COL -->						
				<div class="col-lg-6 col-sm-12 col-xs-12 wow fadeInUp" data-wow-duration="1s" data-wow-delay="0.2s" data-wow-offset="0">
					<div class="cp_img">
						<img src="assets/images/all-img/promo.png" class="img-fluid" alt="image">
						<!-- <div class="wc_year">
							<h3>20 Years of Experience <br />from 2002</h3>
						</div> -->
					</div>
				</div><!--- END COL -->			  
			</div><!--- END ROW -->
		</div><!--- END CONTAINER -->
	</section>
	<!-- END COURSE PROMOTION -->	
<?php include_once('footer.php'); ?>