} if ( $op == "savemore" ) { if (!$GLOBALS['xoopsSecurity']->check()) { redirect_header('index.php', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); } $poll = new XoopsPoll($poll_id); $i = 0; foreach ( $option_text as $optxt ) { $optxt = trim($optxt); if ( $optxt != "" ) { $option = new XoopsPollOption(); $option->setVar("option_text", $optxt); $option->setVar("poll_id", $poll->getVar("poll_id")); $option->setVar("option_color", $option_color[$i]); $option->store(); } $i++; } include_once XOOPS_ROOT_PATH.'/class/template.php'; xoops_template_clear_module_cache($xoopsModule->getVar('mid')); redirect_header("index.php",1,_AM_DBUPDATED); exit(); } if ( $op == "delete" ) { xoops_cp_header(); echo "<h4>"._AM_POLLCONF."</h4>"; $poll = new XoopsPoll($_GET['poll_id']); xoops_confirm(array('op' => 'delete_ok', 'poll_id' => $poll->getVar('poll_id')), 'index.php', sprintf(_AM_RUSUREDEL,$poll->getVar("question"))); xoops_cp_footer();