$html = escape_xml($html); header('Content-type: text/xml; charset=UTF-8'); echo <<<EOF <?xml version="1.0" encoding="UTF-8"?> <data> <ctl>{$div}</ctl> <code>{$html}</code> </data> EOF; exit; } // check if the user can access the ledger where the operation is (view) and // if he can modify it $op = new Acc_Operation($cn); $op->jr_id = $_REQUEST['jr_id']; $ledger = $op->get_ledger(); if ($ledger == "") { ob_start(); echo HtmlInput::title_box(_("Information"), $div); require_once NOALYSS_INCLUDE . '/template/ledger_detail_forbidden.php'; echo HtmlInput::button_close($div); $html = ob_get_contents(); ob_end_clean(); $html = escape_xml($html); if (!headers_sent()) { header('Content-type: text/xml; charset=UTF-8'); } else { echo "HTML" . unescape_xml($html); } echo <<<EOF <?xml version="1.0" encoding="UTF-8"?>