X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=blobdiff_plain;f=application%2Fcontrollers%2Fcatalog.php;h=e6d2c0d826c431c778e5bd75370ff70b5c09f56c;hb=0db52dbd375c6569d868015adf8f2bca1316ba6f;hp=8dacaae608d2a4041064c2a90d8b49cb429774aa;hpb=0b134deb6f1108155973436e3de7296a76a2d660;p=living-lab-site.git diff --git a/application/controllers/catalog.php b/application/controllers/catalog.php index 8dacaae..e6d2c0d 100644 --- a/application/controllers/catalog.php +++ b/application/controllers/catalog.php @@ -10,17 +10,60 @@ class Catalog extends CI_Controller { public function index() { - $this->load->view('html_begin'); + // Retrieve videos summary. + $this->load->model('videos_model'); + $data['videos'] = $this->videos_model->get_videos_summary(); + + $params = array( 'title' => $this->config->item('site_name'), + //'stylesheets' => array(), + //'javascripts' => array(), + //'metas' => array('description'=>'','keywords'=>'') + ); + $this->load->library('html_head_params', $params); + $this->load->view('html_begin', $this->html_head_params); $this->load->view('header'); - $this->load->model('videos_model'); - $data['query'] = $this->videos_model->getVideosSummary(); $this->load->view('catalog/index_view', $data); + $this->load->view('footer'); + $this->load->view('html_end'); + } + + public function test() + { + $this->load->helper('url'); + + echo 'link'; + } + + public function category($category_id) + { + // Retrieve videos summary. + $this->load->model('videos_model'); + $data['videos'] = $this->videos_model->get_videos_summary($category_id); + $categories = $this->config->item('categories'); + $data['category'] = $categories[$category_id]; + $data['category_id'] = $category_id; + + $params = array( 'title' => $this->config->item('site_name'), + 'stylesheets' => array('catalog.css'), + //'javascripts' => array(), + //'metas' => array('description'=>'','keywords'=>'') + ); + $this->load->library('html_head_params', $params); + $this->load->view('html_begin', $this->html_head_params); + $this->load->view('header'); + + $this->load->view('catalog/category_view', $data); $this->load->view('footer'); $this->load->view('html_end'); } + + public function search($query_str) + { + echo $query_str; + } } /* End of file catalog.php */