Benefits->CanUploadArtwork){ throw new Exceptions\InvalidPermissionsException(); } if($isCreated){ // We got here because an `Artwork` was successfully submitted. http_response_code(Enums\HttpCode::Created->value); $artwork = null; session_unset(); } elseif($exception){ // We got here because an `Artwork` submission had errors and the user has to try again. 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::ExitWithCode(Enums\HttpCode::Forbidden); // 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]) ?>