<!-- Home Design Inner Pages -->
<div class="ulockd-inner-home">
    <div class="container">
        <div class="row">
            <div class="inner-conraimer-details">
                <div class="col-md-12">
                    <h1 class="text-uppercase"><?php echo $news_single->title; ?></h1>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- Home Design Inner Pages -->
<div class="ulockd-inner-page">
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <div class="ulockd-icd-layer">
                    <ul class="list-inline ulockd-icd-sub-menu">
                        <li><a href="<?php echo site_url(); ?>"> <?php echo $this->lang->line('home'); ?> </a></li>
                        <li>></li>
                        <li><?php echo $this->lang->line('news'); ?></li>
                        <li>></li>
                        <li><?php echo $news_single->title; ?></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- Inner Pages Main Section -->

<!-- News Section -->
<section class="ulockd-service-details">
    <div class="container">
        <div class="col-md-8 col-lg-8">
            <div class="row">
                <div class="col-md-12 ulockd-mrgn1210">
                    <div class="ulockd-project-sm-thumb">
                        <?php $image =  pathinfo($news_single->attachment, PATHINFO_EXTENSION); ?>
                        <?php if ($image == 'jpg' || $image == 'jpeg' || $image == 'png' || $image == 'gif' || $image == 'bmp') { ?>
                            <img style="width:100%" class="img-responsive img-whp" src="<?php echo UPLOAD_PATH; ?>news/<?php echo $news_single->attachment; ?>" title="<?php echo $news_single->title; ?>" alt="<?php echo $news_single->title; ?>">
                        <?php } ?>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12 ulockd-mrgn1210">
                    <div class="ulockd-pd-content">
                        <div class="ulockd-bp-date">
                            <ul class="list-inline">
                                <li class="ulockd-bp-date-innner">On
                                    <a href="<?php echo site_url('news/' . $news_single->id . '/' . get_slug($news_single->title)); ?>">
                                        <span class="text-thm2"><?php echo date('d', strtotime($news_single->date)); ?></span> / <?php echo date('M Y', strtotime($news_single->date)); ?>
                                    </a>
                                </li>
                                <li class="ulockd-bp-comment"><a href="#"><span class="flaticon-black-check-box text-thm1"></span> Admin</a></li>
                            </ul>
                        </div>
                        <h3><?php echo $news_single->title; ?></h3>
                        <p class="project-dp-one"><?php echo $news_single->description; ?></p>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-4 col-lg-4 ulockd-pdng0">
            <div class="widget-sidebar">
                <h3 class="title-widget-sidebar ulockd-bb-dashed"><?php echo $this->lang->line('search'); ?></h3>
                <div id="custom-search-input">
                    <form action="#" method="get">
                        <div class="input-group">
                            <input type="text" class="form-control input-lg bdrs0" placeholder="<?php echo $this->lang->line('keyword'); ?>..." />
                            <span class="input-group-btn">
                                <button class="btn btn-lg ulockd-btn-thm2" type="submit">
                                    <i class="glyphicon glyphicon-search"></i>
                                </button>
                            </span>
                        </div>
                    </form>
                </div>

                <?php if (isset($news) && !empty($news)) { ?>
                    <!-- Latest Post -->
                    <h3 class="title-widget-sidebar ulockd-bb-dashed">
                        <span class="fa fa-calendar text-thm2"></span> <?php echo $this->lang->line('latest'); ?> <?php echo $this->lang->line('news'); ?>
                    </h3>
                    <div class="ulockd-lp">
                        <?php foreach ($news as $obj) { ?>
                            <div class="ulockd-latest-post">
                                <div class="media">
                                    <div class="media-left pull-left">
                                        <a href="<?php echo site_url('news/' . $obj->id . '/' . get_slug($obj->title)); ?>">
                                            <?php $image =  pathinfo($obj->attachment, PATHINFO_EXTENSION); ?>
                                            <?php if ($image == 'jpg' || $image == 'jpeg' || $image == 'png' || $image == 'gif' || $image == 'bmp') { ?>
                                                <img style="height:50px; width:50px" class="media-object thumbnail" src="<?php echo UPLOAD_PATH; ?>news/<?php echo $obj->attachment; ?>" title="<?php echo $obj->title; ?>" alt="<?php echo $obj->title; ?>">
                                            <?php } else { ?>
                                                <img style="height:50px; width:50px" class="media-object thumbnail" src="<?php echo IMG_URL; ?>news.jpg" alt="news">
                                            <?php } ?>
                                        </a>
                                    </div>
                                    <div class="media-body">
                                        <a href="<?php echo site_url('news/' . $obj->id . '/' . get_slug($obj->title)); ?>">
                                            <h4 class="media-heading"><?php echo $obj->title; ?></h4>
                                        </a>
                                        <p class="text-justify"><?php echo strip_tags(word_limiter($obj->description, 15)); ?></p>
                                        <strong><a href="<?php echo site_url('news/' . $obj->id . '/' . get_slug($obj->title)); ?>"> <?php echo date('d M, Y', strtotime($news_single->date)); ?> </a></strong>
                                    </div>
                                </div>
                            </div>
                        <?php } ?>
                    </div>
                <?php } ?>
            </div>
        </div>
    </div>
</section>