<%@language = "javascript" %>
<%
/*  $Revision$
    $Id$

    File:           fac_preview_xsl.asp
    Description:    Preview van een rapport
    Parameters:
        xmlnode     required
        key         required
        mode        E-mail of Summary
        srtnoti     Srtnotificatiecode
    Context:
    Note:           PRSSYS nodig (je kunt tenslotte elke bon opvragen)
 */
 %>

<!-- #include file="../Shared/common.inc" -->
<!-- #include file="../Shared/xml_converter.inc" -->

<%
FCLTHeader.Requires({ plugins: ["jQuery"], js: ["jQuery-ui.js"]
                    })

var autfunction = "WEB_PRSSYS";
var authparams = user.checkAutorisation(autfunction);

try
{
FCLT2XMLResponse({xmlnode: getQParamSafe("xmlnode"),
                  key: getQParamInt("key", -1),
                  mode: getQParam("mode", "email"),
                  srtnotificatie: getQParam("srtnoti"),
                  nostyle:getQParam("mode")=="xml", // overruled de rest
                  concept: true });
}
catch(e)
{
    if (String(e.description).indexOf("ORA-01403")>=0)
        shared.simpel_page(L("lcl_xsl_nodata"));
    else
        shared.simpel_page(L("lcl_xsl_nopreview")+"<p><blockquote>{0}</blockquote>".format(safe.html(e.description)));
}
%>