Brain Core


Junior Member
3 Threads:
Dec 21Joined:
0 Reputation:
Hello All!

I'm trying to re-design Brain, with some Minor Tweaks!
What I'm trying to do is to eliminate the brain-config.php to configure it via Housekeeping.

I would like to share some screenshots of my work.

Please log in or register to see this link.

So I would like someone to review some of my codes that I have attempted to edit.

for the class.html.php I have attempted to this.

PHP Code:
private static function siteSettings()
            global $dbh;
            $siteSettings $dbh->prepare("SELECT site_closed FROM cms_system WHERE site_closed = 1");
            if ($siteSettings->RowCount() === 1)
                $queryMaintenance $dbh->prepare("SELECT site_closed FROM cms_system WHERE site_closed = 1");
                while ($rowMaintenance $queryMaintenance->fetch())
                        return true;
                        return false;

What this code is suppose to do is to fetch the cms_system to see "site_closed" is enabled using enum.

for the class.admin.php

PHP Code:
public static function checkMaintenance()
            if (isset(
$_SESSION['site_open'] = $_POST['site_open'];
$_SESSION['site_closed'] = $_POST['site_closed'];
                if (!empty(
                    if (!empty(
$checkMaintenance $dbh->prepare("
                        INSERT INTO cms_settings(site_closed)
$_SESSION['site_closed'] = '';
Admin::succeed("Site is in Maintenance");

It's suppose to insert into the database but I know I need to change the query to UPDATE cms_system using enum. 

If someone can help me out with this would be greatly appreciated.
Users browsing this thread:
1 Guest(s)