Example #1
0
 public function get_excerpt($service)
 {
     $data = array();
     $lang = $this->lang->lang();
     $url = $this->link($service);
     switch ($lang) {
         case "az":
             $data['name'] = e($service->name_az);
             $data['desc'] = limit_to_numwords(e(strip_tags($service->desc_az)), 20);
             $data['body'] = limit_to_numwords(e(strip_tags($service->body_az)), 20);
             break;
         case "ru":
             $data['name'] = e($service->name_ru);
             $data['desc'] = limit_to_numwords(e(strip_tags($service->desc_ru)), 20);
             $data['body'] = limit_to_numwords(e(strip_tags($service->body_ru)), 20);
             break;
         default:
             $data['name'] = e($service->name_en);
             $data['desc'] = limit_to_numwords(e(strip_tags($service->desc_en)), 20);
             $data['body'] = limit_to_numwords(e(strip_tags($service->body_en)), 20);
             break;
     }
     $data['url'] = e($this->link($service));
     $data['slug'] = e($service->slug);
     $data['more_detail'] = anchor($url, 'More Details >', array('title' => e($data['name']), 'class' => "theme-btn btn-style-two"));
     return $data;
 }
Example #2
0
function get_excerpt($article, $numwords = 50)
{
    $string = '';
    $url = article_link($article);
    $string .= '<h2>' . anchor($url, e($article->title)) . '</h2>';
    $string .= '<p class="pubdate">' . e($article->pubdate) . '</p>';
    $string .= '<p>' . e(limit_to_numwords(strip_tags($article->body), $numwords)) . '</p>';
    $string .= '<p>' . anchor($url, 'Read more ›', array('title' => e($article->title))) . '</p>';
    return $string;
}
Example #3
0
function get_excerpt($news, $numwords = 50)
{
    $data = array();
    $url = news_link($news);
    $data['title'] = anchor($url, e($news->title));
    $data['pubdate'] = e($news->pubdate);
    $data['body'] = e(limit_to_numwords(strip_tags($news->body), $numwords));
    $data['read_more'] = anchor($url, 'Read More', array('title' => e($news->title)));
    return $data;
}
Example #4
0
 public function search($offset = 0)
 {
     $options = $this->m_places->array_from_post(array('title_s', 'type', 'city', 'minbed', 'maxbed', 'minbath', 'maxbath', 'minprice', 'maxprice', 'minfloor', 'maxfloor'));
     if ($this->form_validation->run('search')) {
         $count = $this->m_places->search($options, $status = FALSE);
         $perpage = getOptions('paging');
         if (count($count) > $perpage) {
             $this->load->library('pagination');
             $config['base_url'] = site_url('admin/places/search');
             $config['total_rows'] = count($count);
             $config['per_page'] = $perpage;
             $config['uri_segment'] = 4;
             $q = $this->pagination->initialize($config);
             $offset = $this->uri->segment(4) ? $this->uri->segment(4) : 0;
         } else {
             $this->data['pagination'] = '';
             $offset = 0;
         }
         $status = $this->m_places->status_place;
         $telo = $this->m_places->search($options, $status = FALSE, $perpage, $offset);
         $str = '';
         if ($telo) {
             $str .= '<section class="col-xs-12 col-sm-6 col-md-12">';
             foreach ($telo as $s) {
                 $str .= '<article class="search-result row">';
                 $str .= $s->image ? '<div class="col-xs-12 col-sm-12 col-md-3"><img class="img-responsive thumbnail" src="' . base_url('assets/img/timthumb.php') . '?src=' . base_url($s->image) . '&zc=0&h=140&w=180"></div>' : '<div class="col-xs-12 col-sm-12 col-md-3"><img class="img-responsive thumbnail" src="http://placehold.it/250x140&text=no+primary+image"></div>';
                 $str .= '<div class="col-xs-12 col-sm-12 col-md-2"><ul class="meta-search">';
                 $str .= '<ul><i class="fa fa-money"></i><span> ' . ($s->prices === null ? 'Not Set' : $this->data['currency'][getOptions('currency')] . ' ' . currency($s->prices)) . '</span></li>';
                 $str .= '<ul><li><i class="glyphicon glyphicon-home"></i> <span>' . ($s->title_type === null ? 'Not Set' : $s->title_type) . '</span></li>';
                 $str .= '<ul><li><i class="fa fa-arrows"></i> <span>' . ($s->floor_dim === null ? 'Not Set' : $s->floor_dim . ' ' . $this->data['floor'][getOptions('floor_metric')]) . '</span></li>';
                 $str .= '<ul><li><i class="fa fa-table"></i> <span>' . ($s->bedrooms === null ? 'Not Set' : $s->bedrooms . ' bedrooms') . '</span></li>';
                 $str .= '<ul><li><a href=' . site_url('front/places/details') . '/' . $s->id_places . ' class="btn btn-primary btn-xs">View Details</a></li>';
                 $str .= '</ul></div>';
                 $str .= '<div class="col-xs-12 col-sm-12 col-md-7 excerpet">';
                 $str .= '<h3>' . $s->title_places . ' / ' . $this->data['status'][$s->status] . '</h3>';
                 $str .= '<p>' . limit_to_numwords(strip_tags($s->desc), 50) . '</p></div>';
                 //                    $str .= '<td>' . ($s->title_type === null ? 'Not Set' : $s->title_type) . '</td>';
                 //                    $str .= '<td>' . ($s->prices === null ? 'Not Set' : $this->data['currency'][getOptions('currency')] . ' ' . currency($s->prices)) . '</td>';
                 $str .= '<span class="clearfix borda"></span></article>';
             }
             $str .= '<div>' . $this->pagination->create_links() . '</div>';
             $str .= '</section>';
         } else {
             $str .= 'No Data Found';
         }
         echo $str;
     }
 }
