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

     File:          terms_save.asp
     Description:   Sla de wijzigingen van terms.asp op
     Context:

     NOTE:
*/ %>
<%
var TERMS_CONDITIONS_OK = true;
var JSON_Result = true;
%>
<!-- #include file="../Shared/common.inc" -->
<!-- #include file="../Shared/flexfiles.inc" -->
<%
protectRequest.validateToken();

var flexparam = flexProps("BDRADR", null, null, null, { getFile: L("lcl_terms_filename") });
if (!flexparam.files.length)
    abort_with_warning(L("lcl_internal_error"));

var terms_version = flexparam.files[0].name + "|" + flexparam.files[0].digest;

var sql = "UPDATE prs_perslid"
        + "   SET prs_perslid_terms_datum = SYSDATE"
        + "     , prs_perslid_terms_version = " + safe.quoted_sql(terms_version)
        + " WHERE prs_perslid_key = " + user_key;
Oracle.Execute(sql);
Session.Contents.Remove("must_accept_terms");

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