getRow(' SELECT `id_question` FROM `'._DB_PREFIX_.'support_question` WHERE `position` = '.(int) $_GET['position'].' AND `id_section` = '.(int) $question->id_section ); $question2 = new Question((int) $sql['id_question']); Db::getInstance()->Execute(' UPDATE `'._DB_PREFIX_.'support_question` SET `position` = '.(int) $question->position.' WHERE `id_question` = '.(int) $question2->id.' '); Db::getInstance()->Execute(' UPDATE `'._DB_PREFIX_.'support_question` SET `position` = '.(int) $_GET['position'].' WHERE `id_question` = '.(int) $question->id.' '); $questions = Question::getQuestionsByIdSection($question->id_section); $html = ''; foreach ($questions as $key => $question) { $html .= ' '.$question->id.' '.$question->title[intval($cookie->id_lang)].' '; if($key != 0){ $html .= 'Haut'; } if($key + 1 != count($questions)){ $html .= 'Bas'; } $html .= ' '; } die(Tools::jsonEncode(array( 'has_error' => false, 'html' => $html ),JSON_HEX_QUOT | JSON_HEX_TAG)); } elseif (isset($_GET['id']) && isset($_GET['position']) && Tools::getIsset('updatepositionSection')) { $section = new Section((int) $_GET['id']); $sql = Db::getInstance()->getRow(' SELECT `id_section` FROM `'._DB_PREFIX_.'support_section` WHERE `position` = '.(int) $_GET['position'] ); $section2 = new Section((int) $sql['id_section']); Db::getInstance()->Execute(' UPDATE `'._DB_PREFIX_.'support_section` SET `position` = '.(int) $section->position.' WHERE `id_section` = '.(int) $section2->id.' '); Db::getInstance()->Execute(' UPDATE `'._DB_PREFIX_.'support_section` SET `position` = '.(int) $_GET['position'].' WHERE `id_section` = '.(int) $section->id.' '); $sections = Section::getSections(); $html=''; foreach ($sections as $key => $section) { $html .= ' '.$section->id.' '.$section->title[intval($cookie->id_lang)].' '; if($key != 0){ $html .= 'Haut'; } if($key + 1 != count($sections)){ $html .= 'Bas'; } $html .= ' '; } die(Tools::jsonEncode(array( 'has_error' => false, 'html' => $html ),JSON_HEX_QUOT | JSON_HEX_TAG)); } } die(Tools::jsonEncode(array( 'has_error' => true, 'html' => '

Probleme de token

' )));