<div class="section_wrapper all_blog">
<?php foreach ($posts as $post) { ?>
	<div class="mi-blog ">
		<div class="row">
			<a href="javascript:;" class="back"><i class="fa fa-arrow-left"></i> Back</a>
		</div>
		<div class="row">
			<div class="col-md-8">
				<div class="row">
					<div class="col-md-12">
						<div class="single-post style_1">
						  	<div class="post_top_img_area">
						  		<div class="post_top_img">
						  			<?php if($post['is_video']==0): ?>
										<img src="<?= base_url(html_escape($post['thumb']));?>" alt="">
									<?php else: ?>
										<div class="videoWrapper">
											<iframe src="<?= html_escape($post['thumb']);?>" frameborder="0"></iframe>
										</div>
									<?php endif;?>
						  		</div>
						  		<div class="post_top_img_details">
						  			<h4><?= html_escape($post['title']);?></h4>
						  			<ul class="single_post_cat">
										<li> <a href=""><i class="fa fa-file"></i> <?= html_escape($post['cat_name']);?></a></li>
										<li><i class="fa fa-calendar"></i> <?= cl_format(html_escape($post['created_at']));?></li>
										<li><i class="fa fa-eye"></i> <?= html_escape($post['hit']);?></li>
									</ul>
						  		</div>
						  	</div>
						  	<div class="single_post_details">
						  		<p><?= $post['details'];?></p>
						  	</div>
						  	<div class="single_post_tags">
						  		<?php foreach ($post['tags'] as $post_tag): ?>
									<a href="<?= base_url('tag-post/'.$slug.'/'.html_escape($post_tag['tag_slug'])); ?>" class="posted_tag"> <i class="fa fa-tag"></i> <?= html_escape($post_tag['tag_name'])?></a>
								<?php endforeach ?>
						  	</div>
						  	<?php $u_setting = get_user_settings($id); ?>
						  	<?php if(isset($u_setting['is_facebook']) && $u_setting['is_facebook']==1): ?>
							  	<div class="share_area mb-20">
									<a href="javascript:;" onclick="window.open('http://www.facebook.com/sharer.php?u=<?= base_url('post/'.$slug.'/'.html_escape($post['slug']));?>', 'sharer', 'toolbar=0,status=0,width=620,height=280');" class="facebook_share"><i class="fa fa-facebook"></i> <?= !empty(lang('share'))?lang('share'):"Share";?></a>
								</div>
							<?php endif; ?>
						</div>
					</div>
				</div>
			</div>

			<div class="col-md-4">
				<?php include 'right_side.php'; ?>
			</div>
		</div>
	</div>
<?php } ?>
</div>


	
