<%@ LANGUAGE = JavaScript %>
<% /*
    $Revision$
    $Id$

    File:           faq_delete.asp
    Description:    Verwijderen alg-object

    Parameters:
    Context:        Vanuit show-schermen
    Result:         JSON object
    Note:

*/
var JSON_Result = true;
%>
<!-- #include file="../Shared/common.inc" -->
<!-- #include file="../Shared/json2.js" -->
<%
var faq_key = getQParamInt( "faq_key", -1 );
var authparamsFAQFOF = user.checkAutorisation("WEB_FAQFOF", true);
var authparamsFAQBOF = user.checkAutorisation("WEB_FAQBOF", true);
var canWriteFAQFOF = authparamsFAQFOF && authparamsFAQFOF.PRSwritelevel < 9 && authparamsFAQFOF.ALGwritelevel < 9;
var canWriteFAQBOF = authparamsFAQBOF && authparamsFAQBOF.PRSwritelevel < 9 && authparamsFAQBOF.ALGwritelevel < 9;
user.auth_required_or_abort(canWriteFAQFOF || canWriteFAQBOF); // Frontoffice en backoffice mogen verwijderen met schrijfrechten

var  faq_key = getFParamInt('faq_key');

sql = "DELETE FROM fac_faq"
    + " WHERE fac_faq_key = " + faq_key;

result = { success: true, deleted: true};
var err = Oracle.Execute(sql, true);
if (err.friendlyMsg)
{
    result.message = err.friendlyMsg;
    result.success = false;
    result.deleted = false;
}

Response.Write(JSON.stringify(result));
%>