';
-$name = $data['name'];
-$url = $data['url'];
-$desc = $data['desc'];
+$gallery = [];
+if (file_exists("uppies/$id/gallery")) {
+ foreach(scandir("uppies/$id/gallery") as $g) {
+ if (in_array($g, ['.', '..', '.thumbs', '.DS_Store']))
+ continue;
+ $gallery[] = $g;
+ }
+}
if ($_SERVER["REQUEST_METHOD"] === 'POST' && isset($_GET['upload'])) {
- http_response_code(202);
+ $upload = htmlspecialchars($_GET['upload']);
+ http_response_code(202); # 202 is abused for errors, because uikit requires 2xx responses
- $targetDir = "uppies/";
+ $targetDir = "uppies/${id}/${upload}/";
$file = $_FILES["files"];
- $targetFile = $targetDir . basename($file["name"][0]);
- $imageFileType = strtolower(pathinfo($targetFile, PATHINFO_EXTENSION));
+ $fileName = basename($file["name"][0]);
// Create the uploads directory if it doesn't exist
if (!is_dir($targetDir)) {
mkdir($targetDir, 0775, true);
}
- // Check if the file is actually an image
- $check = getimagesize($file["tmp_name"][0]);
- if ($check === false) {
+ // check if the file is actually an image
+ if (getimagesize($file["tmp_name"][0]) === false) {
exit("❌ Error: File is not a valid image.");
}
- // Allow only specific image file formats
- $allowedTypes = ["jpg", "jpeg", "png", "gif"];
- if (!in_array($imageFileType, $allowedTypes)) {
+ // allow only specific image extensions
+ if (!in_array(strtolower(pathinfo($fileName, PATHINFO_EXTENSION)), ["psd", "tiff", "jpg", "jpeg", "png", "gif"])) {
exit("❌ Error: Only JPG, JPEG, PNG and GIF files allowed.");
}
- // Limit file size (e.g., 5MB)
- if ($file["size"][0] > 100 * 1024 * 1024) {
- exit("❌ Error: File too large (max. 100 MB)");
+ // limit file size
+ if ($file["size"][0] > 200 * 1024 * 1024) {
+ exit("❌ Error: File too large (max. 200 MB)");
}
- // generate destination file name
- $finalPath = $targetDir . $id . '.' . $imageFileType;
-
// Move uploaded file to the target directory
- if (move_uploaded_file($file["tmp_name"][0], $finalPath)) {
+ if (move_uploaded_file($file["tmp_name"][0], $targetDir . $fileName)) {
+ $data['img'] = $targetDir . $fileName;
try {
- Storage::set_img($id, $id . '.' . $imageFileType);
+ Storage::set($id, $data);
}
catch(Exception $ex) {
exit("❌ Database error.");
}
http_response_code(200);
- exit($finalPath);
+ exit(($upload === 'avatar'? $targetDir : '') . $fileName);
+ }
+ else {
+ exit("❌ Write Error.");
}
- exit("❌ General error saving the file.");
+ exit("❌ General error.");
}
else if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['desc']) && isset($_POST['name']) && isset($_POST['url'])) {
- $name = htmlspecialchars(trim($_POST['name']));
- $url = htmlspecialchars(trim($_POST['url']));
- $desc = htmlspecialchars(trim($_POST['desc']));
+ $data['name'] = htmlspecialchars(trim($_POST['name']));
+ $data['url'] = htmlspecialchars(trim($_POST['url']));
+ $data['desc'] = htmlspecialchars(trim($_POST['desc']));
- if (!empty($name) && !empty($desc) && !empty($url)) {
+ if (!empty($data['name']) && !empty($data['desc']) && !empty($data['url'])) {
try {
- Storage::set_data($id, $name, $url, $desc);
- Telegram::report("EF Conbook Artist Credits Submission\nname: $name\nurl: $url\ntext:\n$desc");
+ Storage::set($id, $data);
+ Telegram::report("EF Conbook Artist Credits Submission\nname: ". $data['name'] ."\nurl: ". $data['url'] ."\ntext:\n". $data['desc']);
$alerts['success'][] = '✅ Entry saved';
}
catch(Exception $ex) {
@@ -116,14 +124,14 @@ else if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['desc']) && isset
-
+
-
+
@@ -143,55 +151,75 @@ else if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['desc']) && isset
-
Conbook Artist Credit Form
+
Conbook Art Submission Form
- Thank you for submitting art to the Eurofurence Conbook. In the event of your art making an appearance in the book, your are eligible to an entry in the artist credits.
- Edit your entry below before the end of July to make sure you are credited appropriately.
+ A place for you to submit art to the Eurofurence Conbook and provide crediting information.
+ Deadline: End of July!
-
-
Bookmark this page or save the following url to be able to edit your entry later:
-
-
-
-
-
-
-
-
+
Please make sure your images are large enough for DIN A4 printing. Don't worry about cropping or aspect ratio, we will adjust them into the layout ourselves.
-
-
-
Please make sure your profile image is large enough for print. Don't worry about cropping or aspect ratio, it will be adjusted into the layout by us.
-
-
-
-
-
-
- Upload Your Profile Image PNG, JPG or GIF min. 500 x 500 @ 300 dpi
-
-
- SELECT FILE
+
+
+
Personal Link
+
Bookmark or save it to edit your entry at a later time. Do not share it, unless with people you want to enable editing your information:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Your Credits Entry
+
+
+
+ Upload Your Profile Image PNG, JPG or GIF min. 500 x 500 @ 300 dpi
+
+
+ SELECT FILE
+
+
+
+
+
+
+
+
Your Contribution
+
+
+ Drop Your Contribution Here PNG, PSD, TIFF, JPG or GIF highest possible resolution, ideally 300 dpi
+