<%@ 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
        res_ruimte_naam: the name of the res room. Optional parameter
        refreshrate:     the time the report is refreshed in seconds. Optional parameter
    Context:
    Note:               Sample gejat van AAES.
*/
%>
<!-- #include file="../../../appl/Shared/common.inc" -->
<html>
<head>
<%  FCLTHeader.Generate(); %>
<%
  // specific params needed to find the alg_ruimte_key
  var res_ruimte_naam  = getQParam("res_ruimte_naam", "leeg");
  var alg_ruimte_key   = getQParamInt("alg_ruimte_key", -1);

  if (alg_ruimte_key == -1 )
  {
     // find the key of the alg_ruimte
     sql = "SELECT alg_ruimte_key"
         + " FROM res_alg_ruimte rar, res_ruimte rr"
         + " WHERE UPPER(res_ruimte_nr) = UPPER(" + safe.quoted_sql(res_ruimte_naam) + ")"
         + "   AND rr.res_ruimte_key = rar.res_ruimte_key"
         + "   AND rar.res_alg_ruimte_verwijder IS NULL"
         + " ORDER BY alg_ruimte_key DESC";
      
     oRs = Oracle.Execute(sql);
     if (!oRs.eof) {
       alg_ruimte_key = oRs(0).value;
     }
  }
%>
</head>
<body leftmargin=0 topmargin=0">
  <% if (alg_ruimte_key != -1) { %>
    <div align=right><img width=200px src="../../../appl/shared/qrcode.asp?text=/default.asp?u=HUxBHuBjEmjbUQHW%26alg_ruimte_key=<%=alg_ruimte_key%>"/></div>
  <% } %>
</body>
</html>
