<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Template
{
    protected $_ci;

    function __construct()
    {
        $this->_ci = &get_instance();
    }

    function render_page($content, $data = NULL)
    {
        $this->_ci->load->view('templates/main_header', $data);
        $this->_ci->load->view('templates/main_navbar', $data);
        $this->_ci->load->view('templates/main_sidebar', $data);
        $this->_ci->load->view($content, $data);
        $this->_ci->load->view('templates/main_footer', $data);
    }
}
