Benefits->CanUploadArtwork){ throw new Exceptions\InvalidPermissionsException(); } // We got here because an artwork was successfully submitted if($created){ http_response_code(201); $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(422); session_unset(); } if($artwork === null){ $artwork = new Artwork(); $artwork->Artist = new Artist(); if($GLOBALS['User']->Benefits->CanReviewOwnArtwork){ $artwork->Status = ArtworkStatus::Approved; } } } catch(Exceptions\LoginRequiredException){ Template::RedirectToLogin(); } catch(Exceptions\InvalidPermissionsException){ Template::Emit403(); // No permissions to submit artwork } ?> 'Submit an Artwork', 'artwork' => true, 'highlight' => '', 'description' => 'Submit public domain artwork to the database for use as cover art.' ] ) ?>

Submit an Artwork

$exception]) ?>

Artwork submitted!

$artwork]) ?>