145 lines
5.0 KiB
Plaintext
145 lines
5.0 KiB
Plaintext
<%@language = "javascript" %>
|
|
<% /*
|
|
$Revision$
|
|
$Id$
|
|
|
|
File: ShowRoom.asp
|
|
Description: Toon een ruimte in plaatje
|
|
Parameters:
|
|
rKey ALG_RUIMTE.ALG_RUIMTE_KEY
|
|
vKey ALG_VERDIEPING.ALG_VERDIEPING_KEY
|
|
ins_key Een ins_deel. Ruimte wordt er bij gezocht
|
|
res_ruimte_key Een reserveerbare ruimte. Ruimte(s) worden er bij gezocht
|
|
Context:
|
|
Note: Als rKey niet is gegeven moet vKey gedefieerd zijn
|
|
anders wordt hij er wel bij gezocht.
|
|
*/
|
|
%>
|
|
<!--#include file='../Shared/common.inc'-->
|
|
<!--#include file='../CAD/FGII.inc'-->
|
|
<!--#include file="../SlnkDWF/Slnk2IMG.inc" -->
|
|
|
|
<%
|
|
FCLTHeader.Requires({ js: ["jquery.js"] });
|
|
|
|
var ins_key = getQParamInt("ins_key",-1); // optioneel object
|
|
var discArray = getQParamIntArray("disc_key",[]); // optionele disciplines aanzetten
|
|
|
|
if (ins_key > 0)
|
|
{
|
|
oRs = Oracle.Execute("SELECT ins_discipline_key" +
|
|
" FROM ins_deel" +
|
|
" WHERE ins_deel_key = " + ins_key);
|
|
discArray.push(oRs("ins_discipline_key").Value); // zou dubbel kunnen zijn
|
|
}
|
|
if (S("fg_publiclayers").length)
|
|
discArray = discArray.concat(S("fg_publiclayers"));
|
|
|
|
prKey = getQParamInt("rKey",-1);
|
|
rrkey = getQParamInt("res_ruimte_key",-1);
|
|
if (prKey>0)
|
|
{
|
|
oRs = Oracle.Execute("SELECT alg_verdieping_key FROM alg_ruimte WHERE alg_ruimte_key = " + prKey);
|
|
if (oRs.Eof)
|
|
{
|
|
Response.Write("Showrooms.asp internal error: Ruimte niet gevonden");
|
|
Response.End;
|
|
}
|
|
vKey = oRs("alg_verdieping_key").Value;
|
|
}
|
|
else if (rrkey > 0) // reserveerbare ruimte
|
|
{
|
|
var sql = "SELECT ar.alg_verdieping_key, ar.alg_ruimte_key"
|
|
+ " FROM res_alg_ruimte rar, alg_ruimte ar"
|
|
+ " WHERE res_ruimte_key = " + rrkey
|
|
+ " AND res_alg_ruimte_verwijder IS NULL"
|
|
+ " AND alg_ruimte_verwijder IS NULL"
|
|
+ " AND rar.alg_ruimte_key = ar.alg_ruimte_key";
|
|
var oRs = Oracle.Execute(sql);
|
|
vKey = oRs("alg_verdieping_key").Value;
|
|
prKeys = [];
|
|
while (!oRs.Eof)
|
|
{
|
|
prKeys.push(oRs("alg_ruimte_key").Value);
|
|
oRs.MoveNext();
|
|
}
|
|
prKey = prKeys.join(",");
|
|
}
|
|
else // vkey verplicht
|
|
{
|
|
vKey = getQParamInt("vKey");
|
|
}
|
|
|
|
oRs = Oracle.Execute("SELECT alg_locatie_code, alg_gebouw_upper, alg_verdieping_omschrijving" +
|
|
" FROM alg_v_verdieping_gegevens" +
|
|
" WHERE alg_verdieping_key = " + vKey);
|
|
var titel = L("lcl_graphics") + " " + oRs("alg_locatie_code").Value + "-"
|
|
+ oRs("alg_gebouw_upper").Value + "-"
|
|
+ oRs("alg_verdieping_omschrijving").Value
|
|
%>
|
|
<html>
|
|
<head>
|
|
<% FCLTHeader.Generate() %>
|
|
|
|
<script type="text/javascript">
|
|
function resizeIframes()
|
|
{
|
|
var height = parseInt(document.documentElement.clientHeight);
|
|
document.getElementById('MMap').style.height = (height) +"px";
|
|
};
|
|
function MMap_onClick(SlnkEvent)
|
|
{
|
|
return false; // Don't process
|
|
}
|
|
|
|
var params = "&vKey=<%=vKey%>&scenario_key=0"
|
|
+ "&highlight=<%=prKey%>&mode=<%=MODE_IN%>"
|
|
+ "&discs=<%=discArray.join(",")%>"
|
|
+ "&ins_key=<%=ins_key%>";
|
|
|
|
function onFullScreen()
|
|
{
|
|
var url = "./maximize.asp?x=x" + params;
|
|
var wnd = window.open(url,'FGShow',
|
|
"directories=no,location=no,menubar=no,"
|
|
+ "resizable=yes,status=no,titlebar=yes,toolbar=no");
|
|
wnd.focus();
|
|
FcltMgr.closeDetail(window); // zelf kunnen we nu wel dicht
|
|
}
|
|
function MMap_onMapperLoad(pSLNKEvent)
|
|
{
|
|
var ob = document.getElementById('MinMaxBtn');
|
|
ob.style.display = 'block'; // Zodat weer zichtbaar
|
|
ob.style.top = ($("#docBody").offset().top + 1) + "px";
|
|
}
|
|
|
|
function init()
|
|
{
|
|
MMap.Reset();
|
|
MMap.SetIMGGenerator("../CAD/mySlnk2IMG.asp");
|
|
MMap.SetCustomParameters(params)
|
|
MMap.SetLabelPosition(<%=S("fg_labelPosition")%>);
|
|
MMap.SetStyleSheet("<%=custpath%>/cust.css");
|
|
MMap.SetPaperColor(<%=S("fg_paperColor")%>);
|
|
MMap.Refresh(true); // Try to zoom extents
|
|
}
|
|
</script>
|
|
<title><%=titel%></title>
|
|
</head>
|
|
|
|
<body class='modal' id='docBody' onLoad='javascript:init();'>
|
|
<!-- ==========================
|
|
HET plaatje
|
|
============================ -->
|
|
<img onclick='javascript:onFullScreen()'
|
|
src="../Pictures/fullscreen.gif"
|
|
id='MinMaxBtn'
|
|
style="cursor:pointer;display:none;position:absolute;z-index:1;height:20px;width:20px;right:0;"
|
|
>
|
|
<iframe id="MMap" name="MMap" src="../SlnkDWF/ToonIMG.asp"
|
|
frameborder='0' framespacing='0' scrolling="no"
|
|
style="border:0" width="100%" height="96%" valign="center">
|
|
</iframe>
|
|
</body>
|
|
</html>
|