<%@ language = "JavaScript" %>
<% /*
     $Revision$
     $Id$

     File:    pda/facilitor.asp
              The content panel of the Facilitor Mobile portal page
     Status:  Gereed
     Context: redirected from /default.asp if mobile device is detected.
     Parameters: -

     - het menu toont die opties waarvoor user_key geautoriseerd is.

*/
%>
<!-- #include file="../Shared/common.inc" -->
<!-- #include file="./resultset_table.inc" -->
<!-- #include file="../aut/login.inc" -->
<!-- #include file="../FAC/fac.inc" -->
<!-- #include file="../FAC/fac_menu.inc" -->
<!-- #include file="../prs/prs.inc" -->
<!-- #include file="./mobile.inc" -->
<!-- #include file="./iface.inc" -->
<!-- #include file="./portalnews.inc" -->
<!-- #include file="./fac_list.inc" -->
<html>
<head>
<%

if (user.isGroupedUser() || Session("login_by_fallback"))
{
    doLogoff(); // Niets te zoeken hier
    shared.simpel_page(L("lcl_no_auth"));
}

if (!CurrentPosition && S("mobile_position_required") == 1)
{
    // Eerst de huidige locatie aangeven voordat het menu getoond wordt.
    Response.Redirect('setlocation.asp');
}

FCLTMHeader.Generate({});
var thisUser = prs.prs_perslid(user_key, { withPhoto: true });

%>
    <link rel="shortcut icon"                    href="<%=rooturl + "/" + S("fac_favicon_folder")%>/favicon.ico">
    <link rel="apple-touch-icon"                 href="<%=rooturl + "/" + S("fac_favicon_folder")%>/Icon-60@2x.png">
    <link rel="apple-touch-icon" sizes="180x180" href="<%=rooturl + "/" + S("fac_favicon_folder")%>/Icon-60@3x.png">
    <link rel="apple-touch-icon" sizes="152x152" href="<%=rooturl + "/" + S("fac_favicon_folder")%>/Icon-76@2x.png">
</head>
<body>
<%
    PAGE_START({ "pclass": "main", "headerImage": true });
    HEADER({
        bigtitle: true,
        title: L("lcl_mobile_title"),
        home: false,
        back: false,
        search: true,
        theme: true
    });
    CONTENT_START();

%>  <section><%
    var pmode = Session("app_build") ? 5 : 4;
    generateMenu(pmode);
%>  </section><%

    portalnews(user.alg_locatie_key({withcurrent: true}), user.alg_gebouw_key({withcurrent: true}), 1, 1);

    fac_list(0);
    fac_list(1);

    CONTENT_END();
    FOOTER({ mswitch: true, banner: true, nousername: true, thisuser: thisUser });
    PAGE_END()
    // Hidden feature: tripple klik op de FACILITOR onderin de voorpagina voor environment-info
%>
<script>
    $("#fbanner").on("click", function (evt) {
        if (evt.originalEvent && evt.originalEvent.detail === 3) {
            alert("<%= safe.jsstring("{0}\n{1}\n{2} ({3})".format(customerId, HTTP.urlzelf(), user.naam(), user_key)) %>");
        }
    });
</script>
<% PDA_PAGE_END(); %>
	</body>
</html>
<% ASPPAGE_END(); %>
