190 lines
7.5 KiB
Plaintext
190 lines
7.5 KiB
Plaintext
<%@language = "javascript" %>
|
|
<%
|
|
/* $Revision$
|
|
$Id$
|
|
|
|
File: alg_shwo_locatie.asp
|
|
Description: show de details van een locatie
|
|
Parameters: loc_key
|
|
|
|
|
|
Context:
|
|
Note:
|
|
|
|
*/ %>
|
|
<!-- #include file="../Shared/common.inc" -->
|
|
<!-- #include file="../Shared/iface.inc" -->
|
|
<!-- #include file="../Shared/plaatsselector.inc" -->
|
|
<!-- #include file="alg_flexkenmerk.inc" -->
|
|
<!-- #include file="alg.inc" -->
|
|
|
|
<%
|
|
FCLTHeader.Requires({plugins:["jQuery"], js: []})
|
|
|
|
var ins_score_enabled = S("ins_score_enabled") == 1;
|
|
var loc_key = getQParamInt("loc_key");
|
|
var onrgoedlvl = "L";
|
|
var this_alg = alg.func_enabled(loc_key, onrgoedlvl);
|
|
user.auth_required_or_abort(this_alg.readman || this_alg.readuse);
|
|
|
|
var sql = "SELECT *"
|
|
+ " FROM alg_locatie"
|
|
+ " WHERE alg_locatie_key = " + loc_key;
|
|
var oRs = Oracle.Execute(sql);
|
|
var loc_code = oRs("alg_locatie_code").Value;
|
|
var loc_naam = oRs("alg_locatie_omschrijving").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 loc_image = oRs("alg_locatie_image").Value;
|
|
var loc_score1 = oRs("alg_locatie_mjb_score1").Value;
|
|
var pst_adres = oRs("alg_locatie_post_adres").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 vervaldatum = oRs("alg_locatie_vervaldatum").Value;
|
|
var dienstniveau_key = oRs("mld_dienstniveau_key").Value;
|
|
oRs.Close();
|
|
%>
|
|
<html>
|
|
<head>
|
|
<% FCLTHeader.Generate(); %>
|
|
<script type="text/javascript" >
|
|
$(function()
|
|
{
|
|
$('textarea').resize(function () { FcltMgr.resized(window) } );
|
|
$('textarea').autogrow();
|
|
});
|
|
|
|
function alg_showphotos()
|
|
{
|
|
FcltMgr.openDetail("appl/shared/show_foto.asp?urole=bo&loc_key=<%=loc_key%>", "<%=L("lcl_photos")%>");
|
|
}
|
|
|
|
function loc_change()
|
|
{
|
|
if (FcltMgr.startEdit(window))
|
|
window.location.href = "alg_edit_locatie.asp?loc_key=<%=loc_key%>"
|
|
}
|
|
|
|
function loc_delete()
|
|
{
|
|
FcltMgr.confirm(L("lcl_alg_del_txt_locatie"), function() {
|
|
var data = {
|
|
key: <%=loc_key%>,
|
|
level: "L"
|
|
};
|
|
<% protectRequest.dataToken("data"); %>
|
|
$.post("alg_delete.asp",
|
|
data,
|
|
FcltCallbackClose,
|
|
"json");
|
|
});
|
|
}
|
|
<% if (S("alg_fg_remote_maps") != "" && loc_x && loc_y) { %>
|
|
function openMaps(locKey)
|
|
{
|
|
FcltMgr.windowopen('../cad/ShowGoogleMap.asp?loc_key=' + locKey, 'FGShow',
|
|
"width=800, height=600, directories=no, location=no, menubar=no,"
|
|
+ "resizable=yes, status=no, titlebar=yes, toolbar=no");
|
|
return;
|
|
}
|
|
<% } %>
|
|
</script>
|
|
</head>
|
|
|
|
<body id="showbody">
|
|
<% var buttons = [];
|
|
buttons.push({title: L("lcl_photos"), icon: "camera.png", action: "alg_showphotos()"});
|
|
|
|
if (S("alg_fg_remote_maps") != "" && loc_x && loc_y) {
|
|
buttons.push({title: L("lcl_maps"), action:"openMaps("+loc_key+")", icon: "map.png" });
|
|
}
|
|
|
|
if (!loc_deleted)
|
|
{
|
|
if (this_alg.writeman || this_alg.writeuse)
|
|
buttons.push({title: L("lcl_change"), action: "loc_change()", icon: "wijzigen.png"});
|
|
if (this_alg.writeman) // ALGMAN nodig
|
|
buttons.push({title: L("lcl_delete"), action: "loc_delete()", icon: "delete.png"});
|
|
}
|
|
|
|
IFRAMER_HEADER(L("lcl_alg_locatie_frame"), buttons);
|
|
%>
|
|
<div id="show">
|
|
<% if (loc_deleted)
|
|
{
|
|
%> <div class="alg_deleted"><%=L("lcl_record_is_deleted")%></div><%
|
|
}
|
|
%>
|
|
<form name=u2 onSubmit="return false;">
|
|
<% BLOCK_START("algLoc1", " ");
|
|
FCLTplaatsselector(-1,
|
|
{ locatiekey: loc_key,
|
|
startlevel: 1, //District
|
|
eindlevel: 2, // Locatie
|
|
readonly: true });
|
|
|
|
params = { infoPointer: { Url: "appl/shared/status_info.asp?loc_key=" + loc_key,
|
|
Title: L("lcl_status_details") + " " + loc_naam
|
|
}
|
|
};
|
|
ROFIELDTR("fld", L("lcl_estate_locatie_man_code"), loc_code, params);
|
|
ROFIELDTR("fld", L("lcl_prs_address_bezoek_adres"), bez_adres, {suppressEmpty: true});
|
|
ROFIELDTR("fld", L("lcl_prs_address_bezoek_postcode"), bez_postc, {suppressEmpty: true});
|
|
ROFIELDTR("fld", L("lcl_prs_address_bezoek_plaats"), bez_plaats, {suppressEmpty: true});
|
|
ROFIELDTR("fld", L("lcl_prs_address_bezoek_land"), bez_land, {suppressEmpty: true});
|
|
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;
|
|
oRs = Oracle.Execute(sql);
|
|
ROFIELDTR("fld", L("lcl_mld_dienst_niveau"), oRs("mld_dienstniveau_omschr").Value);
|
|
oRs.Close();
|
|
}
|
|
ROFIELDTR("fld", L("lcl_geoxcoord"), loc_x, {suppressEmpty: true});
|
|
ROFIELDTR("fld", L("lcl_geoycoord"), loc_y, {suppressEmpty: true});
|
|
|
|
BLOCK_END();
|
|
BLOCK_START("algLoc2", " ");
|
|
|
|
var fldcls = "fld";
|
|
if (vervaldatum <= new Date())
|
|
fldcls += " expired2";
|
|
ROFIELDTR(fldcls, L("lcl_alg_vervaldatum"), toDateString(vervaldatum), {suppressEmpty: true});
|
|
ROFIELDTR("fld", L("lcl_prs_address_post_adres"), pst_adres, {suppressEmpty: true});
|
|
ROFIELDTR("fld", L("lcl_prs_address_post_postcode"), pst_postc, {suppressEmpty: true});
|
|
ROFIELDTR("fld", L("lcl_prs_address_post_plaats"), pst_plaats, {suppressEmpty: true});
|
|
ROFIELDTR("fld", L("lcl_prs_address_post_land"), pst_land, {suppressEmpty: true});
|
|
ROFIELDTR("fld", L("lcl_estate_locatie_man_verantw"), loc_vw, {suppressEmpty: true});
|
|
ROFIELDTR("fld", L("lcl_estate_locatie_man_verantw_tel"), loc_vwtel, {suppressEmpty: true});
|
|
ROFIELDTR("fld", L("lcl_noti_email"), loc_mail, { suppressEmpty: true, type: "email" });
|
|
ROFIELDTR("fld", L("lcl_alg_locatie_image"), loc_image, { suppressEmpty: true });
|
|
if (ins_score_enabled)
|
|
ROFIELDTR("fld", L("lcl_alg_locatie_mjb_score1"), loc_score1, {suppressEmpty: true});
|
|
|
|
BLOCK_END();
|
|
|
|
generateFlexKenmerkBlock ({onrgoed_key : loc_key,
|
|
onrgoed_niveau : onrgoedlvl,
|
|
reado : true,
|
|
flexcolumns : S("alg_flexcolumns"),
|
|
this_alg : this_alg });
|
|
|
|
%>
|
|
</form>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
<% ASPPAGE_END(); %>
|