<?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">
    <link rel="shortcut icon" type="image/ico" href="./settings/img/favicon.png"/>
    
    <!--Recursos-->
    <link rel="stylesheet" href="./hooks/tags-input/tags-input.css?v=32">
    <script src="./hooks/tags-input/tags-input.js"></script>
    
    <?php
        if ($sid=="preferences" || $sid=="accountingacc"){
            echo('<script src="./hooks/ckeditor5custom/build/ckeditor.js"></script>');
        }
    ?>
        
    <link rel="stylesheet" href="./css/main.css?v=32">
    <link rel="stylesheet" href="./css/fonts.css?v=32">
    <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($cmstit); ?></title>
</head>
<body>
<?php
    if($underconstruccms){
        echo("<div class='underc'></div>");
    }else{
        if (file_exists("./content/".$id.".php")){
            include_once("./content/".$id.".php");
        }
    }
?>
<script type="text/javascript" src="./hooks/icons.js?v=32"></script>
<script type="text/javascript" src="./js/main.js?v=32"></script>
<?php  
    /***JS***/
    if(!$underconstruccms){
        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>