<div class="item active">
                                        <!-- Image -->
                                        <img src="<?php 
    echo base_url('uploads/images/' . $blogpost->featured_img);
    ?>
" alt="">
                                    </div>

                                </div>

                            </div>


                            <!-- Paragraph -->
                            <p><?php 
    echo get_blog_data_by_lang($blogpost, 'description');
    ?>
</p>
                        </div>
                    </div>
                    <!-- Blog item ends -->
                    <!-- Social media sharing section -->
                    <div class="well">
                        <span class='st_sharethis_large' displayText='ShareThis'></span>
                        <span class='st_facebook_large' displayText='Facebook'></span>
                        <span class='st_twitter_large' displayText='Tweet'></span>
                        <span class='st_linkedin_large' displayText='LinkedIn'></span>
                        <span class='st_pinterest_large' displayText='Pinterest'></span>
                        <span class='st_email_large' displayText='Email'></span>

                    </div>
    <div class="row">

        <div class="col-md-9 col-sm-12 col-xs-12">

            <?php 
if ($posts->num_rows() <= 0) {
    ?>
                <div class="alert alert-warning"><?php 
    echo lang_key('post_not_found');
    ?>
</div>
            <?php 
} else {
    foreach ($posts->result() as $post) {
        $title = get_blog_data_by_lang($post, 'title');
        $desc = get_blog_data_by_lang($post, 'desc');
        ?>

                    <!-- Blog item starts -->
                    <div class="blog-one-item row">
                        <!-- blog One Img -->
                        <div class="blog-one-img col-md-3 col-sm-3 col-xs-12">
                            <!-- Image -->
                            <a href="<?php 
        echo site_url('post-detail/' . $post->id . '/' . dbc_url_title($title));
        ?>
"><img src="<?php 
        echo get_featured_photo_by_id($post->featured_img);
        ?>
" alt="" class="img-responsive img-thumbnail" /></a>
                        </div>
 public function postdetail($id = '')
 {
     $this->load->model('admin/blog_model');
     $value['blogpost'] = $this->blog_model->get_post_by_id($id);
     $data['blog_meta'] = $value['blogpost'];
     $data['sub_title'] = get_blog_data_by_lang($value['blogpost'], 'title');
     $data['content'] = load_view('post_detail_view', $value, TRUE);
     load_template($data, $this->active_theme);
 }
                  <td data-title="<?php 
        echo lang_key('title');
        ?>
" class="numeric"><a href="<?php 
        echo site_url('admin/blog/manage/' . $row->id);
        ?>
"><?php 
        echo get_blog_data_by_lang($row, 'title');
        ?>
</a></td>

                  <td data-title="<?php 
        echo lang_key('description');
        ?>
" class="numeric"><?php 
        echo truncate(encode_html(get_blog_data_by_lang($row, 'description')), 30, '...', false);
        ?>
</td>

                  <td data-title="<?php 
        echo lang_key('status');
        ?>
" class="numeric">

                    <?php 
        if ($row->status == 1) {
            $status = '<span class="label label-success">' . lang_key('published') . '</span>';
        } else {
            if ($row->status == 2) {
                $status = '<span class="label label-warning">' . lang_key('drafted') . '</span>';
            }
 function get_site_map_xml()
 {
     $page_checked = $this->input->post('pages');
     $blog_post_checked = $this->input->post('blog_post');
     $estate_checked = $this->input->post('estate');
     $xml_array = array();
     if ($page_checked == 1 or $blog_post_checked == 2 or $estate_checked == 3) {
         if ($page_checked == 1) {
             $menu = get_option('top_menu');
             $menu = json_decode($menu->values);
             $page_url_array = array();
             foreach ($menu as $row) {
                 $id = $row->id;
                 $url = $this->get_page_url_by_id($id);
                 $page_url_array[] = $url;
             }
             if ($page_url_array) {
                 $xml_array = $page_url_array;
             }
         }
         if ($blog_post_checked == 2) {
             $this->load->model('show/show_model');
             $blog_post = $this->show_model->get_all_active_blog_posts_by_range('all', 'all', 'id', 'desc', 'all');
             if ($blog_post->num_rows() > 0) {
                 $blog_post_array = array();
                 foreach ($blog_post->result() as $row) {
                     $post_id = $row->id;
                     $post_title = get_blog_data_by_lang($row, 'title');
                     $url = site_url('post-detail/' . $post_id . '/' . dbc_url_title($post_title));
                     $blog_post_array[] = $url;
                 }
             }
             if ($blog_post_array) {
                 $xml_array = array_merge($xml_array, $blog_post_array);
             }
         }
         if ($estate_checked == 3) {
             $estate_array = array();
             $this->load->model('classified_model');
             $estate_data = $this->classified_model->get_all_estates_admin('all', 'all', 'create_time', 'desc');
             if ($estate_data->num_rows() > 0) {
                 foreach ($estate_data->result() as $row) {
                     $url = post_detail_url($row);
                     $estate_array[] = $url;
                 }
             }
             if ($estate_array) {
                 $xml_array = array_merge($xml_array, $estate_array);
             }
         }
         $xml = $this->prepare_xml($xml_array);
         $this->load->helper('file');
         if (!write_file('./sitemap.xml', $xml)) {
             $this->session->set_flashdata('msg', '<div class="alert alert-danger">ROOT/sitemap.xml does not have write permission .</div>');
             redirect(site_url('admin/system/generatesitemap'));
         }
         $this->session->set_flashdata('msg', '<div class="alert alert-success">' . lang_key('site_map_generation_success') . '</div>');
         redirect(site_url('admin/system/generatesitemap'));
     } else {
         $this->session->set_flashdata('msg', '<div class="alert alert-danger">' . lang_key('select_option') . '</div>');
         redirect(site_url('admin/system/generatesitemap'));
     }
 }