$poll_comment['nickname'] = makeHtmlUrl($poll_comment['nickname'], makeUrl('profile', array('userid' => $poll_comment['userid']))); $poll_comment['date'] = date("d.m.Y H:i:s", $poll_comment['timestamp']); $poll_final_comments[] = $poll_comment; } $smarty->assign('all_comments', $poll_final_comments); $p = $poll->getPollByID($_GET['pollid'], $login->currentUserID()); $smarty->assign('poll', $p); $breadcrumbs->addElement(cutString($p['name'], 20), makeURL($mod, array('pollid' => $_GET['pollid']))); $smarty->assign('path', $template_dir . '/poll.singleview.tpl'); } else { $countpolls = $poll->countActivePolls(); if ($countpolls > 0) { $pageat = isset($_GET['page']) && (int) $_GET['page'] > 0 && (int) $_GET['page'] <= ceil($countpolls / $pollsperpage) ? (int) $_GET['page'] : 1; $pages->setValues($pageat, $pollsperpage, $countpolls); $smarty->assign('pages', $pages->get('poll', array(''))); $smarty->assign('polls', $poll->getActivePolls($login->currentUserID(), ($pageat - 1) * $pollsperpage, $pollsperpage)); } else { $smarty->assign('no_poll', $lang->get('no_poll')); } $smarty->assign('path', $template_dir . '/poll.view.tpl'); } $smarty->assign('comments', $lang->get('comment_count')); $smarty->assign('submit_value', $lang->get('submit_vote')); $smarty->assign('number_of_voters', $lang->get('number_of_voters')); $smarty->assign('inactive', $lang->get('submit_inactive')); $smarty->assign('active', $lang->get('submit_active')); $smarty->assign('edit', makeURL('poll', array('mode' => 'edit'))); $smarty->assign('submit_edit', $lang->get('edit')); $smarty->assign('delete', makeURL('poll', array('mode' => 'delete'))); $smarty->assign('submit_delete', $lang->get('submit_delete')); break 1;