function add_survey_group_susi_student() { // get global user object global $user; // protect from unauthorized access if (!isset($user) or !isset($_POST['formSurveyAddGroupSusiStudentSubmit']) or !isset($_POST['formSurveyAddGroupSusiStudent'])) { if ($_POST['formSurveyAddGroupSusiStudent'] != 'formSurveyAddGroupSusiStudentGroup') { logout(); die; } } $session_groups = unserialize($_SESSION['session_groups']); if ($_POST['formSurveyAddGroupSusiStudentGroup'][0] == '0') { $session_groups['student'] = get_susi_student_groups(); } else { $session_groups['student'] = $_POST['formSurveyAddGroupSusiStudentGroup']; } $session_groups['type'] = ''; $_SESSION['session_groups'] = serialize($session_groups); $cookie_key = 'msg'; $cookie_value = 'Вие добавихте анкетната група студенти!'; setcookie($cookie_key, $cookie_value, time() + 1); header('Location: ' . ROOT_DIR . '?page=survey_edit'); }
echo BTN_RESET; ?> " /> <input id="formSurveyAddGroup" class="button button-green" name="formSurveyAddGroup" type="hidden" value="formSurveyAddGroup" /> <a id="formSurveyAddGroupCancel" class="button button-red fl" style="color: #fff; width: 230px; margin: 2px 0px 0px 10px;;" href="<?php echo ROOT_DIR; ?> ?page=survey_edit&funct=delete_group_type"><?php echo BTN_CANCEL; ?> </a> </div> </form> <?php } elseif ($session_groups['type'] == 'student') { $susi_student_groups = get_susi_student_groups(); ?> <form id="formSurveyAddGroupSusiStudent" class="form ac" action="<?php echo ROOT_DIR . '?page=survey_edit&funct=add_survey_group_susi_student'; ?> " method="POST"> <div class="ac"> <hr/> <h4> <?php echo EDIT_SURVEY_PAGE_YOU_CHOOSE_GROUP_STUDENTS; ?> </h4> <hr/> <section class="clearfix prefix_2"> <label for="formSurveyAddGroupSusiStudentGroup"><?php