12-14-2009, 04:15 PM
[eluser]WebbHelp[/eluser]
This
Code:
function imagegallery()
{
$id = $this->db->query("SELECT id FROM pages WHERE menu = '". $this->uri->segment(3) ."'");
$id = $id->row();
$pageinfo = $this->db->query("SELECT * FROM imagegallery WHERE page = ". intval($id->id));
$pageinfo = $pageinfo->row();
$images = $this->db->query("SELECT * FROM images WHERE page = ". intval($id->id));
$this->load->library('pagination');
$config['base_url'] = site_url('page/imagegallery/'. $this->uri->segment(3));
echo $config['base_url'];
$config['total_rows'] = $images->num_rows();
$config['per_page'] = '2';
$config['full_tag_open'] = '<p>';
$config['full_tag_close'] = '</p>';
$config['uri_segment'] = '4';
echo '<br />'. $images->num_rows() .'<br />';
$this->pagination->initialize($config);
$header['generalinfo'] = $this->general; //Data from general table
$header['title'] = $pageinfo->title; //Page title
$header['menuquery'] = $this->menu; //The menu
$header['standardpage'] = $this->standard_menu; //The standardpage
$content['head'] = $pageinfo->head;
$content['images'] = $this->db->query("SELECT * FROM images WHERE page = ". intval($id->id) ." ORDER BY id DESC LIMIT ". $config['per_page'] ." , ". $this->uri->segment(4));
$footer['copyright'] = $this->general->copyright; //General setting: copyright
$this->load->view('header', $header);
$this->load->view('imagegallery', $content);
$this->load->view('footer', $footer);
}
This
