$debug = ""; if (isset($_GET['page'])) { $page = makesafe($_GET['page']); } else { $page = "intro"; } // overrule page if nft is set if (isset($_GET['nft'])) { $nft = makesafe($_GET['nft']); $page= "unlock"; } else { $nft = 2; } $message = ""; $active = []; $active[1] = false; $active[2] = false; $active[3] = false; $active[4] = false; $active[5] = false; $uploadOk = 0; $action = ""; $string = file_get_contents("links.json"); $json = json_decode($string,true); if(isset($_POST["submit"]) ) { $debug="submit"; $action = "upload"; $element = makesafe($_POST['element']); $link = makesafe($_POST['link']); $debug .= $link; $collectible = makesafe($_POST['collectible']); if (true) { // previously: used $active[] here $code = makesafe($_POST['code']); $name = $element."-".$collectible."-".$code."-"; $target_dir = "uploads/"; $target_file = $target_dir . $name.basename($_FILES["fileToUpload"]["name"]); $uploadOk = 1; $imageFileType = strtolower(pathinfo($target_file,PATHINFO_EXTENSION)); // Check if image file is a actual image or fake image if(isset($_POST["submit"])) { $check = getimagesize($_FILES["fileToUpload"]["tmp_name"]); if($check !== false) { $message = "File is an image - " . $check["mime"] . "."; $uploadOk = 1; } else { $message = "File is not an image."; $uploadOk = 0; } } // Check if file already exists if (file_exists($target_file)) { //$message = "Sorry, file already exists."; //$uploadOk = 0; } // Check file size if ($_FILES["fileToUpload"]["size"] > 5000000) { $message = "Sorry, your file is too large."; $uploadOk = 0; } // Allow certain file formats if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg") { $message = "Only JPG, JPEG and PNG files are allowed."; $uploadOk = 0; } // Check if $uploadOk is set to 0 by an error if ($uploadOk == 0) { $message = "Sorry, your file was not uploaded."; // if everything is ok, try to upload file } else { if ($code."" != "") { if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) { $message = "The file ". htmlspecialchars( basename( $_FILES["fileToUpload"]["name"])). " has been uploaded."; $json[$element]=$link." /// ".$code; $data = json_encode($json); $myfile = fopen("links.json", "w") or die("Try again later"); fwrite($myfile, $data); fclose($myfile); $to_email_address = "sveenhof@gmail.com"; $subject = "Element 0".$element; $message = "Upload from ".$_SERVER['REMOTE_ADDR']." is:".$_FILES["fileToUpload"]["name"]; mail($to_email_address,$subject,$message); } } else { //$message = "Sorry, there was an error uploading your file."; } } } else { } } function makesafe($hack) { $hack = htmlspecialchars($hack); $hack = strip_tags($hack); $hack = str_replace("select", "", $hack); $hack = str_replace("SELECT", "", $hack); $hack = str_replace("update", "", $hack); $hack = str_replace("UPDATE", "", $hack); $hack = str_replace("delete", "", $hack); $hack = str_replace("DELETE", "", $hack); $hack = str_replace("drop", "", $hack); $hack = str_replace("DROP", "", $hack); $hack = str_replace(";", "", $hack); $hack = str_replace("--", "", $hack); $hack = str_replace("\0", "", $hack); //Finish filtering $hack of html tags and dangerous funcs //Begin filtering $hack of non alphanumeric characters // $hack = preg_replace("/[^0-9a-z -#]/i",'', $hack); $hack = addslashes($hack); return $hack; } ?>
Instead of owning a static jpeg or (animated) gif that will end up on your harddisk or in your private cloud,
why not consider buying an #augmentedreality NFT you can actually use and
wear? Thereby showcasing your purchase and promoting it, if you consider a resale.
Codes will remain valid for 5 minutes each. Draw pattern above to unlock the AR effect