<?php
//Actualización de v=32 08/03/2023    
    include("../settings/utils.php");
    $id = "login";
    if (isset($_REQUEST["id"])){
        $id = $_REQUEST["id"];
    }
    $sid = "main";
    if (isset($_REQUEST["sid"]))
        $sid = $_REQUEST["sid"];
?>

<!DOCTYPE html>
<html lang="es">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">

    <link rel="shortcut icon" type="image/ico" href="./settings/img/favicon.png"/>
    <link rel="stylesheet" href="./css/main.css?v=32">
    <link rel="stylesheet" href="./css/fonts.css">
    <!--Recursos-->
    <link href="./css/font-awesome/all.css" rel="stylesheet">
<?php
    if (file_exists("./css/".$id.".css")){
        echo ('<link rel="stylesheet" href="./css/'.$id.'.css?v=32">');
    }
    if (file_exists("./css/".$id."/".$sid.".css")){
        echo ('<link rel="stylesheet" href="./css/'.$id."/".$sid.'.css?v=32">');
    }
?>
    <title><?php echo($apptit); ?></title>
</head>
<body <?php if($underconstruc)echo 'style="display:block;opacity:1"' ?> >
    
<?php
    if($underconstruc){
        echo("<div class='underc'></div>");
    }else{
        if (file_exists("./content/".$id.".php")){
            include_once("./content/".$id.".php");
        }
        if (file_exists("./content/".$id."/".$sid.".php")){
            include_once("./content/".$id."/".$sid.".php");
        }
        include("./settings/footer.php");
    }
?> 
<!--Icons-->
<script type="text/javascript" src="./hooks/icons.js"></script>

<!--Phone Code-->
<script type="text/javascript" src="./hooks/countries.js"></script>

<script type="text/javascript" src="./js/main.js?v=32"></script>
<!-- QR -->
<script type="text/javascript" src="./hooks/qrCodeJs/qrcode.js?v=32"></script>
<script type="text/javascript" src="./hooks/qrCodeJs/qrcode.min.js?v=32"></script>

<!-- CHART -->
<!--<script src="https://cdn.jsdelivr.net/npm/chart.js@2.8.0"></script>
<script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>-->

<?php  
    /***JS***/
    if(!$underconstruc){
        /***LANG***/        
        echo ('<script type="text/javascript">var globname="'.$shortname.'";var companynm="'.$companyname.'";var isBPWorks = true;</script>');
        if (file_exists("./lang/".$id.".js")){
            echo ('<script type="text/javascript" src="./lang/'.$id.'.js?v=32"></script>');
        }
        if (file_exists("./js/".$id."/".$sid.".js")){            
            echo ('<script type="text/javascript" src="./lang/'.$id.'/'.$sid.'.js?v=32"></script>');
        }
        if (file_exists("./js/".$id.".js")){
            echo ('<script type="text/javascript" src="./js/'.$id.'.js?v=32"></script>');
        }
        if (file_exists("./js/".$id."/".$sid.".js")){
            echo ('<script type="text/javascript" src="./js/'.$id.'/'.$sid.'.js?v=32"></script>');
        }
        
    }
?>
</body>
</html>