Example #5
0
                                        <th style="width: 20%">Mẫu đơn</th>
                                        <th>Tóm tắt nội dung</th>
                                        <th style="width: 8%">Gửi đơn</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php 
foreach ($forms as $form) {
    ?>
                                        <tr>
                                            <td><?php 
    echo $form->form_title;
    ?>
</td>
                                            <td><?php 
    echo limit_to_numwords($form->form_body, 60);
    ?>
</td>
                                            <td class="text-center">
                                                <a href="<?php 
    echo logged_url('form_submit/send');
    ?>
?id=<?php 
    echo $form->form_id;
    ?>
">
                                                    <span class="label label-success"><i class="fa fa-send"></i></span>
                                                </a>
                                            </td>
                                        </tr>
                                    <?php 
Example #6
0
                <div class="col-md-4 col-sm-6 col-xs-12 column">
                	<article class="inner-box">
                            <figure class="image-box">
                                <img src="<?php 
    echo base_url() . 'public/uploads/';
    echo !empty($work["work_image"]) ? $work["work_image"] : $work["work_logo"];
    ?>
" alt="" title="">
                            </figure>
                        <div class="content">
                        	<h3><a href="#"><?php 
    echo anchor(site_url() . 'work/' . $work["work_id"] . '/' . $work["work_slug"], $work["work_name"]);
    ?>
</a></h3>
                            <div class="text"><p><?php 
    echo e(limit_to_numwords(strip_tags($work["body"]), 30));
    ?>
</p></div>
                            <div class="text-right"><?php 
    echo anchor(site_url() . 'work/' . $work["work_id"] . '/' . $work["work_slug"], 'Read More');
    ?>
</div>
                        </div>
                    </article>
                </div>
                <?php 
}
?>
                
            </div>
        </div>
Example #7
0
function get_excerpt($articles, $numwords = 100)
{
    $str = '';
    $i = 1;
    if (count($articles)) {
        foreach ($articles as $article) {
            $url = 'article/' . intval($article->id) . '/' . e($article->slug);
            //echo '<h2>'.$i.'</h2>';
            //($i%2)?$str .='<div class="section group group">':$str .='';
            if ($i % 2 != 0) {
                $str .= '<div class="section group">' . PHP_EOL;
            } else {
                $str .= '';
            }
            //$str .='<div class="section group group">';
            $str .= '<div class="listview_1_of_2 images_1_of_2">' . PHP_EOL;
            $str .= '<div class="listimg listimg_2_of_1">' . PHP_EOL;
            $str .= '<img src="images/res.png">' . PHP_EOL;
            $str .= '</div>' . PHP_EOL;
            $str .= '<div class="text list_2_of_1">' . PHP_EOL;
            $str .= '<h3>' . anchor($url, e($article->title)) . '</h3>';
            $str .= '<h4>Sed ut perspiciatis undeaccusantium .</h4>' . PHP_EOL;
            $str .= '<p class="pubdate">' . e($article->pub_date) . '</p>';
            $str .= '<p>' . limit_to_numwords($article->body, $numwords) . ' ... </p>' . PHP_EOL;
            $str .= anchor($url, 'Read More', array('title' => e($article->title), 'class' => 'btn'));
            $str .= '</div></div>' . PHP_EOL;
            $i++;
        }
    }
    return $str;
}
Example #8
0
            <div class="col-md-4 col-sm-6 col-xs-12 column">
                <article class="inner-box">
                    <figure class="image-box"><a href="#"><img src="<?php 
        echo site_url() . '/public/uploads/' . $client["logo"];
        ?>
