Example #1
0
 private function showlist()
 {
     $this->template->content = new View('admin_configuration/list');
     //Assign
     $this->template->content->keyword = $this->search['keyword'];
     $model = new Configuration_Model();
     $this->db->orderby('configuration_title', 'asc');
     $mlist = $model->get();
     //Pagination
     $this->pagination = new Pagination(array('base_url' => 'admin_configuration/search/', 'uri_segment' => 'page', 'total_items' => count($mlist), 'items_per_page' => count($mlist), 'style' => 'digg'));
     $this->db->limit($this->pagination->items_per_page, $this->pagination->sql_offset);
     $this->db->orderby('configuration_title', 'asc');
     $mlist = $model->get();
     $this->template->content->mlist = $mlist;
     $this->_get_submit();
 }
Example #2
0
File: list.php Project: vobinh/PHP
        ?>
" id="row_<?php 
        echo $list['banner_id'];
        ?>
"> 
    <td align="center"><?php 
        echo $list['banner_id'];
        ?>
</td>   
   
    <td align="center">    
    <?php 
        if (@$list['banner_type'] == 'image' && file_exists($list['path_file']) && is_file($list['path_file'])) {
            $src = "uploads/banner/" . $list['path_file'];
            $maxw = Configuration_Model::get_value('MAX_WIDTH_BANNER_ADMIN_LIST');
            $maxh = Configuration_Model::get_value('MAX_HEIGHT_BANNER_ADMIN_LIST');
            $arr = MyImage::thumbnail($maxw, $maxh, $src);
            ?>
        <a href="<?php 
            echo url::base();
            ?>
uploads/banner/<?php 
            echo $list['banner_name'];
            ?>
">
        <img src="<?php 
            echo url::base();
            ?>
uploads/banner/<?php 
            echo $list['banner_name'];
            ?>