__section__
default
__description__
Prints a pollbooth

* polls = arrayref of answer arrayrefs [question, answer, answer ID]
* question = question text
* qid = question ID
* voters = number of voters
* comments = number of comments
* sect = section

__title__

__page__
misc
__lang__
en_US
__name__
pollbooth
__template__
[% USE Slash %]
[% IF Slash.db.getPollVoter(qid) %]
<B>[% question %]</B>

[% FOREACH ans = polls %][% answer = ans.1; aid = ans.2; votes = ans.3 %]
	<LI> [% answer %] ([% votes %])
[% END %]

<P><EM>(You've already voted.)</EM><BR>
[ <A HREF="[% constants.rootdir %]/pollBooth.pl?section=[% sect %]&qid=[% qid %]&aid=-1"><B>Results</B></A> |
<A HREF="[% constants.rootdir %]/pollBooth.pl?section=[% sect %]"><B>Polls</B></A> ] <BR>
Comments:<B>[% comments %]</B> | Votes:<B>[% voters %]</B>

[% ELSE %]

<FORM ACTION="[% constants.rootdir %]/pollBooth.pl">
	<INPUT TYPE="hidden" NAME="qid" VALUE="[% qid | strip_attribute %]">
	[% IF user.currentSection %]
	<INPUT TYPE="hidden" NAME="section" VALUE="[% user.currentSection %]">
	[% END %]
<B>[% question %]</B>

[% FOREACH ans = polls %][% answer = ans.1; aid = ans.2; votes = ans.3 %]
	<BR><INPUT TYPE="radio" NAME="aid" VALUE="[% aid %]">[% answer %]
[% END %]

<BR><INPUT TYPE="submit" VALUE="Vote">
[ <A HREF="[% constants.rootdir %]/pollBooth.pl?section=[% sect %]&qid=[% qid %]&aid=-1"><B>Results</B></A> |
<A HREF="[% constants.rootdir %]/pollBooth.pl?section=[% sect %]"><B>Polls</B></A> ] <BR>
Comments:<B>[% comments %]</B> | Votes:<B>[% voters %]</B>
</FORM>
[% END %]
__seclev__
10000
