} $question = null; $answer = null; if (isset($_GET['id'])) { $answer = $db->selectObject('poll_answer', 'id=' . $_GET['id']); if ($answer) { $question = $db->selectObject('poll_question', 'id=' . $answer->question_id); } } else { if (isset($_GET['question_id'])) { $question = $db->selectObject('poll_question', 'id=' . $_GET['question_id']); } } if ($question) { $loc = unserialize($question->location_data); if (expPermissions::check('manage_answer', $loc)) { $form = poll_answer::form($answer); $form->location($loc); $form->meta('action', 'save_answer'); if ($answer == null && isset($_GET['question_id'])) { $form->meta('question_id', $_GET['question_id']); } $template = new template('simplepollmodule', '_editAnswer', $loc); $template->assign('form_html', $form->toHTML()); $template->output(); } else { echo SITE_403_HTML; } } else { echo SITE_404_HTML; }