<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link href="<?=URL_SITIO?>css/general.css" rel="stylesheet" type="text/css" />
        <link href="<?=URL_SITIO?>css/font-awesome.min.css" rel="stylesheet" />
        <link href="<?=URL_SITIO?>css/shadowbox.css" rel="stylesheet" type="text/css" />
        <link href="<?=URL_SITIO?>css/jquery.alerts.css" rel="stylesheet" type="text/css" />
        <link href="<?=URL_SITIO?>css/chosen.min.css" rel="stylesheet" type="text/css" />
        <link href="<?=URL_SITIO?>css/jquery-ui.min.css" rel="stylesheet" type="text/css" />
        <?php if ($css_template) { foreach($css_template as $css) { ?><link href="<?=URL_SITIO?>css/<?= $css ?>.css" rel="stylesheet" type="text/css" /><?php } } ?>
        <title>Panel de control de comunicaciones</title>
        <script type="text/javascript" language="javascript" src="<?=URL_SITIO?>js/jquery-3.0.0.min.js"></script>
        <script type="text/javascript" language="javascript" src="<?=URL_SITIO?>js/jquery.validate.min.js"></script>
        <script type="text/javascript" language="javascript" src="<?=URL_SITIO?>js/jquery.alerts.js"></script>
        <script type="text/javascript" language="javascript" src="<?=URL_SITIO?>js/shadowbox.js"></script>
        <script type="text/javascript" language="javascript" src="<?=URL_SITIO?>js/chosen.jquery.min.js"></script>
        <script type="text/javascript" language="javascript" src="<?=URL_SITIO?>js/jquery-ui.min.js"></script>
        <script type="text/javascript" language="javascript" src="<?=URL_SITIO?>js/order.js"></script>
        <script type="text/javascript">var url_sitio='<?=URL_SITIO;?>';</script>
        <?php if ($js_template) { foreach($js_template as $js) { ?><script type="text/javascript" language="javascript" src="<?=URL_SITIO?>js/<?= $js ?>.js"></script><?php } } ?>
        <script type="text/javascript" language="javascript">
            var jqalert_ok = <?= (isset($_SESSION['msg_ok'])) ? "'" . $_SESSION['msg_ok'] . "'" : 'false' ?>;
            var jqalert_err = <?= (isset($_SESSION['msg_err']))? "'" . $_SESSION['msg_err'] . "'" : 'false' ?>;
        </script>
        <script type="text/javascript" language="javascript" src="<?=URL_SITIO?>js/init.js"></script>
        <?php
        if(isset($_SESSION['msg_ok'])) unset($_SESSION['msg_ok']);
        if(isset($_SESSION['msg_err'])) unset($_SESSION['msg_err']);
        ?>
        <link rel="icon" href="favicon.ico" type="image/x-icon" />
    </head>
    <body>
        <?php
        if (!isset($_SESSION['login_user'])) {
            include APP_DIR.'views/login/index.php';
        } else {
            ?>
            <div id="content"><?php include APP_DIR.'views/'.$page_template.'.php'; ?></div>
            <?php
        }
        ?>
    </body>
</html>
