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

     File:          fac_like_save.asp
     Description:   Opsla script voor fac_like.asp
     Parameters:    key
                    xmlnode
*/ %>
<%
JSON_Result = true;
%>
<!-- #include file="../Shared/common.inc" -->
<!-- #include file="../Shared/json2.js" -->
<!-- #include file="./fac_like.inc" -->
<%
protectRequest.validateToken();

var result = { message: "", success: false };
var key = getQParamInt("key");
var node = getQParam("node");

var this_like = like.func_enabled_like(key, node);
user.auth_required_or_abort(this_like.canChange);

var oordeel_int = getFParamInt("flike_oordeel");
var opmerking = getFParam("flike_opmerk", "");

like.save_like(key, node, oordeel_int, opmerking);

result.success = true;
Response.Write(JSON.stringify(result));
%>