Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //////////////////////////////////
- ////////////Coded by. LSS////////
- //////////////& Error///////////
- /////UnderGround Hackers Team//
- //////////////////////////////
- if(isset($_POST["submit"])) {
- #
- # Start uploading the picture.
- #
- //File informations
- $name = $_FILES["file"]["name"];
- $time = time();
- $filetype = $_FILES["file"]["type"];
- $filesize = $_FILES["file"]["size"];
- $error = 0;
- //Begin validating the upload
- if(empty($_FILES["file"])){
- error("You Forgot To Fill the required Feild Please Fix The Error");
- $error++;
- }
- if(!in_array($filetype , $allowed)){
- error("Unexpected File Format Only Images Supported");
- $error++;
- }
- if($filesize > $maxsize){
- error("File is to large. maximum is " . convertBytes($maxsize));
- $error++;
- }
- if($error==0) {
- //Image file name
- $filename = $time."_".$name; //.$_FILES["file"];
- $file = $filename;
- //Upload the picture.
- // $upload = move_uploaded_file($_FILES["file"]["tmp_name"] ,"$directory/$file");
- echo "<br /><span class='succes'>SUCCESS: </span>Image successfully uploaded";
- echo "<br />Copy this link to share image:";
- echo "<form>";
- echo "<input type='text' name='link' id='link' class='linkcontainer' value='http://www.justrehhoff.org/projekter/mosaik/uploads/$filename'>";
- echo "</form>";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement