Example #1
0
} else {
    exit;
}
// Important files we need to load before doing anything else.
require_once 'au_config.php';
// The big $aulis is our friend, he needs to be by our side, also here in the Admin Panel.
global $aulis;
// It's not like that's all, we need our functions to be loaded too
foreach ($aulis['load_functions'] as $filename) {
    require_once $aulis['root_path'] . '/core/functions/' . $filename . '.functions.php';
}
// The database will be set up below this line
au_setup_database();
// Get the settings
$setting = au_get_settings();
// Start sessions
session_start();
// Load the user information into $aulis
au_load_user();
// We might not need the theme at first, but we do need some of its settings to be loaded
au_load_theme_settings();
// Let's load the language files, I mean, we want to communicate with them, right?
au_load_language($setting['language']);
// We need a page title. Let's create one.
$aulis['page_title'] = $setting['site_title'] . ' | ' . ADMIN_PAGE_TITLE;
// Now it's time to finalize our output and call in the theme's base template
au_finalize_output();
// Calling the theme... for the admin template this time.
au_load_theme($setting['theme'], true);
// In the end, there is nothing left but star dust.
die;
Example #2
0
    $current_app = 'frontpage';
} else {
    $current_app = $_GET['app'];
}
// Do we need to load an extra file?
if ($aulis['apps'][$current_app]['load_file'] == true) {
    require_once $aulis['root_path'] . '/core/' . $aulis['apps'][$current_app]['core'];
}
// So where are we now?
$aulis['active'] = $aulis['apps'][$current_app]['section'];
// We need a page title. Let's create one.
$aulis['page_title'] = (!empty($aulis['apps'][$current_app]['title']) ? $aulis['apps'][$current_app]['title'] . ' | ' : '') . $setting['site_title'] . (!empty($setting['site_slogan']) ? ' | ' . $setting['site_slogan'] : '');
// Let's execute the function, if we need to.
if ($aulis['apps'][$current_app]['execute_function'] == true) {
    // Let's check if the function even exists
    if (function_exists($aulis['apps'][$current_app]['function'])) {
        call_user_func($aulis['apps'][$current_app]['function']);
    } else {
        return au_fatal_error(6, "Core '{$current_app}' wanted to excecute the function '{$aulis['apps'][$current_app]['function']}();'.");
    }
}
// Now it's time to finalize our output and call in the theme's base template
au_finalize_output();
// Calling the theme..., let's hope it responds our call.
au_load_theme($setting['theme']);
// Now if we need to cache, we need to cache, obviously
if ($setting['enable_cache'] == 1 && !DEBUG_FORCE_DISABLE_CACHE) {
    require_once au_get_path_from_root('cache/cache_end.php');
}
// In the end, there is nothing left but star dust.
die;