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

     Increment the rank of a FAQ (kennisbankitem)
  */ %>
<%
var JSON_Result = true;
%>

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

<%
protectRequest.validateToken();
var faq_key = getFParamInt("faq_key");

var autfunction = ["WEB_FAQUSE", "WEB_FAQFOF"];
var authparams = user.checkAutorisation(autfunction);

sql = "UPDATE fac_faq"
    + "   SET fac_faq_rank = COALESCE(fac_faq_rank, 0) + 1"
    + " WHERE fac_faq_key = " + faq_key;
Oracle.Execute(sql);

var result = { key: faq_key, success: true, accept: true };
Response.Write(JSON.stringify(result));
%>
<% ASPPAGE_END(); %> 
