2011-11-06 02:34:41 -05:00
|
|
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
|
|
|
|
class Gallery extends CI_Controller {
|
2011-11-14 09:30:09 -05:00
|
|
|
public function index($start = 1) {
|
2011-11-06 02:34:41 -05:00
|
|
|
$this->load->model('fileupload');
|
|
|
|
$this->load->library('pagination');
|
|
|
|
|
2011-11-14 09:30:09 -05:00
|
|
|
$page_count = 20;
|
2011-11-06 02:34:41 -05:00
|
|
|
|
|
|
|
$config = array(
|
|
|
|
'base_url' => base_url('/gallery/index/'),
|
|
|
|
'total_rows' => $this->fileupload->count_uploads(),
|
2011-11-14 09:31:34 -05:00
|
|
|
'per_page' => $page_count,
|
|
|
|
'num_links' => 5,
|
2011-11-06 02:34:41 -05:00
|
|
|
);
|
|
|
|
|
|
|
|
$this->pagination->initialize($config);
|
|
|
|
|
|
|
|
$this->data['pagination'] = $this->pagination->create_links();
|
|
|
|
$this->data['uploads'] = $this->fileupload->get_uploads($start, $page_count);
|
|
|
|
|
|
|
|
$this->template->load('template', 'gallery', $this->data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
?>
|