<%@language="javascript"%> <% /* $Revision$ $Id$ File: fac_adres_list.asp (formerly part of mld_adres_search.asp) Description: Toont de adress die voldoen aan de gegeven criteria Parameters: districtkey locatiekey adressname (% is added) bezoekpostcode (% is added) bezoekplaats (% is added) Context: - */ %> <% FCLTHeader.Requires({ plugins:["jQuery"] }); var autfunction = "WEB_ALGMSU"; // PF: was eerder en onlogisch PRSMAN, maar of dit goed is? var authparams = user.checkAutorisation(autfunction); var districtkey = getQParamInt("districtkey", -1); var locatiekey = getQParamInt("locatiekey", -1); var adressName = getQParam("adressName", ""); var bezoekPostcode = getQParam("bezoekPostcode", ""); var bezoekPlaats = getQParam("bezoekPlaats", ""); var outputmode = getQParamInt("outputmode", 0); var showall = getQParamInt("showall", 0) == 1; %>
<% FCLTHeader.Generate({outputmode: outputmode}); %>
<% var sql = " SELECT m.mld_adres_key, " + " m.mld_adres_naam, " + " m.mld_adres_bezoek_adres, " + " m.mld_adres_bezoek_postcode, " + " m.mld_adres_bezoek_plaats, " + " m.mld_adres_post_adres, " + " m.mld_adres_post_postcode, " + " m.mld_adres_post_plaats, " + " m.mld_adres_bezoek_land, " + " m.mld_adres_post_land, " + " m.mld_adres_telefoon, " + " m.mld_adres_email, " + " l.alg_locatie_omschrijving " + " FROM mld_adres m, alg_locatie l " + " WHERE l.alg_locatie_key(+) = m.alg_locatie_key AND m.mld_adres_verwijder IS NULL " + (authparams.ALGreadlevel > -1 ? " AND l.alg_locatie_key IN (SELECT alg_locatie_key FROM fac_v_my_locations" + " WHERE prs_perslid_key = " + user_key + " AND niveau=" + authparams.ALGreadlevel + ")" : ""); if (adressName != "") sql+= " AND m.mld_adres_upper LIKE " + safe.quoted_sql_wild(adressName + "%"); if (locatiekey != -1) sql+= " AND l.alg_locatie_key = " + locatiekey; else if (districtkey != -1) sql+= " AND l.alg_district_key = " + districtkey; if (bezoekPostcode != "") sql+= " AND UPPER(m.mld_adres_bezoek_postcode) LIKE " + safe.quoted_sql_wild(bezoekPostcode + "%"); if (bezoekPlaats != "") sql+= " AND UPPER(m.mld_adres_bezoek_plaats) LIKE " + safe.quoted_sql_wild(bezoekPlaats + "%"); sql+= " ORDER BY UPPER (m.mld_adres_naam)"; var addurl = "appl/fac/fac_adres.asp"; var rst = new ResultsetTable({ sql: sql, ID: "adrestable", keyColumn: "mld_adres_key", outputmode: outputmode, showAll: showall, buttons: [{icon: "fa-plus", title: L("lcl_add"), action: "FcltMgr.openDetail('" + addurl + "', '" + safe.jsstring(L("lcl_add")) + "')"}] }); rst.addColumn(new Column({caption: L("lcl_prs_address_naam"), content: "mld_adres_naam"})); rst.addColumn(new Column({caption: L("lcl_prs_address_bezoek_adres"), content: "mld_adres_bezoek_adres"})); rst.addColumn(new Column({caption: L("lcl_prs_address_bezoek_postcode"), content: "mld_adres_bezoek_postcode"})); rst.addColumn(new Column({caption: L("lcl_prs_address_bezoek_plaats"), content: "mld_adres_bezoek_plaats"})); rst.addColumn(new Column({caption: L("lcl_estate_locatie_man_descr"), content: "alg_locatie_omschrijving"})); rst.addColumn(new Column({caption: L("lcl_prs_address_bezoek_land"), content: "mld_adres_bezoek_land", purpose: PRINTING_ONLY})); rst.addColumn(new Column({caption: L("lcl_prs_address_post_adres"), content: "mld_adres_post_adres", purpose: PRINTING_ONLY})); rst.addColumn(new Column({caption: L("lcl_prs_address_post_postcode"), content: "mld_adres_post_postcode", purpose: PRINTING_ONLY})); rst.addColumn(new Column({caption: L("lcl_prs_address_post_plaats"), content: "mld_adres_post_plaats", purpose: PRINTING_ONLY})); rst.addColumn(new Column({caption: L("lcl_prs_address_post_land"), content: "mld_adres_post_land", purpose: PRINTING_ONLY})); rst.addColumn(new Column({caption: L("lcl_prs_address_phone"), content: "mld_adres_telefoon", purpose: PRINTING_ONLY})); rst.addColumn(new Column({caption: L("lcl_prs_address_email"), content: "mld_adres_email", purpose: PRINTING_ONLY})); rst.addAction({action: "adresedit", caption: L("lcl_edit"), isDefault: true}); rst.processResultset(); %>
<% ASPPAGE_END(); %>