<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class MY_Controller extends CI_Controller { 

   var $template  = array();
   var $data      = array();

   public function layout() { 
     $this->template['header']   = $this->load->view('layout/header', $this->data, true);
     $this->template['middle'] = $this->load->view($this->middle, $this->data, true);
     $this->template['footer'] = $this->load->view('layout/footer', $this->data, true);
     $this->load->view('layout/index', $this->template);
   }
	 
   public function adminlayout() {
     $this->template['header']   = $this->load->view('admin/nheader', $this->data, true);
     $this->template['middle'] = $this->load->view($this->middle, $this->data, true);
     $this->load->view('admin/index', $this->template);
   }

}

?>