UserId)){ $vote->UserId = Session::$User->UserId; $vote->User = Session::$User; } $poll = Poll::GetByUrlName(HttpInput::Str(GET, 'pollurlname')); try{ $vote = PollVote::Get($poll->UrlName, Session::$User->UserId); // Vote was found, don't allow another vote. throw new Exceptions\PollVoteExistsException($vote); } catch(Exceptions\PollVoteNotFoundException){ // Vote was not found, user is OK to vote. } if($exception){ http_response_code(Enums\HttpCode::UnprocessableContent->value); session_unset(); } } catch(Exceptions\LoginRequiredException){ Template::RedirectToLogin(); } catch(Exceptions\PollNotFoundException){ Template::ExitWithCode(Enums\HttpCode::NotFound); } catch(Exceptions\PollVoteExistsException $ex){ $redirect = $poll->Url; if($ex->Vote !== null){ $redirect = $ex->Vote->Url; } header('Location: ' . $redirect); exit(); } ?>Name . ' Poll', description: 'Vote in the ' . $poll->Name . ' poll') ?>

Vote in the Name) ?> Poll

Select one of these options.

    PollItems as $pollItem){ ?>