Esempio n. 1
0
function fx_install_db()
{
    fx_connect_db();
    $file_name = 'floxim.sql';
    $file = fx_fix_path(dirname(__FILE__) . '/' . $file_name);
    if (file_exists($file)) {
        if (!fx_exec_sql($file)) {
            fx_write_log('The system could be already installed: ' . $file);
            return false;
        }
    }
    fx_update_db();
    fx_write_log('Unpacking database finished.');
    return true;
}
Esempio n. 2
0
function fx_check_docroot()
{
    $c_dir = fx_fix_path(realpath(dirname(__FILE__)));
    $c_root = fx_fix_path($_SERVER['DOCUMENT_ROOT']);
    return $c_dir === $c_root;
}