SHARE
TWEET

Untitled

a guest Sep 14th, 2017 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // From
  2. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  3.  
  4.  
  5. class Assignment extends CI_Controller {
  6.  
  7.     function __construct()
  8.     {
  9.         parent::__construct();
  10.     }
  11.    
  12.     //default method for this controller
  13.     function index()
  14.     {
  15.         if ($this->session->userdata('logged_in') != TRUE)
  16.         {
  17.             redirect('welcome/index');
  18.         }      
  19.        
  20.         $data['page_name'] = 'Dashboard';
  21.         $this->load->view('dashboard', $data);
  22.     }
  23. }
  24.  
  25.  
  26.  
  27.  
  28. // To
  29. class APP_Controller_Assign,ent extends APP_Controller_Application {
  30.    
  31.     function index()
  32.     {
  33.             if(!$this->isLoggedIn()) {
  34.                 $this->redirect('welcome/index');
  35.             }
  36.             $this->load('dashboard', array('page_name' => 'Dashboard'));
  37.     }
  38. }
RAW Paste Data
Top