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

    File:               get_shared_info.asp
    Description:        Ophalen van allerlei info om client-side data te hebben
    Parameters:         init_key
                        niveau
    Context:
    Note:
    Sample:             appl/fac/get_shared_info.asp?req_info=eval_bb_code&input=[b]ok[/b]

*/ %>

<%
var JSON_Result = true;
%>

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

<%
var req_info = getFParam("req_info");
var result = {};

switch (req_info)
{
    case "eval_bb_code": {
        var params = {
            "file_params": {
                "key": getFParamInt("key", -1),
                "module": getFParam("module", "")
            },
            "mldlink": getFParamInt("mldlink", 0) == 1,
            "cntlink": getFParamInt("cntlink", 0) == 1,
            "faqlink": getFParamInt("faqlink", 0) == 1,
            "fcltlinks": getFParamInt("fcltlinks", 0) == 1
        }
        result = {
            "fclthtml": safe.fclthtml(getFParam("input"), params)
        }
        break;
    }
    case "strip_bb_code": {
        result = {
            "stripped_input": shared.stripbbcodes(getFParam("input"))
        }
        break;
    }
}
Response.Write(JSON.stringify(result));
%>
<% ASPPAGE_END(); %>
