[eluser]Cro_Crx[/eluser]
Make sure that your MY_Controller is extending CI_Controller and your other classes extend MY_Controller. You'll get that error if one of your regular controllers tries to extend CI_Controller instead of its alias 'Controller'.
If you want to achieve this functionality, you can do it with a single MY_Controller class. Simply add a function to use if it's an admin page. Something like this for the Base Controller:
Code:
Class MY_Controller extends CI_Controller
{
function MY_Controller()
{
parent::Controller();
/* Perform Actions here that All Controllers will need. */
}
function require_admin()
{
/* Perform actions here required for using admin pages. */
}
}
Then on your Admin Controller do something like this:
Code:
Class Admin extends MY_Controller
{
function Admin()
{
parent::MY_Controller();
$this->require_admin(); /* This makes sure our user has admin privileges. All functions within this controller will now run this.*/
}
}