Upload file
+ +Gallery manager
+ +Upload file
+ + + +Your files
+-
+ ".$f."";
+ }
+ ?>
+
diff --git a/unsafe_gallery/src/.gitignore b/unsafe_gallery/src/.gitignore new file mode 100644 index 0000000..95a48fb --- /dev/null +++ b/unsafe_gallery/src/.gitignore @@ -0,0 +1 @@ +uploads \ No newline at end of file diff --git a/unsafe_gallery/src/.htaccess b/unsafe_gallery/src/.htaccess new file mode 100644 index 0000000..45552cb --- /dev/null +++ b/unsafe_gallery/src/.htaccess @@ -0,0 +1 @@ +Options -Indexes \ No newline at end of file diff --git a/unsafe_gallery/src/index.php b/unsafe_gallery/src/index.php index 1752550..3eb3e71 100644 --- a/unsafe_gallery/src/index.php +++ b/unsafe_gallery/src/index.php @@ -1,43 +1,91 @@ 10000) { + $error = "File is too large!"; + } else if (move_uploaded_file($_FILES["file"]["tmp_name"], UPLOAD_DIR . "/" . $dest_file_name)) { + $success = "The file was successfully uploaded!"; + } else { + $error = "Error while uploading file!"; + } } ?> -
- - -