Welcome Guest, Not a member yet? Register   Sign In
Checking if application is closed/open?
#1

[eluser]EEssam[/eluser]
Hello,

I'm lost a little bit. So here's one of the issues I'm currently facing.

I've an autoloaded model to get the application settings from DB (See this please).

Now one of my settings is called "appactive" and I need to check if the app is active every time the app is requested, so I decided to create another model that I'll autoload and call it Init_model where I have something like:

// Check if the site is closed
if (!$this->settings_model->options['appactive'])
{
$this->load->view($this->settings_model->options['style'] . '/closed', $this->data);
}

It's not working and I'm not very interested in finding why it's not working because it's not good to call a view file from a model anyway.

If I place the previously mentioned code in a controller it works but it's not logical to repeat it in all my controllers!

What are the (good) solutions for this?

Please help.


Messages In This Thread
Checking if application is closed/open? - by El Forum - 06-19-2008, 08:03 PM
Checking if application is closed/open? - by El Forum - 06-21-2008, 09:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB