1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
4 * Called from a controller to show a message page.
6 * @param type $controller controller's object; pass $this from controller
7 * @param type $type message type: 'info', 'error'
8 * @param type $msg message text
10 function show_msg_page($controller, $type, $msg)
13 'title'=> $controller->lang->line("message_title_{$type}")
15 . $controller->config->item('site_name'),
16 //'metas' => array('description'=>'')
18 $controller->load->library('html_head_params', $params);
23 $controller->load->view('html_begin', $controller->html_head_params);
24 $controller->load->view('header', array());
26 $main_params['content'] =
27 $controller->load->view("message/{$type}_view",
28 array('msg'=> $msg), TRUE);
30 $main_params['side'] = $controller->load->view('side_default', NULL, TRUE);
31 $controller->load->view('main', $main_params);
33 $controller->load->view('footer');
34 $controller->load->view('html_end');
38 * Called from a controller to show an error message page.
40 * @param type $controller controller's object; pass $this from controller
41 * @param type $msg message text
43 function show_error_msg_page($controller, $msg)
45 show_msg_page($controller, 'error', $msg);
49 * Called from a controller to show an info message page.
51 * @param type $controller controller's object; pass $this from controller
52 * @param type $msg message text
54 function show_info_msg_page($controller, $msg)
56 show_msg_page($controller, 'info', $msg);
59 /* End of file message_helper.php */
60 /* Location: ./application/helpers/message_helper.php */