<%@ language = "JavaScript" %> <% /* $Revision$ $Id$ File: pda/locatie.asp Locatiedetails+vervolgfuncties Context: vanaf smartphone-locatielijst of direct via een QRC Parameters: locatie_key/loc_key currentlocation=1 to select current location */ %> <% // locatie_key evt via handmatige parameter (of menuitem) // en loc_key via plaatsselector (van locatie_list.asp) var loc_key = getQParamInt("locatie_key", getQParamInt("loc_key", -1)); var defaulttocurrentloc = getQParamInt("currentlocation", 0) == 1; if (loc_key == -1 && defaulttocurrentloc) loc_key = user.alg_locatie_key({withcurrent:true}); // Eerst een locatie uitzoeken if (loc_key == -1) Server.Transfer("locatie_list.asp"); // Authorisatie var onrgoedlvl = "L"; var this_alg = alg.func_enabled(loc_key, onrgoedlvl); user.auth_required_or_abort(this_alg.readman || this_alg.readuse); var qrc = getQParamInt("qrc", 0) != 0; var tiny = getQParamInt("tiny", 0) != 0; var transitParam = buildTransitParam(["qrc", "tiny"]); var sql = "SELECT alg_locatie_code," + " alg_locatie_adres," + " alg_locatie_postcode," + " alg_locatie_plaats," + " alg_locatie_land," + " alg_locatie_verantw," + " alg_locatie_verantw_tel," + " alg_locatie_x," + " alg_locatie_y," + " alg_locatie_email," + " alg_locatie_post_postcode," + " alg_locatie_post_adres," + " alg_locatie_post_plaats," + " alg_locatie_post_land," + " alg_locatie_verwijder," + " mld_dienstniveau_key," + " alg_locatie_vervaldatum," + " alg_locatie_image" + " FROM alg_locatie" + " WHERE alg_locatie_key = " + loc_key; var oRs = Oracle.Execute(sql); var loc_code = oRs("alg_locatie_code").value; var bez_adres = oRs("alg_locatie_adres").value; var bez_postc = oRs("alg_locatie_postcode").value; var bez_plaats = oRs("alg_locatie_plaats").value var bez_land = oRs("alg_locatie_land").value; var loc_vw = oRs("alg_locatie_verantw").value; var loc_vwtel = oRs("alg_locatie_verantw_tel").value; var loc_x = oRs("alg_locatie_x").value; var loc_y = oRs("alg_locatie_y").value; var loc_mail = oRs("alg_locatie_email").value; var pst_postc = oRs("alg_locatie_post_postcode").value; var pst_adres = oRs("alg_locatie_post_adres").value; var pst_plaats = oRs("alg_locatie_post_plaats").value; var pst_land = oRs("alg_locatie_post_land").value; var loc_deleted = oRs("alg_locatie_verwijder").value != null; var dienstniveau_key = oRs("mld_dienstniveau_key").value; var vervaldatum = oRs("alg_locatie_vervaldatum").Value; var image = oRs("alg_locatie_image").Value; oRs.Close(); %>
<% FCLTMHeader.Generate({title: loc_code}); %>
<% PAGE_START({ "headerImage": S("alg_image_path") + "locatie/" + image }); HEADER ({title: L("lcl_location")+ " " + loc_code, back:!qrc, home:!qrc}); CONTENT_START(); if (loc_deleted) { %>
<%=L("lcl_record_is_deleted")%>
<% } ROFIELD("fld", L("lcl_prs_address_bezoek_adres"), bez_adres, { suppressEmpty: true }); ROFIELD("fld", L("lcl_prs_address_bezoek_postcode"), bez_postc, { suppressEmpty: true }); ROFIELD("fld", L("lcl_prs_address_bezoek_plaats"), bez_plaats, { suppressEmpty: true }); ROFIELD("fld", L("lcl_prs_address_bezoek_land"), bez_land, { suppressEmpty: true }); ROFIELD("fldmailto details", L("lcl_alg_locatie_email"), loc_mail, { suppressEmpty: true, type: "email" }); ROFIELD("fld", L("lcl_estate_locatie_man_verantw"), loc_vw, { suppressEmpty: true }); ROFIELD("fld", L("lcl_estate_locatie_man_verantw_tel"), loc_vwtel, { suppressEmpty: true }); if (!tiny) { if (dienstniveau_key) { sql = "SELECT mld_dienstniveau_key, " + lcl.xsqla("mld_dienstniveau_omschr", "mld_dienstniveau_key") + " FROM mld_dienstniveau " + " WHERE mld_dienstniveau_key = " + dienstniveau_key; var toRs = Oracle.Execute(sql); ROFIELD("fld", L("lcl_mld_dienst_niveau"), toRs("mld_dienstniveau_omschr").value); toRs.Close(); } var fldcls = "fld"; if (vervaldatum <= new Date()) fldcls += " expired2"; ROFIELD(fldcls, L("lcl_alg_vervaldatum"), toDateString(vervaldatum), { suppressEmpty: true }); ROFIELD("fld", L("lcl_prs_address_post_adres"), pst_adres, { suppressEmpty: true }); ROFIELD("fld", L("lcl_prs_address_post_postcode"), pst_postc, { suppressEmpty: true }); ROFIELD("fld", L("lcl_prs_address_post_plaats"), pst_plaats, { suppressEmpty: true }); ROFIELD("fld", L("lcl_prs_address_post_land"), pst_land, { suppressEmpty: true }); ROFIELD("fld", L("lcl_geoxcoord"), loc_x, { suppressEmpty: true }); ROFIELD("fld", L("lcl_geoycoord"), loc_y, { suppressEmpty: true }); // Plus flexkenmerken generateFlexKenmerkBlock ({ onrgoed_key : loc_key, onrgoed_niveau : onrgoedlvl, reado : true, this_alg : this_alg, mobile : true }); } CONTROLGROUP_START(); var trackinglines = mobile.hastrackingpage("locatie", loc_key); if (trackinglines > 0 && !tiny) BUTTON(L("lcl_history")+" ({0})".format(trackinglines), {linkid: "#loc-2-"+loc_key, icon: "fa-list"}); var tsql = "SELECT COUNT(alg_gebouw_key), MAX(alg_gebouw_key)" + " FROM alg_gebouw" + " WHERE alg_gebouw_verwijder IS NULL" + " AND alg_locatie_key = " + loc_key; toRs = Oracle.Execute(tsql); if (toRs(0).Value == 1) { var gebouw_key = toRs(1).Value; BUTTON(L("lcl_mobile_gebouwen")+" (1)", {linkid: "gebouw.asp?bld_key=" + gebouw_key + transitParam, icon: "fa-info" }); } else if (toRs(0).Value > 1) { BUTTON(L("lcl_mobile_gebouwen")+" ({0})".format(toRs(0).value), {linkid: "gebouw_list.asp?loc_key=" + loc_key + transitParam, icon: "fa-info" }); } toRs.Close(); if (this_alg.canReadNotes) { BUTTON(L("lcl_alg_behandeling"), {linkid: rooturl + "/appl/pda/notitie.asp?node=locatie&key=" + loc_key + "&lvl=L", icon: "fa-comment" }); } CONTROLGROUP_END(); CONTENT_END(); FOOTER(); PAGE_END(); if (trackinglines>0) { PAGE_START({id: "loc-2-"+loc_key, dialog: true}) mobile.trackingpage('locatie', loc_key, loc_code); PAGE_END(); } PDA_PAGE_END(); %>
<% ASPPAGE_END(); %>