Use two type of controller one for normal user and one for admin in normal user controller constructor check if the user is logged in than check if the user is admin or not and than if not than load a maintanance view
For eaxample
class MY_Controller extends CI_Controller {
public $maintance_enabled = false;
function __construct()
{
parent::__construct();
/*
* check user logged in or admin if not and maintanace mode is enabled than load maintance view and exit
*/
$this->maintance_enabled = TRUE;
}
}
class Welcome extends MY_Controller {
function index()
{
if($this->maintance_enabled === TRUE)
return;
}
}