Exemple #1
0
    FB::warn("FirePHP logging enabled.");
} else {
    ini_set("display_errors", 0);
    error_reporting(0);
    FB::setEnabled(FALSE);
}
// URL Parsing - Read the URL and break it apart for processing
$url_array = Utilities::readUrl();
if (!is_array($url_array) && file_exists($url_array)) {
    require_once $url_array;
}
// Creates a database object
$dbo = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
// Creates the database tables if set to true
if (CREATE_DB === TRUE) {
    AdminUtilities::buildDB($menuPages);
}
// Load the page attributes from the menu array
$menuPage = Utilities::getPageAttributes($menuPages, $url_array[0]);
// Check if the admin page is being accessed
if ($url_array[0] == 'admin') {
    $menuPage = array('display' => 'Administrative Controls', 'type' => 'admin');
}
// Check if the search page is being accessed
if ($url_array[0] == 'search') {
    $menuPage = array('display' => 'Search', 'type' => 'search');
}
// If the supplied URL doesn't match any menu items, direct to the 404 page
if ($menuPage === FALSE) {
    $menuPage = array('display' => 'Invalid URL', 'type' => 'missing');
}