Beispiel #1
0
        $i++;
    }
    $admintpl->set("show_poller", false, true);
    $admintpl->set("new_poll", false, true);
    $admintpl->set("polls", $polls);
}
/***
* Show a new poll or edit a poll
***/
if (isset($_POST['new']) || !empty($id)) {
    $pollObj = new poll();
    $pollObj->table_prefix = $TABLE_PREFIX;
    if (!empty($id)) {
        $pollObj->getDataById($id);
        $pollerOptions = $pollObj->getOptionsAsArray();
        $votes = $pollObj->getVotesAsArray();
        $title = "" . $pollObj->pollerTitle . "";
        if ($pollObj->active == "yes") {
            $check1 = "checked=\"checked\"";
        } else {
            $check1 = "";
        }
        if ($pollObj->active == "no") {
            $check2 = "checked=\"checked\"";
        } else {
            $check2 = "";
        }
    } else {
        $pollerOptions = array();
        $votes = array();
        $title = unesc($language["POLL_START_NEW"]);