<?php
$this->load->view('layout/frontend/header');
?>
<style>
.alert_view button {
float: left;
background-color: #4E3E55;
color: white;
border: none;
box-shadow: none;
font-size: 17px;
font-weight: 500;
font-weight: 600;
border-radius: 3px;
padding: 15px 35px;
margin: 26px 5px 0 5px;
cursor: pointer;
}
.alert_view button:focus{
outline: none;
}
.alert_view button:hover{
background-color: #33DE23;
}
.alert_view button:active{
background-color: #81ccee;
}
</style>
<!-- page-banner start-->
<section class="page-banner">
<div class="container">
<div class="row">
<div class="col-12">
<h3 class="one_line"><?php echo $getdata[0]->blog_title?></h3>
<ul class="banner-link text-center">
<li>
<a href="<?php echo FRONTRND_URL?>index">Home</a>
</li>
<li>
<a href="<?php echo FRONTRND_URL?>blog">blogs</a>
</li>
<li>
<span class="active act_one_line"><?php echo $getdata[0]->blog_title?></span>
</li>
</ul>
</div>
</div>
</div>
</section>
<!-- page-banner ends-->
<?php //echo '<pre>'; print_r($this->session->flashdata());?>
<!-- blog detail start-->
<section class="bg-w sp-100">
<div class="container">
<div class="row">
<div class="col-lg-8">
<div class="blog-detail">
<div id="blog-slider2" class="carousel blog-slider slide mb-4" data-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<img src="<?php echo BASE_URL;?>blog_image/<?php echo $getdata[0]->blog_image?>" style="width: 100%; height: 400px;" alt="listing">
</div>
<!--<div class="carousel-item">
<img src="<?php echo FRONT_ASSETS_BASE_URL?>img/blog/blog-lg2.png" alt="listing">
</div>
<div class="carousel-item">
<img src="<?php echo FRONT_ASSETS_BASE_URL?>img/blog/blog-lg3.png" alt="listing">
</div>-->
</div>
<!--<div class="carousel-nav">
<a class="carousel-control-prev" href="#blog-slider2" data-slide="prev">
<i class="fa fa-angle-left"></i>
</a>
<a class="carousel-control-next" href="#blog-slider2" data-slide="next">
<i class="fa fa-angle-right"></i>
</a>
</div>
<ul class="carousel-indicators">
<li data-target="#blog-slider2" data-slide-to="0" class="active"></li>
<li data-target="#blog-slider2" data-slide-to="1"></li>
<li data-target="#blog-slider2" data-slide-to="2"></li>
</ul>-->
</div>
<div class="blog-d-content">
<h4><?php echo $getdata[0]->blog_title?></h4>
<div style="padding:5px; width:100%;">
<p style="width:90%;"><?php echo $getdata[0]->blog_description?></p>
</div>
</div>
<ul class="blog-meta centering justify-content-start">
<li>
<i class="far fa-user mr-1"></i>
<a href="javascript:;"><?php echo $getdata[0]->first_name.' '.$getdata[0]->last_name;?></a>
</li>
<li>
<i class="far fa-calendar-alt mr-1"></i>
<?php echo date('d, M Y', strtotime($getdata[0]->blog_start_date));?>
</li>
<li>
<a href="javascript:;">
<i class="fa fa-eye mr-1"></i>
<?php echo $getdata[0]->blog_view; ?>
</a>
</li>
<li>
<a href="javascript:;">
<i class="far fa-comments mr-1"></i>
<?php echo $countcomment; ?> Comments
</a>
</li>
</ul>
<ul class="share-tag d-xl-flex justify-content-between">
<li class="tagcloud mb-0 centering justify-content-xl-between justify-content-start">
<h4 class="mb-0 mr-3"> tags : </h4>
<ul>
<?php
foreach($tagdata as $k=>$v){
?>
<li class="my-1">
<a href="<?php echo FRONTRND_URL?>categories/<?php echo $v->tag_name; ?>"><?php echo $v->tag_name;?></a>
</li>
<?php
}
?>
</ul>
</li>
<li class="blog-socials centering justify-content-xl-between justify-content-start mt-xl-0 mt-3">
<h4 class="mb-0 mr-3">share : </h4>
<div class="share socials">
<div class="socials">
<a href="#">
<i class="fab fa-facebook-f"></i>
</a>
<a href="#">
<i class="fab fa-google-plus-g"></i>
</a>
<a href="#">
<i class="fab fa-instagram"></i>
</a>
<a href="#">
<i class="fab fa-linkedin-in"></i>
</a>
<a href="#">
<i class="fab fa-twitter"></i>
</a>
</div>
</div>
</li>
</ul>
<!--<div class="blog-navigation mt-30 centering justify-content-between mb-60">
<div class="navi">
<a href="<?php echo FRONTRND_URL?>blogDetails/<?php echo $prevalue; ?>">
<i class="fa fa-angle-left"></i>
<span class="ml-2"> prev</span>
</a>
</div>
<div class="navi">
<a href="<?php echo FRONTRND_URL?>blogDetails/<?php echo $nexvalue;?>">
<span class="mr-2"> next</span>
<i class="fa fa-angle-right"></i>
</a>
</div>
<?php //echo $this->pagination->create_links();?>
</div> -->
<div class="comments-area">
<h4 class="title-sep2 mb-30">
comments
</h4>
<div class="clearfix">
<ol class="comment-list mb-60">
<?php
if (!empty($getblogcomment)){
foreach($getblogcomment as $key=>$val){
$date = date('d, M Y H:i:A',strtotime($val->created_date));
?>
<li class="comment" style="min-height: 127px !important;">
<div class="comment-body">
<div class="comment-author">
<img class="avatar photo" src="<?php echo FRONT_ASSETS_BASE_URL; ?>img/blog/com-1.jpg" alt="author">
<b class="fn">
<a href="javascript:;"> <?php echo $val->username;?></a>
</b>
<span class="says"> says:</span>
</div>
<div class="comment-meta">
<a href="javascript:;"> <?php echo $date; ?></a>
</div>
<p>
<?php echo $val->blog_comment; ?>
</p>
</div>
</li>
<?php
}
}
?>
</ol>
<div class="comment-respond" id="respond">
<h4 class="title-sep2 mb-30">
leave comment
</h4>
<?php
$title1 = strtolower($getdata[0]->blog_title);
$res1 = str_replace( array( '\'', '"', ',' , ';', '<', '>','.',' ','?','!','--' ), '-', $title1);
$mainid1 = base64_encode($getdata[0]->id);
?>
<form class="comment-form" id="commentform" name="commentform" action="<?php echo FRONTRND_URL?>blogDetails/<?php echo $res1.'/'.$mainid1;?>" method="post" action="#">
<input type="hidden" name="blog_id" id="blog_id" value="<?php echo $getdata[0]->id;?>">
<div class="row">
<div class="col-md-6 col-12">
<span class="fa fa-user"></span>
<input type="text" id="username" name="username" class="form-control" placeholder="Enter Name" required="required">
</div>
<div class="col-md-6 col-12">
<span class="fa fa-envelope"></span>
<input type="email" class="form-control" placeholder="Enter Email" id="useremail" name="useremail" required="required">
</div>
<div class="col-12">
<textarea rows="5" name="comment" class="form-control" placeholder="Your Message" id="usercomment" name="usercomment" required="required"></textarea>
</div>
<div class="col-12">
<button type="submit" class="btn btn-one btn-anim" id="submit" name="submit">
<i class="fa fa-paper-plane"></i> submit</button>
</div>
</div>
</form>
</div>
<!-- Form END -->
</div>
</div>
</div>
</div>
<div class="col-lg-4 col-12">
<aside class="sidebar">
<div class="widget">
<h4 class="title-sep2 mb-30">about author</h4>
<div class="widget-author">
<div class="author-top text-right mb-4">
<div class="img-holder">
<img src="<?php echo BASE_URL;?>user_image/<?php echo $getdata[0]->user_image?>" alt="#">
</div>
<div class="author-info">
<h5 class="c-white"><?php echo $getdata[0]->first_name.' '.$getdata[0]->last_name ;?></h5>
<span>Beatle Groups</span>
</div>
</div>
<p class="bor-b pb-3"><?php echo $getdata[0]->user_description ;?></p>
</div>
</div>
<div class="widget">
<h4 class="title-sep2 mb-30">categories</h4>
<div class="widget-categories">
<ul class="widget-list">
<?php
foreach ($getalltag as $k=>$v){
?>
<li>
<a href="<?php echo FRONTRND_URL?>categories/<?php echo $v->tag_name; ?>"><?php echo $v->tag_name; ?>
</a>
</li>
<?php
}
?>
</ul>
</div>
</div>
<div class="widget">
<h4 class="title-sep2 mb-30">Popular Blogs</h4>
<div class="widget-post">
<ul>
<?php
foreach($getallblog as $k=>$v){
if($k <= 5 && $v->id != $getdata[0]->id){
$title = strtolower($v->blog_title);
$res = str_replace( array( '\'', '"', ',' , ';', '<', '>','.',' ','?','!','--' ), '-', $title);
$mainid = base64_encode($v->id);
?>
<li class="news-post">
<figure class="thumb">
<a href="<?php echo FRONTRND_URL ?>blogDetails/<?php echo $res.'/'.$mainid;?>">
<img src="<?php echo BASE_URL;?>blog_image/<?php echo $v->blog_image?>" alt="news">
</a>
</figure>
<div class="news-content">
<a class="two_line" href="<?php echo FRONTRND_URL ?>blogDetails/<?php echo $res.'/'.$mainid;?>"><?php echo $v->blog_title?></a>
<p>
<?php echo date('d, M Y',strtotime($v->created_date));?>
</p>
</div>
</li>
<?php
}
}
?>
</ul>
</div>
</div>
<div class="widget">
<h4 class="title-sep2 mb-30">tags</h4>
<div class="widget-post">
<div class="tagcloud">
<ul>
<?php
foreach ($getalltag as $k=>$v){
?>
<li>
<a href="<?php echo FRONTRND_URL?>categories/<?php echo $v->tag_name; ?>"><?php echo $v->tag_name; ?>
</a>
</li>
<?php
}
?>
</ul>
</div>
</div>
</div>
</aside>
</div>
</div>
</div>
</section>
<!-- blog detail end -->
<?php
$this->load->view('layout/frontend/footer');
?>