+ diff --git a/themes/Obsidian/upload/get.php b/themes/Obsidian/upload/get.php new file mode 100644 index 00000000..db01273b --- /dev/null +++ b/themes/Obsidian/upload/get.php @@ -0,0 +1,19 @@ + \ No newline at end of file diff --git a/themes/Obsidian/upload/remove.php b/themes/Obsidian/upload/remove.php new file mode 100644 index 00000000..cc6723ae --- /dev/null +++ b/themes/Obsidian/upload/remove.php @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/themes/Obsidian/upload/upload.php b/themes/Obsidian/upload/upload.php new file mode 100644 index 00000000..28c4917f --- /dev/null +++ b/themes/Obsidian/upload/upload.php @@ -0,0 +1,45 @@ + ($max_image_size*8192)) { + echo ''; + } else { + //echo "test"; + $tmp = $_FILES['image']['tmp_name']; + + // get uploaded file's extension + $ext = strtolower(pathinfo($_FILES['image']['name'], PATHINFO_EXTENSION)); + + // can upload same image using rand function + $final_image = $_SESSION['user_id'].".".$ext; + + // check's valid format + if(in_array($ext, $valid_extensions)) + { + $path = $path.strtolower($final_image); + + if(move_uploaded_file($tmp,$path)) + { + echo ""; + } + } + else + { + echo ''; + } + } +} + +?>