// along with Rogō. If not, see <http://www.gnu.org/licenses/>. /** * * @author Simon Wilkinson * @version 1.0 * @copyright Copyright (c) 2014 The University of Nottingham * @package */ require '../../include/sysadmin_auth.inc'; require '../../include/errors.inc'; require_once '../../classes/helputils.class.php'; require_once '../../classes/userutils.class.php'; $pageid = check_var('id', 'REQUEST', true, false, true); $help_system = new OnlineHelp($userObject, $configObject, $string, $notice, 'staff', $language, $mysqli); header('Content-Type: text/html; charset=utf8'); $page_details = $help_system->get_page_details($pageid); if ($page_details === false) { $msg = sprintf($string['furtherassistance'], $configObject->get('support_email'), $configObject->get('support_email')); $notice->display_notice_and_exit($mysqli, $string['pagenotfound'], $msg, $string['pagenotfound'], '/artwork/page_not_found.png', '#C00000', true, true); } if (isset($_POST['save_changes'])) { // Update help file record $tmp_body = $_POST['edit1']; $tmp_title = $_POST['page_title']; $tmp_roles = $_POST['page_roles']; $help_system->save_page($tmp_title, $tmp_body, $tmp_roles, $pageid, $_POST['edit_id']); $mysqli->close(); header("location: index.php?id={$pageid}"); exit; } elseif (isset($_POST['cancel'])) { // Release authoring lock.