IsActive() && $poll->End !== null && $poll->End < NOW){ // If the poll ended, redirect to the results. header('Location: ' . $poll->Url . '/votes'); exit(); } if(Session::$User !== null){ $canVote = false; // User is logged in, hide the vote button unless they haven't voted yet. try{ PollVote::Get($poll->UrlName, Session::$User->UserId); } catch(Exceptions\AppException){ // User has already voted $canVote = true; } } } catch(Exceptions\AppException){ Template::Emit404(); } ?> $poll->Name, 'highlight' => '', 'description' => $poll->Description]) ?>

Name) ?>

Description ?>

IsActive()){ ?> End !== null){ ?>

This poll closes on End->format(Enums\DateTimeFormat::FullDateTime->value) ?>.

You’ve already voted in this poll.

Vote now View results

Start !== null && $poll->Start > NOW){ ?>

This poll opens on Start->format(Enums\DateTimeFormat::FullDateTime->value) ?>.

This poll closed on End->format(Enums\DateTimeFormat::FullDateTime->value) ?>.

View results