X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=blobdiff_plain;f=application%2Fcontrollers%2Fcatalog.php;h=7dee3e98c457db4346ee3981dcd1269750d006f1;hb=19dcbb3149e52c88b7a38f05ef85b80db49fcb72;hp=3285c67a244ea3da3eb66186d8c651446d9e988c;hpb=e47a97763d745e654ab60c17a85d794b46734ddf;p=living-lab-site.git diff --git a/application/controllers/catalog.php b/application/controllers/catalog.php index 3285c67..7dee3e9 100644 --- a/application/controllers/catalog.php +++ b/application/controllers/catalog.php @@ -17,6 +17,9 @@ class Catalog extends CI_Controller { public function index() { + // ** + // ** LOADING MODEL + // ** // Retrieve videos summary. $this->load->model('videos_model'); foreach ($this->config->item('categories') as $id => $name) @@ -39,13 +42,20 @@ class Catalog extends CI_Controller { } $params = array( 'title' => $this->config->item('site_name'), - 'css' => array('catalog.css'), + 'css' => array( + 'catalog.css', + 'jquery-ui.css' + ), //'js' => array(), //'metas' => array('description'=>'','keywords'=>'') ); $this->load->library('html_head_params', $params); + + // ** + // ** LOADING VIEWS + // ** $this->load->view('html_begin', $this->html_head_params); - $this->load->view('header'); + $this->load->view('header', array('selected_menu' => 'Home')); $this->load->view('catalog/index_view', $data); @@ -57,14 +67,16 @@ class Catalog extends CI_Controller { { $this->load->helper('url'); - $str = '[{"def":"1080p"},{"def":"600p"}]'; - $a = json_decode($str); + $str = '800x600'; - echo count($a); + echo substr($str, strpos($str, 'x') + 1); } public function category($category_id, $offset = 0) { + // ** + // ** LOADING MODEL + // ** // Retrieve videos summary. $this->load->model('videos_model'); $vs_data['videos'] = $this->videos_model->get_videos_summary( @@ -98,6 +110,10 @@ class Catalog extends CI_Controller { //'metas' => array('description'=>'','keywords'=>'') ); $this->load->library('html_head_params', $params); + + // ** + // ** LOADING VIEWS + // ** $this->load->view('html_begin', $this->html_head_params); $this->load->view('header');