function SectionMoveTo($id, $direction = 'up') { $objResponse = new xajaxResponse(); if (hasPermissions('docs')) { $error = false; if ($direction == 'up') { $error = docs_sections::MoveUp($id); } else { $error = docs_sections::MoveDown($id); } if (!$error) { $id = null; $sections = docs_sections::getSections(); $page = $_SERVER['DOCUMENT_ROOT'] . '/service/docs/admin_sections.php'; ob_start(); include $page; $html = ob_get_contents(); ob_end_clean(); $objResponse->assign('admin_sections', 'innerHTML', $html); } else { $objResponse->assign('admin_sections', 'innerHTML', $error); } } return $objResponse; }