dbprefix}koolielu_polls ORDER BY time DESC"); $old_polls = array(); foreach($all_polls as $poll) { $poll_id = $poll->ID; $poll_answers = get_data("SELECT * FROM {$CONFIG->dbprefix}koolielu_polls_answers WHERE poll_id=$poll_id"); if ((is_array($poll_answers) && count($poll_answers) > 0) || ($poll->isActive == 1)) { array_push($old_polls, $poll); } } /*translation:Poll*/ $polls_body = "

". elgg_echo("koolielu:poll") ."


"; $polls_body .= $chosen_poll; $polls_body .= "
"; foreach($old_polls as $old_poll) { $poll_url = $CONFIG->wwwroot . "pg/koolielu/polls/" . $old_poll->ID; if ($old_poll->ID == $chosen_poll_id) $polls_body .= "
"; else $polls_body .= "
"; $polls_body .= "" . $old_poll->questiontext . "
"; } $body = elgg_view_layout("three_columns", '', $polls_body, ''); page_draw('', $body); ?>