<?php

//creamos la variable time, para llamar a los recursos del sistema en tiempo real

$time_log_assets=time();

//validamos si la session no ha sido declarada, para incicializarla

if (session_status() === PHP_SESSION_NONE) {

  session_start();

}

if(empty($_SESSION['login_appquadrata'])){

    echo"<script language='javascript'>window.location='../login'</script>;";

    exit();

}



/*inicializamos valores para la configuracion del template*/

$setting_template='../settings_template.txt';

$variables=[];

$_Color='';

$_Template='';

$_Theme_Template='';

$_Css='';

$_Js='';

$_Css_Version='';

$_Js_Version='';

if (file_exists($setting_template)) {

    $lines = file($setting_template, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);

    foreach ($lines as $line) {

        list($nombre_variable, $valor) = explode('=', $line);

        $variables[$nombre_variable] = $valor;

    }

    /*recogemos los valores de las variables*/

    if (isset($variables['Color'])) {

        $_Color = $variables['Color'];



        //echo "El color es: $_Color";

    }

    if (isset($variables['Template'])) {

        $_Template = $variables['Template'];

        //echo "El Template es: $_template";

    }

    if (isset($variables['Theme_Template'])) {

        $_Theme_Template = $variables['Theme_Template'];

        //echo "El Theme_Template es: $_Theme_Template";

    }

    if (isset($variables['css'])) {

        $_Css = $variables['css'];

        //echo "El css es: $_Css";

    }

    if (isset($variables['js'])) {

        $_Js = $variables['js'];

        //echo "El js es: $_Js";

    }

    if (isset($variables['css_version'])) {

        $_Css_Version = $variables['css_version'];

        //echo "El css es: $_Css";

    }

    if (isset($variables['js_version'])) {

        $_Js_Version = $variables['js_version'];

        //echo "El js es: $_Js";

    }

}

/*terminan valores de configuracion pára el template*/

?>



<!DOCTYPE html>

<html lang="es" class="light  <?php if($_Color!=''){ echo 'theme-user'; }else{ echo $_Theme_Template; }?>">

    <!-- BEGIN: Head -->

    <head>

        <meta charset="utf-8">

        <link href="../dist/images/logo.svg" rel="shortcut icon">

        <!--<meta name="viewport" content="width=device-width, initial-scale=1.0">-->
        <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-title" content="APPQUADRATA | APP">
        <meta name="apple-mobile-web-app-status-bar-style" content="default">
        <link rel="apple-touch-icon" href="../pwa/icon-192x192.png">

        <!-- PWA: manifest y meta tags -->
        <link rel="manifest" href="../pwa/manifest.php?dummy=<?= time() ?>">
        <meta name="theme-color" content="#1a2332">
        <link rel="apple-touch-icon" href="../pwa/icon-192x192.png">
        <link rel="icon" type="image/png" sizes="512x512" href="../pwa/icon-512x512.png">

        <!-- Para Safari iOS -->
        <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-title" content="APPQUADRATA | APP">
        <!--END codigo PWA-->


        <meta name="description" content="Midone admin is super flexible, powerful, clean & modern responsive tailwind admin template with unlimited possibilities.">

        <meta name="keywords" content="SINAPSYS">

        <meta name="author" content="SINAPSYS">

        <title>APPQUADRATA | APP</title>

        <!-- BEGIN: CSS Assets-->

        <link rel="stylesheet" href="../dist/css/<?=$_Css;?>?time=<?=$_Css_Version?>" />

        <link rel="stylesheet" href="../dist/css/app_style.css?time=<?=$_Css_Version?>" />

        <!-- END: CSS Assets-->

    </head>

    <!-- END: Head -->

    <body class="py-5" style="overflow: hidden;padding-top: 1.25rem !important;padding-bottom: 0 !important;">

    