示例#1
0
                     }
                 }
             }
             $notify->add($lang->get('mod_name'), $lang->get('edit_successfull'));
             $smarty->assign('only_info', 1);
         } else {
             $smarty->assign('info', $lang->get('edit_failed'));
         }
     }
     if ($add_failed) {
         $pollID = (int) $_POST['edit'];
         if ($poll->existsPoll($pollID)) {
             $smarty->assign('headline', $lang->get('poll_edit'));
             $thispoll = $poll->getPollByID($pollID, $login->currentUserID());
             $smarty->assign('poll', $thispoll);
             $questions = $poll->getQuestionsByPollID($pollID);
             $counter = 1;
             foreach ($questions as $question) {
                 $question['title'] = $lang->get('header_question') . " " . $counter++;
                 $questions_show[] = $question;
             }
             $smarty->assign('value_questions', $questions_show);
             $smarty->assign('count_start', $counter - 1);
             $smarty->assign('count_questions', $config->get("poll", "maximum-questions"));
             $smarty->assign('header_question', $lang->get('header_question'));
             $smarty->assign('header_pollname', $lang->get('header_pollname'));
             $smarty->assign('submit_edit', $lang->get('submit_edit'));
             $smarty->assign('multiple_answers', $lang->get('multiple_answers'));
         }
     }
 }