Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MY_Controller:
- <?php
- class MY_Controller extends CI_Controller {
- var $data;
- function __construct()
- {
- parent::__construct();
- $this->load->model('navigation_model');
- $this->data['navigation_bar'] = $this->navigation_model->getMainNav();
- if ($this->session->userdata('is_logged_in'))
- {
- $this->data['user_panel'] = 'user_panel_view';
- } else {
- $this->data['user_panel'] = 'login_form';
- }
- }
- }
- ?>
- Welcome Controller:
- <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
- class Welcome extends MY_Controller {
- function __construct()
- {
- parent::__construct();
- }
- function index()
- {
- $this->data['title'] = "Maharishi Unniversity of Management: Chess Club";
- $this->data['main_content'] = 'welcome_view';
- $this->load->view('includes/template_view', $this->data);
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement