<%@language="javascript"%>

<!-- #include file="../Shared/common.inc" -->
<!-- #include file="./mobile.inc" -->
<!-- #include file="./iface.inc" -->
<%
var message_key = getQParamInt("msg_key");
%>
<html>
  <head>
<% FCLTMHeader.Generate({}); %>
  </head>
  <body>
<%
  var sql = "SELECT m.prs_perslid_key"
          + "     , m.msg_message_oms"
          + "     , m.msg_message_aanmaak"
          + "     , m.msg_message_onderwerp"
          + "     , pf.prs_perslid_naam_friendly"
          + "  FROM msg_message m, prs_v_perslid_fullnames_all pf"
          + " WHERE m.msg_message_key = " + message_key
          + "   AND m.prs_perslid_key = pf.prs_perslid_key";
  oRs = Oracle.Execute(sql);
  var title     = oRs("msg_message_onderwerp").value;
  var msg_date  = new Date(oRs("msg_message_aanmaak").value);
  var content   = oRs("msg_message_oms").value;
  var sender    = oRs("prs_perslid_naam_friendly").value;
  oRs.Close();

  PAGE_START();
  HEADER({title: L("lcl_mes_message"), back: true});

  CONTENT_START();
    ROFIELD("fld", L("lcl_mes_subject"), title);
    ROFIELD("fld", L("lcl_message"), content, {multi: true});
    ROFIELD("fld", L("lcl_from"), sender);
    ROFIELD("flddate", L("lcl_date"), toDateTimeString(msg_date));
  CONTENT_END();

  FOOTER();
  PAGE_END();
PDA_PAGE_END(); %>
	</body>
</html>
<% ASPPAGE_END(); %>