<%@ language = "JavaScript" %>
<%
/*
    $Revision$
    $Id$
    File:               infobord.asp
    Description:        A deeplink call to display information on the infobord
    Parameters:
        locatie_code:    the code of the location. Optional parameter
        gebouw_code:     the code of the building. Optional parameter
        verdieping_code: the code of the floor. Optional parameter
        refreshrate:     the time the report is refreshed in seconds. Optional parameter
    Context:
    Note:       UWVA#19622, sample gejat van RWSN, moet bij goedkeuring wellicht anders.
*/
  Session("customerId") = 'UWVA';
%>
<!-- #include file="../../../appl/Shared/common.inc" -->
<html>
<head>
<%  FCLTHeader.Generate(); %>
<%
  // specific params needed to find the reservation which has to be deleted
  var refreshrate      = getQParamInt("refreshrate", -1);
  var locatie_code     = getQParam("locatie_code", "leeg");
  var gebouw_code      = getQParam("gebouw_code", "leeg");
  var verdieping_code  = getQParam("verdieping_code", "leeg");

  var params = "";
  if (locatie_code != "leeg") {
    params += "&fclt_f_colname1=locatie_code&fclt_f_colvalue1=" + safe.url(locatie_code);
  }
  if (gebouw_code != "leeg") {
    params += "&fclt_f_colname2=gebouw_code&fclt_f_colvalue2=" + safe.url(gebouw_code);
    if (verdieping_code != "leeg") {
      params += "&fclt_f_colname3=verdieping_code&fclt_f_colvalue3=" + safe.url(verdieping_code);
    }
  }

  // find the key of the usr_report
  var fac_usrrap_key = -1;
  sql = "SELECT fac_usrrap_key"
      + " FROM fac_usrrap ur"
      + " WHERE UPPER(fac_usrrap_view_name) = 'UWVA_V_RAP_RES_INFOBORD'";
  oRs = Oracle.Execute(sql);
  if (!oRs.eof) {
    fac_usrrap_key = oRs(0).value;
  }
%>
</head>
<body leftmargin=0 topmargin=0 onLoad="Loaded();">
<script language="javascript">
  function Loaded()
  {
<%  if (fac_usrrap_key == -1) { %>
      alert ("rapport kan niet gevonden worden");
<%  } else { %>
        var s = "../../../appl/fac/fac_usrrap_infobord.asp?rap_key=<%=fac_usrrap_key%><%=params%>&refreshrate=<%=refreshrate%>";
        window.location.href = s;
<%  } %>
  }
</script>
</body>
