cis notified web server of a job completion; upload form interface and validation...
[living-lab-site.git] / application / controllers / message.php
1 <?php
2
3 /**
4  * Class Message displays messages (info, error).
5  * 
6  * Messages are captured from 'msg' flash session variable.
7  *
8  * @category    Controller
9  * @author              Călin-Andrei Burloiu
10  */
11 class Message extends CI_Controller {
12         
13         private $msg;
14         
15         public function __construct()
16         {
17                 parent::__construct();
18                 
19                 $this->msg = $this->session->flashdata('msg');
20         }
21         
22         public function _remap($method, $par = array())
23         {       
24                 if (! $this->msg)
25                         header('Location: '. site_url());
26
27                 $params = array(
28                         'title'=> $this->lang->line("message_title_{$method}")
29                                 .' &ndash; '
30                                 . $this->config->item('site_name'),
31                         //'metas' => array('description'=>'')
32                 );
33                 $this->load->library('html_head_params', $params);
34                 
35                 // **
36                 // ** LOADING VIEWS
37                 // **
38                 $this->load->view('html_begin', $this->html_head_params);
39                 $this->load->view('header', array());
40                 
41                 $main_params['content'] =
42                         $this->load->view("message/{$method}_view",
43                                 array('msg'=> $this->msg), TRUE);
44                 
45                 $main_params['side'] = $this->load->view('side_default', NULL, TRUE);
46                 $this->load->view('main', $main_params);
47                 
48                 $this->load->view('footer');
49                 $this->load->view('html_end');
50         }
51 }
52
53 /* End of file message.php */
54 /* Location: ./application/controllers/message.php */