示例#1
0
                    require $folder . "/" . $file;
                    new $base2[1]();
                    //Even though these aren't instances being used right now, they do store instance data in class instance.
                }
            }
        }
    }
}
closedir($handle);
//Define the Admin directory
if (!defined("ADMINDIR")) {
    $admin_dir = find_admin_dir("../");
    define("ADMINDIR", $admin_dir);
}
if (INSTALL == 1) {
    $session_timeout = $dbh->config("session_timeout") * 60;
    //Make minutes into seconds.
    if ($session_timeout) {
        if (time() - $session_timeout > $_SESSION['time'] && $_SESSION['time']) {
            session_destroy();
            main::redirect("./");
        }
        //Keep it alive when there's activity.
        $_SESSION['time'] = time();
    }
    define("THEME", $dbh->config("theme"));
    // Set the default theme
    // Sets the URL THT is located at
    if ($_SERVER["HTTPS"]) {
        // HTTPS support
        define("URL", str_replace("http://", "https://", $dbh->config("url")));