exit; } // Displaying the header Display::display_header($tool_name, 'Survey'); // Action handling $my_action_survey = isset($_GET['action']) ? Security::remove_XSS($_GET['action']) : null; $my_question_id_survey = isset($_GET['question_id']) ? Security::remove_XSS($_GET['question_id']) : null; $my_survey_id_survey = Security::remove_XSS($_GET['survey_id']); $message_information = isset($_GET['message']) ? Security::remove_XSS($_GET['message']) : null; if (isset($_GET['action'])) { if (($_GET['action'] == 'moveup' || $_GET['action'] == 'movedown') && isset($_GET['question_id'])) { survey_manager::move_survey_question($my_action_survey, $my_question_id_survey, $my_survey_id_survey); Display::display_confirmation_message(get_lang('SurveyQuestionMoved')); } if ($_GET['action'] == 'delete' and is_numeric($_GET['question_id'])) { survey_manager::delete_survey_question($my_survey_id_survey, $my_question_id_survey, $survey_data['is_shared']); } } if (isset($_GET['message'])) { // We have created the survey or updated the survey if (in_array($_GET['message'], array('SurveyUpdatedSuccesfully', 'SurveyCreatedSuccesfully'))) { Display::display_confirmation_message(get_lang($message_information) . ', ' . PHP_EOL . api_strtolower(get_lang('YouCanNowAddQuestionToYourSurvey'))); } // We have added a question if (in_array($_GET['message'], array('QuestionAdded', 'QuestionUpdated'))) { Display::display_confirmation_message(get_lang($message_information)); } if (in_array($_GET['message'], array('YouNeedToCreateGroups'))) { Display::display_warning_message(get_lang($message_information), false); } }