Esempio n. 1
0
function blocks_poll_block($row)
{
    // for MSSQL that always have an space
    $row['content'] = trim($row['content']);
    if (!empty($row['content'])) {
        $pollID = $row['content'];
    } else {
        $pollID = pollLatest();
    }
    return pollMain($pollID, $row);
}
Esempio n. 2
0
        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;
    }
    $boxContent = "<form action=\"" . URL::index() . "\" method=\"post\" enctype=\"multipart/form-data\" accept-charset=\"utf-8\">";
    $boxContent .= "<input type=\"hidden\" name=\"pollid\" value=\"{$poll_id}\" />";
Esempio n. 3
0
function pollNewest()
{
    $pollID = pollLatest();
    pollMain($pollID);
}