simple interface ready: index page which lists all video assets and watch page to...
[living-lab-site.git] / application / controllers / catalog.php
1 <?php
2
3 /**
4  * Class Catalog controlls video hierarchy and searching
5  *
6  * @category    Controller
7  * @author              Călin-Andrei Burloiu
8  */
9 class Catalog extends CI_Controller {
10         
11         public function index()
12         {
13                 // Retrieve videos summary.
14                 $this->load->model('videos_model');
15                 $data['videos'] = $this->videos_model->get_videos_summary();
16                 
17                 $params = array(        'title' => $this->config->item('site_name'),
18                                                         //'stylesheets' => array(),
19                                                         //'javascripts' => array(),
20                                                         //'metas' => array('description'=>'','keywords'=>'')
21                                                         );
22                 $this->load->library('html_head_params', $params);
23                 $this->load->view('html_begin', $this->html_head_params);
24                 $this->load->view('header');
25                 
26                 $this->load->view('catalog/index_view', $data);
27                 
28                 $this->load->view('footer');
29                 $this->load->view('html_end');
30         }
31         
32         public function test()
33         {
34                 $this->load->helper('url');
35                 
36                 $format = 'Calin Andrei ';
37                 $pos = strpos($format, ' ');
38                 if($pos !== FALSE)
39                         $format = substr($format, 0, $pos);     
40                 echo $format;
41         }
42 }
43
44 /* End of file catalog.php */
45 /* Location: ./application/controllers/catalog.php */