"survey_list.php", "name" => get_lang('Survey')); $surveyid = $_GET['surveyid']; $surveyname = SurveyManager::pick_surveyname($surveyid); if(isset($_GET['direction'])){ $sql = 'SELECT * FROM '.$table_group.' WHERE group_id='.intval($_GET['id_group']); $rs = api_sql_query($sql, __FILE__, __LINE__); $group = mysql_fetch_object($rs); if(is_object($group)){ $_GET['direction'] == 'up' ? $operateur = '-' : $operateur = '+'; $sql = 'UPDATE '.$table_group.' SET sortby='.$group->sortby.' WHERE sortby='.$group->sortby.$operateur.'1' ; $rs = api_sql_query($sql,__FILE__,__LINE__); $sql = 'UPDATE '.$table_group.' SET sortby='.$group->sortby.$operateur.'1'.' WHERE group_id='.intval($_GET['id_group']); $rs = api_sql_query($sql,__FILE__,__LINE__); } } if(isset($_REQUEST['delete'])) { $group_id = $_REQUEST['group_delete']; $surveyid = $_REQUEST['surveyid']; SurveyManager::delete_group($group_id); header("Location:create_new_group.php?surveyid=$surveyid"); exit; } if ($_POST['action'] == 'new_group') { $surveyid = $_POST['surveyid']; $groupname = $_POST['groupname']; $surveyintroduction = $_POST['content']; if(isset($_POST['back'])) { header("location:select_question_group.php?surveyid=$surveyid"); exit; } $groupname=trim($groupname); if(empty ($groupname)) { $error_message = get_lang('PleaseEnterGroupName'); } else { $groupid = SurveyManager::create_group($surveyid,$groupname,$surveyintroduction,$table_group); if(isset($_POST['next']) && $groupid) { header("location:addanother.php?surveyid=$surveyid&newgroupid=$groupid"); exit; }elseif(isset($_POST['saveandexit']) && $groupid){ header("location:survey_list.php"); exit; } else { $error_message = "This Group Already Exists !"; } } } Display::display_header($tool_name1); ?>
'; } else { $directions .= ' | '; } if($i > 0){ $directions .= ' | '; } else { $directions .= ' | '; } $directions .= ' |