} elseif ($poll_id != pollLatest()) { echo '<div style="text-align:center;" class="option">' . _SURVEY . '</div>'; CloseTable(); echo '<br /><br /><table border="0" style="margin:auto;"><tr><td>'; if (pollVoted($poll_id)) { pollResults($poll_id); } else { pollMain($poll_id); } echo '</td></tr></table>'; } else { echo '<div style="text:align:center;" class="option">' . _CURRENTSURVEY . '</div>'; CloseTable(); echo '<br /><br /><table border="0" style="margin:auto;"><tr><td>'; if (pollVoted($poll_id)) { pollResults(pollLatest()); } else { pollMain(pollLatest()); } echo '</td></tr></table>'; } } /*********************************************************/ /* Functions */ /*********************************************************/ function pollMain($poll_id) { global $prefix, $db, $MAIN_CFG, $Blocks; if (!isset($poll_id)) { $poll_id = 1; }
} } elseif ($op == 'results') { list($ibid, $pollClose) = pollSecur($pollID); if ($pollID == $ibid) { include "header.php"; echo '<h2>' . translate("Survey") . '</h2><hr />'; if (!$pollClose) { $block_title = '<h3>' . translate("Vote") . '</h3>'; echo $block_title; pollboxbooth($pollID, $pollClose); echo ''; } else { echo ''; PollMain_aff($pollID); } pollResults($pollID); echo ''; if ($pollcomm) { if (file_exists("modules/comments/pollBoth.conf.php")) { include "modules/comments/pollBoth.conf.php"; if ($pollClose == 99) { $anonpost = 0; } include "modules/comments/comments.php"; } } include "footer.php"; } else { Header("Location: {$forwarder}"); } }