<?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="./img/favicon.png"/>
    <link rel="stylesheet" href="./css/main.css?v=4">
    <link rel="stylesheet" href="./fonts/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=4">');
    }
    if (file_exists("./css/".$id."/".$sid.".css")){
        echo ('<link rel="stylesheet" href="./css/'.$id."/".$sid.'.css?v=4">');
    }
?>
    <title>AFX - Cliente</title>
</head>
<body>
    
<?php
    if (file_exists("./content/".$id.".php")){
        include_once("./content/".$id.".php");
    }
    if (file_exists("./content/".$id."/".$sid.".php")){
        include_once("./content/".$id."/".$sid.".php");
    }
?>
<!--Icons-->
<script type="text/javascript" src="./hooks/icons.js"></script>

<script type="text/javascript" src="./js/main.js?v=4"></script>
<!-- QR -->
<script type="text/javascript" src="./hooks/qrCodeJs/qrcode.js?v=4"></script>
<script type="text/javascript" src="./hooks/qrCodeJs/qrcode.min.js?v=4"></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 (file_exists("./js/".$id.".js")){
        echo ('<script type="text/javascript" src="./js/'.$id.'.js?v=4"></script>');
    }
    if (file_exists("./js/".$id."/".$sid.".js")){
        echo ('<script type="text/javascript" src="./js/'.$id.'/'.$sid.'.js?v=4"></script>');
    }
    /***LANG***/
    if (file_exists("./lang/".$id.".js")){
        echo ('<script type="text/javascript" src="./lang/'.$id.'.js?v=4"></script>');
    }
    if (file_exists("./js/".$id."/".$sid.".js")){
        echo ('<script type="text/javascript" src="./lang/'.$id.'/'.$sid.'.js?v=4"></script>');
    }
?>
</body>
</html>