<!-- 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 $this->lang->line('our'); ?> <?php echo $this->lang->line('news'); ?></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>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- Inner Pages Main Section -->

<?php if (isset($news) && !empty($news)) { ?>
    <!-- Our News -->
    <section class="ulockd-ip-latest-news ulockd-pad650">
        <div class="container">
            <div class="row">
                <div class="col-md-6 col-md-offset-3 text-center">
                    <div class="ulockd-main-title">
                        <h2 class="mt-separator"><?php echo $this->lang->line('our'); ?> <?php echo $this->lang->line('news'); ?></h2>
                        <?php if ($this->session->userdata('site_lang') == 'bengali') { ?>
                            <p class="text-justify"><?php echo isset($this->sections->bn_news) && !empty($this->sections->bn_news) ? $this->sections->bn_news : ''; ?></p>
                        <?php } else { ?>
                            <p class="text-justify"><?php echo isset($this->sections->news) && !empty($this->sections->news) ? $this->sections->news : ''; ?></p>
                        <?php } ?>
                    </div>
                </div>
            </div>
            <div class="row">
                <?php foreach ($news as $obj) { ?>
                    <div class="col-xxs-12 col-xs-6 col-sm-6 col-md-4">
                        <div class="course-box wow fadeInUp" data-wow-duration="300ms">
                            <div class="cb-thumb">
                                <?php $image =  pathinfo($obj->attachment, PATHINFO_EXTENSION); ?>
                                <?php if ($image == 'jpg' || $image == 'jpeg' || $image == 'png' || $image == 'gif' || $image == 'bmp') { ?>
                                    <img style="height:220px; width:100%" 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:220px; width:100%" class="media-object thumbnail" src="<?php echo IMG_URL; ?>news.jpg" alt="news">
                                <?php } ?>
                            </div>
                            <div class="cb-details style2">
                                <h3><?php echo $obj->title; ?></h3>
                                <ul class="list-inline course-feature">
                                    <li><a href="#"><i class="fa fa-user text-thm2"></i> By: Admin</a></li>
                                    <li><a href="<?php echo site_url('news/' . $obj->id . '/' . get_slug($obj->title)); ?>"><i class="fa fa-calendar text-thm2"></i> <?php echo date('d M', strtotime($obj->date)); ?></a></li>
                                </ul>
                                <p class="text-justify"><?php echo strip_tags(word_limiter($obj->description, 15)); ?></p>
                                <a href="<?php echo site_url('news/' . $obj->id . '/' . get_slug($obj->title)); ?>" class="btn btn-lg ulockd-btn-thm2"><?php echo $this->lang->line('read_more'); ?></a>
                            </div>
                        </div>
                    </div>
                <?php } ?>
            </div>
            <!-- Pagination -->
            <div class="row ulockd-mrgn1240">
                <div class="col-md-12 text-center">
                    <?php if ($this->pagination->create_links()) { ?>
                        <div class="card-footer justify-content-end">
                            <?php echo $this->pagination->create_links(); ?>
                        </div>
                    <?php } ?>
                </div>
            </div>
        </div>
    </section>
<?php } ?>