<%@ language = "JavaScript" %> <% /* $Revision$ $Id$ File: fac_settings_list.asp Description: Toont alle menu-opties, met de mogelijkheid deze van/naar het eigen menu te zetten Parameters: groep (0,1,2): filtert het resultaat module (MLD etc): filtert het resultaat inuse (0, 1): filtert het resultaat Context: INTERNAL USE Requires: WEB_PRSSYS autorisatie Note: Eerste opzet */ %> <% var smodule = getQParam("smodule", "-1"); var zoek = getQParam("zoek", ""); var showall = getQParamInt("showall", 0) == 1; var outputmode = getQParamInt("outputmode", 0); var autfunction = "WEB_PRSSYS"; var authparams = user.checkAutorisation(autfunction); var hasFACFAC = user.checkAutorisation("WEB_FACFAC", true); FCLTHeader.Requires({ plugins: ["jQuery"] }) %>
<% FCLTHeader.Generate({outputmode: outputmode}) %>
<% var sqln = "SELECT *" + " FROM fac_setting s, " + " fac_functie f, " + " prs_v_perslid_fullnames pf" + " WHERE s.prs_perslid_key = pf.prs_perslid_key(+)" + " AND s.fac_functie_key = f.fac_functie_key" + (zoek ? " AND (UPPER(fac_setting_name) LIKE " + safe.quoted_sql_wild("%" + zoek + "%") + " OR UPPER(fac_setting_description) LIKE " + safe.quoted_sql_wild("%" + zoek + "%") + " OR UPPER(fac_setting_default) LIKE " + safe.quoted_sql_wild("%" + zoek + "%") + " OR UPPER(fac_setting_pvalue) LIKE " + safe.quoted_sql_wild("%" + zoek + "%") + ")" : "") + (smodule != "-1" ? " AND fac_setting_module = " + safe.quoted_sql(smodule) : "") + (!hasFACFAC ? " AND BITAND (fac_setting_flags, 1) = 1" // zichtbaar voor PRSSYS :"") + " ORDER BY fac_setting_name"; function prettyJson(j) { try { var xx = JSON.stringify(eval("("+j + ")"), null, 2); if (xx == "null") return ""; return xx; } catch (e) { return j; }; }; function fncolpval(oRs) { if (oRs("fac_setting_type").Value == "json") return "

    " + safe.html( prettyJson(oRs("fac_setting_pvalue").Value)) + "

"; else return safe.html(oRs("fac_setting_pvalue").Value); } function fnprotected(oRs) { if (oRs("fac_functie_code").Value == 'WEB_PRSSYS') return ""; return "Protected"; } var rst = new ResultsetTable({ sql: sqln, keyColumn: "fac_setting_key", ID: "settingstable", title : "Settings (cache {0})".format(toDateTimeString(new Date(Application("SET_TM_" + customerId)))), showAll: showall, outputmode: outputmode }); rst.addColumn(new Column({caption: L("lcl_fac_module"), content: "fac_setting_module"})); rst.addColumn(new Column({caption: L("lcl_fac_setting"), content: "fac_setting_name"})); rst.addColumn(new Column({caption: L("lcl_fac_default"), content: "fac_setting_default"})); rst.addColumn(new Column({caption: L("lcl_fac_value"), content: fncolpval})); rst.addColumn(new Column({caption: L("lcl_fac_set"), content: "prs_perslid_naam_full"})); rst.addColumn(new Column({caption: L("lcl_fac_setting_fcltonly"), content: fnprotected })); rst.addColumn(new Column({caption: L("lcl_fac_time"), content: "fac_setting_datum", datatype: "datetime"})); rst.addColumn(new Column({caption: L("lcl_fac_descr"), content: "fac_setting_description"})); rst.addAction({ action: "doZet", isDefault: true }); var cnt = rst.processResultset(); %>