I am just working on my new maintenance mode function. I would like to be able to see all other pages while everyone else will be seeing a maintenance page. Is there a way I can add my IP so that only my IP can have access to all files?
I would like to be able to somehow put my IP in this hook file.
I have set up the hooks and such.
In my app/hooks file:
public function __construct() {
log_message('debug','Accessing site_offline hook!');
}
public function is_offline() {
if(file_exists(APPPATH.'config/config.php')) {
include(APPPATH.'config/config.php');
if(isset($config['is_offline']) && $config['is_offline']===TRUE) {
$this->show_site_offline();
exit;
}
}
}
private function show_site_offline() {
$this->load->view('common/header');
$this->load->view('common/maintenance');
$this->load->view('common/footer');
}
}