" alt="" title=""></a></figure>
                    <div class="content">
                        <h3><a href="<?php 
        echo site_url() . 'client/' . $client["id"] . '/' . $client["slug"];
        ?>
"><?php 
        echo e($client["name"]);
        ?>
</a></h3>
                        <div class="text"><p><?php 
        echo e(limit_to_numwords(strip_tags($client["about"]), 50));
        ?>
</p></div>
                        <div class="text-right"><a href="<?php 
        echo site_url() . 'client/' . $client["id"] . '/' . $client["slug"];
        ?>
" class="read-more"><span class="icon fa fa-angle-right"></span> Read More</a></div>
                    </div>
                </article>
            </div>
            <?php 
    }
}
?>
        </div>
    </div>
Example #9
0
    foreach ($news as $new) {
        ?>
                <div class="col-md-4">
                    <h5><i><?php 
        echo $new->title;
        ?>
</h5>
                    <img class="img-responsive" src="<?php 
        echo empty($new->featurephoto) || $new->featurephoto == "" ? 'http://placehold.it/300x100&text=News' : base_url('assets/img/thumbnails/' . $new->featurephoto);
        ?>
" alt="<?php 
        echo $new->title;
        ?>
">
                    <p><?php 
        echo limit_to_numwords(strip_tags($new->post_entry), 25);
        ?>
<a href="<?php 
        echo site_url('news');
        ?>
" class="pull-right">more...</a></p>
                </div>
            <?php 
    }
    ?>
        </div>
    <?php 
}
?>
    <div class="separator-line"></div>
    <div class="row">
Example #10
0
<div class="col-md-12">
    <?php 
if ($news) {
    ?>
 
        <?php 
    foreach ($news as $n) {
        ?>
            <h1><?php 
        echo ucfirst($n->title);
        ?>
</h1>
            <p><?php 
        echo ucfirst(limit_to_numwords($n->post_entry, 100));
        ?>
</p>
            <div>
                <span class="badge">Posted <?php 
        echo $n->create_date;
        ?>
</span></div>         
            <hr>
        <?php 
    }
    ?>
    <?php 
} else {
    ?>
        Tidak ada berita
    <?php 
}
Example #11
0
        ?>
                            <div class="about-author wow fadeIn col-lg-4" data-wow-delay="0ms" data-wow-duration="1500ms">
                                <div class="author-desc">
                                    <div class="author-thumb">
                                        <img src="<?php 
        echo base_url() . 'public/uploads/';
        echo empty($project["image"]) ? $client["logo"] : $project["image"];
        ?>
" alt="">
                                    </div>
                                    <div class="author-info"><strong><?php 
        echo strip_tags($project["name"]);
        ?>
</strong></div>
                                        <div class="text"><?php 
        echo limit_to_numwords(strip_tags($project["body"]), 5);
        ?>
</div>
                                </div>
                            </div>
                            <?php 
    }
}
?>
                        </div>

                    </div>
                </section>


Example #12
0
                    <div class="panel-body">
                        <div class="dataTable_wrapper">
                            <table class="table table-striped table-bordered table-hover" id="dataTables">
                                <thead>
                                    <tr>
                                        <th>Tóm tắt nội dung</th>
                                        <th style="width: 12%">Ngày nhận</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php 
foreach ($forms as $form) {
    ?>
                                        <tr>
                                            <td><?php 
    echo limit_to_numwords($form->rqf_body, 20);
    ?>
</td>
                                            <td><?php 
    echo date_format(date_create($form->rqf_date), 'd/m/Y');
    ?>
</td>
                                        </tr>
                                    <?php 
}
?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <!-- /.panel-body -->