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!"; + } } ?> - - - - Safe gallery + - - - - -
- + + + Safe gallery -
-Note : Une information se cache dans la variable d'environnement FLAG. -
+ + + -

Upload file

+ +
-
-
- - -
-
- -
-
- -
+

Gallery manager

+ +
+ Note : Une information se cache dans la variable d'environnement FLAG. +
+ + +
+ +
+
+ +
+ +

Upload file

+ +
+
+ + +
+
+ +
+
+ +

Your files

+ +
- + + \ No newline at end of file diff --git a/unsafe_gallery/src/style.css b/unsafe_gallery/src/style.css index 4f41422..e89f41d 100644 --- a/unsafe_gallery/src/style.css +++ b/unsafe_gallery/src/style.css @@ -4,7 +4,7 @@ body { } .form-signin { - max-width: 530px; + max-width: 800px; padding: 1rem; }