getPoll($poll_id, $poll_token); } catch (NotFoundException $nfe) { die('Poll not found'); } catch (NotSupportedPollException $nspe) { die('Sorry, this poll has a not yet supported type: ' . $nspe->getMessage()); } catch (PollAccessRestrictedException $are) { $message = array_key_exists('polltoken', $_GET) ? 'Sorry, your poll token is invalid! Please enter a valid token: ' : ('Sorry, this poll is private! If you have found this poll on a post, ' . 'please enter a link to the post, the post ID or the access token for the poll: '); die( $message . '
' ); } jslog($poll); $user_avatar_url = $poll->user->getAvatarUrl(50); $username = '@' . $poll->user->username; $disabled = $poll->canVote() ? '' : 'disabled'; $user_name = $poll->user->name ?? ''; $created_at = $poll->created_at; $closed_at = $poll->closed_at; ?>