26 lines
1014 B
PHP
26 lines
1014 B
PHP
<?php
|
|
class Gallery extends Default_Master_Controller {
|
|
public function __construct() {
|
|
parent::__construct();
|
|
$this->load->model('gallery_model');
|
|
$this->load->helper('html');
|
|
$this->load->helper('url');
|
|
}
|
|
public function index() {
|
|
$data['paintings'] = $this->gallery_model->get_paintings_active_all();
|
|
//$data['content'] = $this->load->view('gallery/index',$data,true);
|
|
//$data['title'] = 'Paintings';
|
|
//$data['current_page'] = 'gallery';
|
|
$this->master->write('current_page', 'gallery');
|
|
$this->master->write_view('content', 'gallery/index', $data);
|
|
$this->master->render();
|
|
}
|
|
public function view($id = 1) {
|
|
$data['p'] = $this->gallery_model->get_painting_by_id($id);
|
|
$this->master->write_view('content', 'gallery/view', $data);
|
|
$this->master->write('title', 'Painting : ' . $id);
|
|
$this->master->write('current_page', 'gallery');
|
|
$this->master->render();
|
|
}
|
|
}
|