<script type="text/javascript" src="<?=VENDORS_ADMIN;?>jquery-3.2.1.min.js"></script>
<!--materialize js-->
<script type="text/javascript" src="<?=JS_ADMIN;?>materialize.min.js"></script>
<!--scrollbar-->
<script type="text/javascript" src="<?=VENDORS_ADMIN;?>perfect-scrollbar/perfect-scrollbar.min.js"></script>
<!-- chartjs -->
<script type="text/javascript" src="<?=VENDORS_ADMIN;?>chartjs/chart.min.js"></script>
<!-- sparkline -->
<script type="text/javascript" src="<?=VENDORS_ADMIN;?>sparkline/jquery.sparkline.min.js"></script>
<!-- google map api -->
<!--jvectormap-->
<script type="text/javascript" src="<?=VENDORS_ADMIN;?>jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
<script type="text/javascript" src="<?=VENDORS_ADMIN;?>jvectormap/jquery-jvectormap-world-mill-en.js"></script>
<script type="text/javascript" src="<?=VENDORS_ADMIN;?>jvectormap/vectormap-script.js"></script>
<!--google map-->

<!--plugins.js - Some Specific JS codes for Plugin Settings-->
<script type="text/javascript" src="<?=JS_ADMIN;?>plugins.js"></script>
<!--card-advanced.js - Page specific JS-->
<script type="text/javascript" src="<?=JS_ADMIN;?>scripts/dashboard-analytics.js"></script>
<!--custom-script.js - Add your own theme custom JS
    <script type="text/javascript" src="<?=JS_ADMIN;?>custom-script.js"></script>-->
<script src="<?=JS_ADMIN;?>vue.js"></script>
<script src="<?=JS_ADMIN;?>Chart.min.js"></script>
<script src="<?=JS_ADMIN;?>gauge.min.js"></script>
<script src="<?=JS_ADMIN;?>raphael.js"></script>
<script src="<?=JS_ADMIN;?>justgage.js"></script>
<script src="<?=LIB_JS;?>sweetalert2.js" type="text/javascript"></script>

<iframe id="televoxIframe" name="televoxIframe" height="900px" width="100%"></iframe>
<script>
function redirectPost(location, args,target)
{
        var form = '';
        $.each( args, function( key, value ) {
                value = value.split('"').join('\"')
                form += '<input type="hidden" name="'+key+'" value="'+value+'">';
        });
        $('<form target="'+target+'" action="' + location + '" method="POST">' + form + '</form>').appendTo($(document.body)).submit();
}

$(function()
{
    document.getElementById("televoxIframe").height="0px";
    document.getElementById("televoxIframe").width="0px";
    $.get("<?=RUTA_TELEVOX;?>logout");
    setTimeout(() => {
        redirectPost("<?=RUTA_TELEVOX;?>login/entra",{
            usuario:"<?=$_SESSION["userTelevox"];?>",
            password:"<?=$_SESSION["passTelevox"];?>"
        },"televoxIframe");
        setTimeout(() => {
            document.getElementById("televoxIframe").src="<?=RUTA_TELEVOX;?>Grabaciones";
            document.getElementById("televoxIframe").height="900px";
            document.getElementById("televoxIframe").width="100%";
        }, 3000);
    }, 3000);
});

const app = new Vue({
		el: '#main',
	});
</script>
