checkPassword($_SESSION["mainconf_password"])) { $exporter = new ConfigDataExporter(); if (!headers_sent()) { header('Content-Type: application/json; charset=utf-8'); header('Content-disposition: attachment; filename=lam-config.json'); } try { echo $exporter->exportAsJson(); } catch (LAMException $e) { logNewMessage('ERROR', $e->getTitle() . ' ' . $e->getMessage()); } exit; } echo $_SESSION['header']; printHeaderContents(_("Import and export configuration"), '../..'); ?>