Benefits->CanUploadArtwork){ throw new Exceptions\InvalidPermissionsException(); } // We got here because an artwork was successfully submitted. if($isCreated){ http_response_code(Enums\HttpCode::Created->value); $artwork = null; session_unset(); } // We got here because an artwork submission had errors and the user has to try again. if($exception){ http_response_code(Enums\HttpCode::UnprocessableContent->value); session_unset(); } if($artwork === null){ $artwork = new Artwork(); $artwork->Artist = new Artist(); if(Session::$User->Benefits->CanReviewOwnArtwork){ $artwork->Status = Enums\ArtworkStatusType::Approved; } } } catch(Exceptions\LoginRequiredException){ Template::RedirectToLogin(); } catch(Exceptions\InvalidPermissionsException){ Template::Emit403(); // No permissions to submit artwork. } ?> 'Submit an Artwork', 'css' => ['/css/artwork.css'], 'highlight' => '', 'description' => 'Submit public domain artwork to the database for use as cover art.' ] ) ?>

Submit an Artwork

$exception]) ?>

Artwork submitted!

$artwork]) ?>