IsActive() && $poll->End !== null && $poll->End < NOW){ // If the poll ended, redirect to the results header('Location: ' . $poll->Url . '/votes'); exit(); } if(isset($GLOBALS['User'])){ $canVote = false; // User is logged in, hide the vote button unless they haven't voted yet try{ PollVote::Get($poll->UrlName, $GLOBALS['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('F j, Y g:i a') ?>.

You’ve already voted in this poll.

Vote now View results

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

This poll opens on Start->format('F j, Y g:i a') ?>.

This poll closed on End->format('F j, Y g:i a') ?>.

View results