Exemple #1
0
    $Settings[$Variable[0]] = $Variable[1];
}
unset($Temp);
DB_MSG("Loading Modules...");
//Create array for modules
$Modules = explode(";", $Page_info['Modules']);
//Load modules
foreach ($Modules as $Module) {
    //Split modulename and variables
    $Module = explode("?", $Module);
    //Assign variables to its own array
    $Module_Settings = explode(":", $Module[1]);
    //Assign modulename to it's own variable
    $Module = $Module[0];
    //Load module
    $Path = getcwd() . "/Modules/" . $Module . "/Load.php";
    if (file_exists($Path)) {
        foreach ($Module_Settings as $Temp) {
            $Variable = explode("=", $Temp);
            $GLOBALS[$Module][$Variable[0]] = $Variable[1];
        }
        include $Path;
    } else {
        echo '<script>alert("Module \\"' . $Module . '\\" doesn\'t exist")</script>';
    }
}
//Include main file
DB_MSG("Loading Page...");
include getcwd() . "/Content/" . $Page_info['Path'];
DB_MSG("<b>Finished executing without crashing</b>");
Exemple #2
0
    $Temp = MySQL_get_array("Users", "Username", "Username='******'");
    if ($Temp[0] != $_COOKIE["Username"]) {
        $GLOBALS['AuthWhy'] = "Username incorrect!";
        $GLOBALS['AuthStatus'] = 0;
    }
    unset($Temp);
    //Check Hash
    $Temp = MySQL_get_array("Users", "Hash", "Username='******'");
    if ($Temp[0] != $_COOKIE["Hash"]) {
        $GLOBALS['AuthWhy'] = "Hash incorrect!";
        $GLOBALS['AuthStatus'] = 0;
    }
    unset($Temp);
    //Check Session
    $Temp = MySQL_get_array("Users", "Session", "Username='******'");
    if ($Temp[0] != $_COOKIE["Session"]) {
        $GLOBALS['AuthWhy'] = "Session incorrect!";
        $GLOBALS['AuthStatus'] = 0;
    }
    unset($Temp);
    //Check IP
    $Temp = MySQL_get_array("Users", "IP", "Username='******'");
    if ($Temp[0] != $_SERVER['REMOTE_ADDR']) {
        $GLOBALS['AuthWhy'] = "IP incorrect!";
        $GLOBALS['AuthStatus'] = 0;
    }
    unset($Temp);
}
DB_MSG($GLOBALS['AuthWhy']);
DB_MSG($_SERVER['REMOTE_ADDR']);