Beispiel #1
0
include_once "/var/www/php/sql_connect.php";
if (isset($_COOKIE["token"])) {
    $token = $_COOKIE["token"];
}
include "/var/www/web_classes/DHunter.php";
$hunter = new DHunter($token);
$quarry = $hunter->Quarry();
if (isset($_FILES["hpic"])) {
    $tmpdir = tempnam("/var/www/sites/oitgaming/uploads", "img_");
    // unlink($tmpdir);
    $tmpdir = $tmpdir;
    $path = explode("oitgaming", $tmpdir);
    if ($_FILES["hpic"]["type"] === "image/jpeg" and $_FILES["hpic"]["size"] < 10 * 1024 * 1024) {
        if (move_uploaded_file($_FILES["hpic"]["tmp_name"], $tmpdir)) {
            fixOrientation($tmpdir);
            $img_text = $hunter->ChangeAvatar($path[1]);
        }
    } else {
        $img_text = "That's not a jpeg or it is over 6MB";
    }
} else {
    $img_text = "";
}
?>

    <style>
        

        .jumbotron-vert{
            background-color: #FCFCFC;