<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site2.master.cs" Inherits="SurePassAdmin.Site2" %>

<%@ Import Namespace="SurePassAdmin" %>
<%@ Import Namespace="SurePassClassLib" %>
<%@ Import Namespace="SurePassClassLib.Configuration" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>SurePass Authentication :: Home</title>
    <link href="css/tab_styles.css" rel="stylesheet" type="text/css" />
    <link href="css/masterpage.css" rel="stylesheet" type="text/css" />
    <link href="css/jquery.toast.min.css" rel="stylesheet" type="text/css" />
    <link id="PageTitleIcon" rel="icon" type="image/png" href="https://www.surepassid.com/favicon.ico" />
    <link rel="icon" href="images/browser_page_tab.png" sizes="192x192" />
</head>
   
<body>
    <!-- Load jQuery first -->
    <script src="<%= WebUtil.GetFileWithVersion("scripts/jquery-3.6.0.min.js") %>" type="text/javascript"></script>
    
    <!-- Load Chart.js UMD library for offline charts -->
    <script src="<%= WebUtil.GetFileWithVersion("scripts/chart.umd.js") %>" type="text/javascript"></script>
    
    <!-- Load other scripts -->
    <script src="<%= WebUtil.GetFileWithVersion("scripts/jquery.toast.min.js") %>" type="text/javascript"></script>
    <script src="<%= WebUtil.GetFileWithVersion("scripts/spfido.js") %>" type="text/javascript"></script>
    <script src="<%= WebUtil.GetFileWithVersion("scripts/spWebAuthn.js") %>" type="text/javascript"></script>
    <script src="<%= WebUtil.GetFileWithVersion("scripts/toast.js") %>" type="text/javascript"></script>
    <script src="<%= WebUtil.GetFileWithVersion("scripts/u2f-api.js") %>" type="text/javascript"></script>
    <script src="<%= WebUtil.GetFileWithVersion("scripts/util.js") %>" type="text/javascript"></script>
    
    <!-- Load our custom chart.js last -->
    <script src="<%= WebUtil.GetFileWithVersion("scripts/chart.js") %>" type="text/javascript"></script>

    <div style="width: 100%; text-align: center">
        <div id="mainPageContainer">
            <div class="master-headerbar">
   
                <div class="master-headeritem" dropdown>
                     <button class="dropbtn" onclick="window.open('https://surepassid.com', '_blank')" runat="server" >SurePassID Admin Console</button>
                </div>
                <div class="master-headeritem-right dropdown">
                    <button class="dropbtn" id="MasterLogout" runat="server"><img src="images/icons-mini/exit.png" class="master-headeritem-image" alt="Sign out"  runat="server" />&nbsp;Sign out</button>
                </div>
                <div class="master-headeritem-right dropdown">
                    <button class="dropbtn" id="MasterSettings" runat="server"><img src="images/icons-mini/options.png" class="master-headeritem-image" alt="Settings" />&nbsp;Settings</button>
                </div>
                <div class="master-headeritem-right dropdown">
                    <button class="dropbtn" id="MasterMySettings" runat="server"><img src="images/icons-mini/Person.png" class="master-headeritem-image" alt="User"  />&nbsp;</button>
                </div>
   
            </div>
           <br/>
            <script type="text/javascript" src="scripts/tabs.js"></script>
            <script type="text/javascript">
                // Configuration variables for charts
                var ServerExternalNetworksProhibited = <%= SurePassConfiguration.GetConfigParameterBool("Server.ExternalNetworksProhibited", false).ToString().ToLower() %>;
                var ChartsUseOfflineMode = <%= SurePassConfiguration.GetConfigParameterBool("Charts.UseOfflineMode", false).ToString().ToLower() %>;
                
                function createTabs() {
                    var aTabs = new Array(5);
                    var nTabs = 0;
                    var bselected;
                    if ('<%=TabName%>' == '<%=SurePassAdmin.NavigationTabs.m_HomeTab%>') {
                        bselected = true;
                    } else {
                        bselected = false;
                    }
                    aTabs[nTabs] = new TieraTabItem("<%=SurePassAdmin.NavigationTabs.m_HomeTab%>", "<%=UrlPrefix%>home.aspx", bselected);
                    nTabs++;
                    if ('<%=UserRole%>' == '<%=SurePassClassLib.Enums.AdminRoleEnum.SuperAdministrator%>') {
                        if ('<%=TabName%>' == '<%=SurePassAdmin.NavigationTabs.m_ClientTab%>') {
                            bselected = true;
                        } else {
                            bselected = false;
                        }
                        aTabs[nTabs] = new TieraTabItem("<%=SurePassAdmin.NavigationTabs.m_ClientTab%>", "<%=UrlPrefix%>clients.aspx", bselected);
                        nTabs++;

                        //if ('<%=TabName%>' == '<%=SurePassAdmin.NavigationTabs.m_SystemUserTab%>') {bselected = true;} else {bselected = false;}
                        //aTabs[nTabs] = new TieraTabItem("<%=SurePassAdmin.NavigationTabs.m_SystemUserTab%>", "<%=UrlPrefix%>users.aspx", bselected); 
                        //nTabs++; 
                    }

                    if ('<%=TabName%>' == '<%=SurePassAdmin.NavigationTabs.m_PartnerUserTab%>') {
                        bselected = true;
                    } else {
                        bselected = false;
                    }
                    aTabs[nTabs] = new TieraTabItem("<%=SurePassAdmin.NavigationTabs.m_PartnerUserTab%>", "<%=UrlPrefix%>partnerusers.aspx", bselected);
                    nTabs++;
                    if ('<%=UserRole%>' == '<%=SurePassClassLib.Enums.AdminRoleEnum.SuperAdministrator%>' || '<%=UserRole%>' == '<%=SurePassClassLib.Enums.AdminRoleEnum.Administrator%>') {
                    //        if ('<%=TabName%>' == '<%=SurePassAdmin.NavigationTabs.m_GroupTab%>') { bselected = true; } else { bselected = false; }
                    //        aTabs[nTabs] = new TieraTabItem("<%=SurePassAdmin.NavigationTabs.m_GroupTab%>", "<%=UrlPrefix%>groups.aspx", bselected);
                        //        nTabs++; 
                        if ('<%=TabName%>' == '<%=SurePassAdmin.NavigationTabs.m_DeviceTab%>') {
                            bselected = true;
                        } else {
                            bselected = false;
                        }
                        aTabs[nTabs] = new TieraTabItem("<%=SurePassAdmin.NavigationTabs.m_DeviceTab%>", "<%=UrlPrefix%>devices.aspx", bselected);
                        nTabs++;

                        if ('<%=TabName%>' == '<%=SurePassAdmin.NavigationTabs.m_AuditTab%>') {
                            bselected = true;
                        } else {
                            bselected = false;
                        }
                        aTabs[nTabs] = new TieraTabItem("<%=SurePassAdmin.NavigationTabs.m_AuditTab%>", "<%=UrlPrefix%>audit.aspx", bselected);
                        nTabs++;

                        if ('<%=TabName%>' == '<%=SurePassAdmin.NavigationTabs.m_SSOTab%>') {
                            bselected = true;
                        } else {
                            bselected = false;
                        }
                        aTabs[nTabs] = new TieraTabItem("<%=SurePassAdmin.NavigationTabs.m_SSOTab%>", "<%=UrlPrefix%>clientcustomizesso.aspx", bselected);
                        nTabs++;
                    }

                    aTabs.length = nTabs;

                    var tabs = new TieraTabs(aTabs);
                }
            </script>

            <div id="navTabs">
                <script type="text/javascript">
                    createTabs();
                </script>
            </div>
            <div id="redbar"></div>
            <div id="submenu">
                <div id="submenu_line">
                    <%CreateSubMenu();%>
                </div>
            </div>
            <div id="thinredbar">
            </div>
            <div style="height: 5px;">&nbsp;</div>
            <div>
                <asp:PlaceHolder ID="ErrorMsgBox" runat="server"></asp:PlaceHolder>
            </div>
            <div style="height: 5px;">&nbsp;</div>
            <div>
                <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
                </asp:ContentPlaceHolder>
            </div>
            <div style="height: 5px;"></div>
            <br />
            <div align="center" class="copyrightnoborder">
                Support Options:&nbsp; <a  class="copyrightnoborderlink" href="contactsupport.aspx">Send Email</a>
                | 
                &nbsp;Call:&nbsp;<asp:Label EnableTheming="false" ID="lblSupportContactPhone" runat="server" Text="+1 (888) 200-8144"></asp:Label>&nbsp;
                | 
                &nbsp;<asp:Label EnableTheming="false" ID="lblBuild" runat="server" Text=""></asp:Label>FIPS 140-2 Compliant Mode
            </div>
            <div>
                <div align="center" class="copyrightnoborder">
                    <asp:Label runat="server" EnableTheming="false" ID="lblCopy" Text="&copy; 1999-2014 SurePassId Corp. All rights reserved." />
                    

            </div>
        </div>
    </div>
    </div>
</body>
</html>
