| 1 | <!--showing poll--> |
| 2 | {if $poll_id eq true}{get_poll poll_id=$poll_id} |
| 3 | {else}{get_poll}{/if} |
| 4 | {$get_poll.voted} |
| 5 | {if $get_poll.question eq true} |
| 6 | <table width='66%' align='center' class='bordered'> |
| 7 | <tr><td colspan='3' |
| 8 | align='center'><b>{$get_poll.question}</b></td></tr> |
| 9 | {foreach from=$get_poll.options item=option name=poll_option} |
| 10 | <tr><td>{if $get_poll.voted eq 'yes'}{$option.text}{else} |
| 11 | <form method='post' |
| 12 | action='/id/{$get_poll.node_id}'>{$option.text} <input |
| 13 | type='submit' name='event' value='vote'><input |
| 14 | type='hidden' name='poll_option' |
| 15 | value='{$smarty.foreach.poll_option.iteration}'></form>{/if}</td><td> |
| 16 | <table style='background-color:#6dae42;width: {math equation="(x/y)*100" |
| 17 | format="%d" x=$option.number y=$get_poll.total} pt;'><tr height=5><td |
| 18 | height=5></td></tr></table></td><td>{math |
| 19 | equation="(x/y)*100" format="%.1f" x=$option.number |
| 20 | y=$get_poll.total}%</td></tr> |
| 21 | {/foreach} |
| 22 | <tr><td colspan='3' align='center'><i>{$get_poll.total} |
| 23 | voted</i></td></tr> |
| 24 | </table> |
| 25 | {/if} |
| 26 | <!--end of showing poll--> |
| 27 | |