20
20
* This shows the codeviewer page
22
public function show($cid, $category, $subcategory, $example){
23
$headTagData['cssFiles'] = array('headTag', 'header', 'codeviewer');
24
$headTagData['jsFiles'] = array('ace/ace', 'header');
26
$this->load->model('codeviewer/Codeviewer_model');
28
$editorHTML = $this->Codeviewer_model->getCode($cid, $category, $subcategory, $example);
30
$this->load->model('user');
33
'userType' => $this->user->getUserType(),
34
'userName' => $this->user->getUserName()
37
$this->load->helper('form');
39
// $doc = $this->Codeviewer_model->getDoc($cid, $category, $subcategory, $example);
41
// This loads the view. It's stored in application/views/codeviewer/codeviewer.php
42
// Do note that application/views should not be in the first argument of view()
43
// The second argument is data to be shown in the view. "editors" => "test" would
44
// generate an $editors variable in the view containing "test"
45
$this->load->view('headTag', array('headTagData' => $headTagData));
46
$this->load->view('header', $userInfo);
47
$this->load->view('codeviewer/codeviewer', array("editors" => $editorHTML));
22
public function show($cid = null, $category = null, $subcategory = null, $example = null){
23
if(!is_null($cid) && !is_null($category) && !is_null($subcategory) && !is_null($example)){
24
$headTagData['cssFiles'] = array('headTag', 'header', 'codeviewer');
25
$headTagData['jsFiles'] = array('ace/ace', 'header');
26
$this->load->model('user');
28
'userType' => $this->user->getUserType(),
29
'userName' => $this->user->getUserName()
31
$this->load->view('headTag', array('headTagData' => $headTagData));
32
$this->load->view('header', $userInfo);
33
$this->load->model('codeviewer/Codeviewer_model');
34
$editorHTML = $this->Codeviewer_model->getCode($cid, $category, $subcategory, $example);
35
$this->load->helper('form');
36
// $doc = $this->Codeviewer_model->getDoc($cid, $category, $subcategory, $example);
37
// This loads the view. It's stored in application/views/codeviewer/codeviewer.php
38
// Do note that application/views should not be in the first argument of view()
39
// The second argument is data to be shown in the view. "editors" => "test" would
40
// generate an $editors variable in the view containing "test"
41
$this->load->view('codeviewer/codeviewer', array("editors" => $editorHTML));
43
/*Redirects to the startpage if no arguments are supplied.*/