unset($_SESSION['page_questions_sec']); $paged_questions_sec = array(); } else { echo '<div id="survey_content" class="survey_content">' . get_lang('UpdateInformation') . '</div>'; // We unset the sessions unset($_SESSION['paged_questions']); unset($_SESSION['page_questions_sec']); $paged_questions_sec = array(); $form->display(); } } // Displaying the survey thanks message if (isset($_POST['finish_survey'])) { Display::display_confirmation_message(get_lang('SurveyFinished')); echo $survey_data['survey_thanks']; SurveyManager::update_survey_answered($survey_data, $survey_invitation['user'], $survey_invitation['survey_code']); unset($_SESSION['paged_questions']); unset($_SESSION['page_questions_sec']); Display::display_footer(); exit; } // Sets the random questions $shuffle = ''; if ($survey_data['shuffle'] == 1) { $shuffle = ' BY RAND() '; } if (isset($_GET['show']) || isset($_POST['personality'])) { // Getting all the questions for this page and add them to a // multidimensional array where the first index is the page. // As long as there is no pagebreak fount we keep adding questions to the page $questions_displayed = array();