 <?php
 /*
 Template Name: lekcja_5
 */
 get_header();
 ?>
<?php
 block_unlg();
$wp_query = new WP_Query(array( 'post_type' => 'lekcja_5',
    'post_status'    => 'publish',
    'posts_per_page' => -1,
)); global $wpdb;
    $l5_title = $wpdb->get_var("SELECT meta_value FROM wp_postmeta WHERE meta_key LIKE 'lekcja_5_tytul' ");
     $l5_title2 = $wpdb->get_var("SELECT meta_value FROM wp_postmeta WHERE meta_key LIKE 'lekcja_5_tytul2' ");
      $l5_title3 = $wpdb->get_var("SELECT meta_value FROM wp_postmeta WHERE meta_key LIKE 'lekcja_5_tytul3' ");
      $l5_czas = $wpdb->get_var("SELECT meta_value FROM wp_postmeta WHERE meta_key LIKE 'lekcja_5_czas' ");
      $l5_zawartosc = $wpdb->get_var("SELECT meta_value FROM wp_postmeta WHERE meta_key LIKE 'lekcja_5_zawartosc' ");
      $l5_kategoria = $wpdb->get_var("SELECT meta_value FROM wp_postmeta WHERE meta_key LIKE 'lekcja_5_kategoria' ");
      $l5_trudnosc = $wpdb->get_var("SELECT meta_value FROM wp_postmeta WHERE meta_key LIKE 'lekcja_5_trudnosc' ");
      $l5_utrwal1 = $wpdb->get_var("SELECT meta_value FROM wp_postmeta WHERE meta_key LIKE 'lekcja_5_utrwal1' ");
       $l5_utrwal2 = $wpdb->get_var("SELECT meta_value FROM wp_postmeta WHERE meta_key LIKE 'lekcja_5_utrwal2' ");
       $l5_utrwal3 = $wpdb->get_var("SELECT meta_value FROM wp_postmeta WHERE meta_key LIKE 'lekcja_5_utrwal3' ");




?>
 <!-- type: kurs1 -->
<div  class="container-fluid lesson-block">
	<div class="container">
		<div class="row single-les-title">
			<div class="col-xs-12 col-sm-8 col-md-8">
				 	<?php echo   $l5_title;?>
			</div>
		</div>
		<div class="row single-les-subtitle">
			<div class="col-xs-12 col-sm-8 col-md-8">
			
			</div>
		</div>
		<div class="row single-les-subtitle2">
			<div class="col-xs-12 col-sm-8 col-md-8">
				<?php echo   $l5_title2;?>
			</div>
		</div>
		<div class="row single-les-cel">
			<div class="col-xs-12 col-sm-8 col-md-8">
			
			</div>
		</div>
		<div class="row">
			<div class="col-xs-12 col-sm-8 col-md-8">
				<!--<button  class="single-1-button ">Rozpocznij</button>-->
			</div>
		</div>
	</div>
</div>
<!--sekcja 2 -->
<div class="container-fluid sing-bg">
	<div class="container">
		<div class="row">
			<div class="col-xs-12 col-sm-11 col-md-8">
				<div class="row lesson-tit">
					<?php echo   $l5_title3;?>
				</div>
				<!-- -->
				<?php
 
							while ( $wp_query->have_posts() ) :
   	 						$wp_query->the_post();
							?>
				<div class="row lesson-name">
					<div class="col-xs-2 col-sm-1 col-md-1 ">
						<?php if((quiz_done_num() ===  post_quiz_num()) && (post_quiz_num() != 0 ) ){ ?>
						<div class="l-circle2"><i class="fa fa-check l-circle-check" aria-hidden="true"></i></div>
						<?php } else { ?>
						<div class="l-circle"></div>
						<?php } ?>
					</div>
					<div class="col-xs-10 col-sm-11 col-md-11">
						<a href="<?php the_permalink();?>"><?php the_title(); ?></a>
					</div>
				</div>
				<?php endwhile; ?>
				<!-- -->
				<div class="row">
					<!--<button  class="single-1-button ">Rozpocznij</button>-->
				</div>
			</div>
			<!-- sec col -->
			<div class="col-xs-12 col-sm-6 col-md-4 less-block ">
				<div class="row">
					<div class="col-md-12 box-sh">
						<div class="row less-block-img">

						</div>
						  
						<div class="row less-block-title">
							<div class="col-md-11">
									<?php echo   $l5_title;?>
							</div>
						</div>
						<div class="row">
							<div class="col-sm-8 col-md-4">
								<div class="row less-block-subtitle">
									<?php echo   $l5_czas;?>
								</div>
								<div class="row less-block-subtitle2">
									czas kursu
								</div>
								<div class="row stars-4">
									<?php if($l5_trudnosc === "1" || $l5_trudnosc === "0" ){ ?>
									<i class="fa fa-star" aria-hidden="true"></i>
									<i class="fa fa-star stars-grey" aria-hidden="true"></i>
									<i class="fa fa-star stars-grey" aria-hidden="true"></i>
								<?php } else if ($l5_trudnosc === "2") { ?>
									<i class="fa fa-star" aria-hidden="true"></i>
									<i class="fa fa-star" aria-hidden="true"></i>
									<i class="fa fa-star stars-grey" aria-hidden="true"></i>
									<?php } else{ ?>
									<i class="fa fa-star" aria-hidden="true"></i>
									<i class="fa fa-star" aria-hidden="true"></i>
									<i class="fa fa-star" aria-hidden="true"></i>
									<?php }?>
								</div>
								<div class="row less-block-subtitle2">
									poziom trudności
								</div>
							</div>
							<div class="col-sm-8 col-md-8">
								<div class="row less-block-subtitle">
									<?php echo     $l5_zawartosc;?>
								</div>
								<div class="row less-block-subtitle2">
									zawartość
								</div>
								<div class="row less-block-subtitle">
									<?php echo     $l5_kategoria;?>
								</div>
								<div class="row less-block-subtitle2">
									Kategoria
								</div>
							</div>
						</div>
				</div>
		</div>
		<!-- drugi panel --> 
		<div class="row">
			<div class="col-md-12 less-block2 box-sh">
				<div class="row less-block2-title">
					 Utrwal swoją wiedzę
				</div>
				<div class="row less-block2-subtitle">
					<div class="col-sm-2 col-md-2 less-check">
						<i class="fa fa-check" aria-hidden="true"></i>
					</div> 
					<div class="col-sm-10 col-md-10">
						<?php echo    $l5_utrwal1;?>
					</div>
				</div>
				<div class="row less-block2-subtitle">
					<div class="col-sm-2 col-md-2 less-check">
						<i class="fa fa-check" aria-hidden="true"></i>
					</div> 
					<div class="col-sm-10 col-md-10">
						<?php echo    $l5_utrwal2;?>
					</div>
				</div>
				<div class="row less-block2-subtitle">
					<div class="col-sm-2 col-md-2 less-check">
						<i class="fa fa-check" aria-hidden="true"></i>
					</div> 
					<div class="col-sm-10 col-md-10">
						<?php echo    $l5_utrwal3;?>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
		
</div>
</div>







               

 

<?php get_footer(); ?>
      