<?php
/**
 *  Copyright (C) 2021  Double Bastion LLC
 *
 *  This file is part of Roundpin, which is licensed under the
 *  GNU Affero General Public License Version 3.0. The license terms
 *  are detailed in the "LICENSE.txt" file located in the root directory.
 *
 *  This is a modified version of the original file "index.html",
 *  first modified in 2020. The copyright notice for the original
 *  content follows:
 *
 *  Copyright (c) 2020  - Conrad de Wet - All Rights Reserved.
 *  License: GNU Lesser General Public License v3.0
 */

session_start();

if ($_SESSION['loggedtoroundpin'] == true) {

?>

<script type="text/javascript">
    let validateSToken = "<?php print_r($_SESSION['validate_s_access']); ?>";
    let userName = "<?php print_r($_SESSION['loginname']); ?>";
</script>

<!DOCTYPE html>
<html>
    <head>
        <title>Roundpin</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta http-equiv="X-UA-Compatible" content="IE=edge"/>

        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"/>
        <meta name="HandheldFriendly" content="true">

        <meta name="format-detection" content="telephone=no"/>

        <meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE"/>
        <meta name="apple-mobile-web-app-capabale" content="yes"/>

        <meta http-equiv="Pragma" content="no-cache"/>
        <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
        <meta http-equiv="Expires" content="0"/>

        <link rel="shortcut icon" type="image/svg" href="images/favicon.svg" />

        <link rel="stylesheet" type="text/css" href="css/normalize-v8.0.1.min.css"/>
        <link rel="stylesheet" type="text/css" href="css/inter.min.css"/>
        <link rel="stylesheet" type="text/css" href="fonts/font-awesome-4.7.0/css/font-awesome.min.css"/>
        <link rel="stylesheet" type="text/css" href="css/croppie.min.css"/>
        <link rel="stylesheet" type="text/css" href="css/jeegoo-1.0.0.min.css"/>
        <link rel="stylesheet" type="text/css" href="css/phone.min.css"/>

        <script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
        <script type="text/javascript" src="js/Chart.bundle-2.7.2.min.js"></script>
        <script type="text/javascript" src="js/sip-0.11.6.min.js"></script>
        <script type="text/javascript" src="js/fabric-2.4.6.min.js"></script>
        <script type="text/javascript" src="js/moment-with-locales-2.24.0.min.js"></script>
        <script type="text/javascript" src="js/croppie-2.6.4.min.js"></script>
        <script type="text/javascript" src="js/jquery.jeegoopopup.1.0.0.min.js"></script>
        <script type="text/javascript" src="js/crypto-js-4.1.1.min.js"></script>
        <script type="text/javascript" src="js/jsencrypt.min.js"></script>

        <script type="text/javascript">

            var web_hook_on_transportError = function(t, ua){
              //  console.warn("web_hook_on_transportError",t, ua);
            }
            var web_hook_on_register = function(ua){
              //  console.warn("web_hook_on_register", ua);
            }
            var web_hook_on_registrationFailed = function(e){
              //  console.warn("web_hook_on_registrationFailed", e);
            }
            var web_hook_on_unregistered = function(){
              //  console.warn("web_hook_on_unregistered");
            }
            var web_hook_on_invite = function(session){
              //  console.warn("web_hook_on_invite", session);
            }
            var web_hook_on_message = function(message){
              //  console.warn("web_hook_on_message", message);
            }
            var web_hook_on_modify = function(action, session){
              //  console.warn("web_hook_on_modify", action, session);
            }
            var web_hook_on_dtmf = function(item, session){
              //  console.warn("web_hook_on_dtmf", item, session);
            }
            var web_hook_on_terminate = function(session){
              //  console.warn("web_hook_on_terminate", session);
            }
        </script>
        <script type="text/javascript" src="js/phone.min.js"></script>
    </head>
    <body onbeforeunload="return closeVideoConfTab()">
        <div id=Phone></div>
    </body>
</html>

<?php

} else {
     header("Location: roundpin-login.php");
}

?>
