Exemple #1
0
    // 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")));
    } else {
        define("URL", $dbh->config("url"));
    }
    define("NAME", $dbh->config("name"));
    // Sets the name of the website
}
// Converts the $_POST global array into $postvar - DB Friendly.
$postvar = array();
if (isset($_POST)) {
    foreach ($_POST as $key => $value) {
        $postvar[$key] = $dbh->strip($value);
    }
}
global $postvar;
// Converts the $_GET global array into $getvar - DB Friendly.
$getvar = array();
if (isset($_GET)) {
    foreach ($_GET as $key => $value) {
        $getvar[$key] = $dbh->strip($value);
    }
}
global $getvar;
// Cheap. I know.
if (!is_dir("../includes") && !is_dir("../themes") && !is_dir("../" . ADMINDIR)) {
    $check = explode("/", dirname($_SERVER["SCRIPT_NAME"]));
    if ($check[count($check) - 1] == "install") {