<?php

	/*echo query_load_post();
	
	echo id_post();
	
	echo author_post();

	echo title_post();
	
	echo url_post();
	
	echo format_post();
	
	echo category_post();
	
	echo status_post();
	
	echo tag_post();
	
	echo datetime_post();
	
	echo datetime_change_post();
	
	echo user_edit_post();
	
	echo comments_post();
	
	echo thumbnail_post();
	
	echo contents_post();
	
	echo status_post();
	
	if(validate_password_post() == true){
		
	}
	
	if(status_post() == "public"){
		echo "tak";
	}else{
		echo "nie";
	}
	
	if(status_post() == "protect_password"){
		echo '
		
		
		
		';
}*/

	if((status_post() == "public") OR (status_post() == "protect_password")){
		if(title_post() != "protect_password"){
?>

			<section class="tsr fs-100 l-0 tsr-mt-10 tsr-post-auto braund-post-<?php echo id_post(); ?>">
				<?php if(thumbnail_post() != NULL){?>
				<section class="tsr col-ms20">
					<?php echo thumbnail_post(); ?>
				</section>
				<section class="tsr col-ms80 tsr-p-10px">
					<?php echo title_post(); ?>
				</section>
				<section class="tsr col-ms80 fs-100 tsr-p-10px">
					opublikowano dnia <?php echo data_format(datetime_post(), "m.d.Y"); ?> o godzinie <?php echo data_format(datetime_post(), "H:i"); ?> przez <?php echo author_post(); ?>
				</section>
				<?php }else{?>
				<section class="tsr tsr-p-10px">
					<?php echo title_post(); ?>
				</section>
				<section class="tsr fs-100 tsr-p-10px">
					opublikowano dnia <?php echo data_format(datetime_post(), "m.d.Y"); ?> o godzinie <?php echo data_format(datetime_post(), "H:i"); ?> przez <?php echo author_post(); ?>
				</section>
				<?php }?>
				<section class="tsr tsr-border-solid-bottom tsr-mt-10"></section>
				<section class="tsr fs-100 tsr-mt-10 tsr-post-auto tsr-za-wi">
					<?php echo contents_post(); ?>
				</section>
			</section>
			<section class="tsr tsr-border-solid-bottom tsr-mt-10"></section>
	
<?php 
		}
		
		if (status_post() == "protect_password"){
			if(validate_password_post() == false){

				echo'
				<form accept-charset="UTF-8" action="" method="post" id="add_post" autocomplete="off">	
					<section class="tsr tsr-p-10px tsr-algin-left">Wpisz hasło aby zobaczyć zawartość posta!</section>
					<input type="text" name="acces_to_protect_post" class="tsr-mt-10" />
					<button type="submit" class="tsr-mt-10" >Wyśli hasło</button>
				</form>
				';
			}
		}		
		
	} 
?>	

	<section class="tsr tsr-mt-50 tsr-float-left l-0">
		<a href="<?php echo url_site_bm(); ?>" class="tsr-button tsr-normal"> 
			Home
		</a>
	</section>