<% /*
     $Revision$
     $Id$

    File:               funcodes.inc
    Description:        ??Determine autorization (!!pre-3D style!!!)
                        and set some globals (sql_locs)
    Globals:
    Result:             Global arrays func_enabled is set
    Context:            almost every file includes this one
    Note:               Since we've got 3D autorization this file is kinda OBSOLETE
                        but as not every file has been 100% updates to 3D auth. we
                        keep this file in a stripped down version
*/ %>
<%

  var func_enabled = new Array();

    oRs = Oracle.Execute( // JGL: Distinct is enough, no need for duplicates
        "SELECT DISTINCT f.fac_functie_code"+
        "  FROM fac_v_webgebruiker w, fac_functie f "+
        "  WHERE w.prs_perslid_key= "+user_key +
        "    AND w.fac_functie_key=f.fac_functie_key "
      );

    while( !oRs.eof ) {
      func_enabled[''+oRs(0)]=true;
      oRs.MoveNext();
    }
    oRs.close();

%>
