Put hotel in maintenace through HK?

DarkXIDE

Member
Oct 3, 2011
72
10
Hello!

I am currently working on a new fresh HK/ASE but I have ran into a problem.

I want to do so you can put your hotel in maintenance through the ASE.

My code right now looks like this
PHP:
if (isset($_POST['maintenance_submit'])) {
    $state = mysql_real_escape_string($_POST['state']);
    if ($state == '1') {
        $_CONFIG['hotel']['in_maint'] = False;
    } elseif ($state == '0') {
        $_CONFIG['hotel']['in_maint'] = True;
    }
}

When checking the value later the $_CONFIG['hotel']['in_maint'] stays true for the next page load but when I reload yet another time it resets to the state in config.php. How can I make it change completely?
 

Fap

Member
Jul 25, 2011
114
5
The best solution for this would be is to store the Maintenance setting in the Database and that would mean you access it through a DB Query which would be much easier option for you.
 

Users who are viewing this thread

Top