bzr branch
http://gegoxaren.bato24.eu/bzr/lenasys/trunk
52.1.1
by b11johgu
Added controllers for examplepage, templatelayout. |
1 |
<?php
|
2 |
/*
|
|
3 |
Copyright (C) Högskolan i Skövde <his.se> 2013.
|
|
4 |
Copyright (C) Oscar Jonsson <c11oscjo@student.his.se> 2013.
|
|
5 |
Copyright (C) Simon Bergöö <a11simbe@student.his.se> 2013.
|
|
6 |
This file is part of LenaSYS
|
|
7 |
||
8 |
This program is free software: you can redistribute it and/or modify
|
|
9 |
it under the terms of the GNU Lesser General Public License as published by
|
|
10 |
the Free Software Foundation, either version 3 of the License.
|
|
11 |
||
12 |
This program is distributed in the hope that it will be useful,
|
|
13 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15 |
GNU Lesser General Public License for more details.
|
|
16 |
||
17 |
You should have received a copy of the GNU Lesser General Public License
|
|
18 |
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
19 |
*/
|
|
20 |
||
21 |
class layout extends CI_Controller { |
|
22 |
||
23 |
public function index() { |
|
64.1.1
by b11johgu
ExamplesController: |
24 |
$headTagData = array( |
25 |
'cssFiles' => array('header', 'layout_view'), |
|
26 |
'jsFiles' => array('header', 'layout_view', 'userControls') |
|
27 |
);
|
|
28 |
$this->load->view('headTag', array('headTagData' => $headTagData)); |
|
29 |
||
52.1.1
by b11johgu
Added controllers for examplepage, templatelayout. |
30 |
$this->load->helper('form'); |
31 |
$this->load->model('user'); |
|
32 |
$userInfo = array( |
|
33 |
'userType' => $this->user->getUserType(), |
|
34 |
'userName' => $this->user->getUserName() |
|
35 |
);
|
|
36 |
||
37 |
$this->load->view('header', $userInfo); |
|
38 |
$this->load->view('layout_view'); |
|
39 |
||
40 |
}
|
|
41 |
public function test($arg1){ |
|
42 |
echo "<h1> Layout ".$arg1."</h1>". |
|
43 |
"<p>You have pressed layout ".$arg1.". (This is only a test-function and will be removed.)</p>"; |
|
44 |
}
|
|
45 |
||
46 |
}
|