<?php
session_start();

include("DMMYSQLG.php");
include("DF80000.php");
?>
<html>
    <head>
        <link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
        <script type="text/javascript" src="js/jquery.js"></script>
        <script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>


        <title>Hotel Manager System</title>
    </head>
    <?php
    if (!isset($dt_empres['fec_alta']))
        $dt_empres['fec_alta'] = "";
    $fecha = $dt_empres['fec_alta'];
//$fechita = chfecha($fecha,'Y-m-d','d/m/Y');
    $fechita = date("j") . "/" . date("m") . "/" . date("Y");
    @$hora = date("j") . "/" . date("m") . "/" . date("Y");
//buscar el nombre de la empresa
    @$sql = mysqli_query($con ,"SELECT * FROM dxempres WHERE cla_emp = '" . $_SESSION['empresa'] . "'");
    @$datoss = mysqli_fetch_array($sql);
    $_SESSION['ne'] = $datoss['siglas'];
    $base_uso = $datoss['dbname1'];
    $_SESSION['base'] = $base_uso;
//echo $_SESSION['base'];
    ?>

    <body onLoad="relojload()" class="bgblack">
        <form name="form_reloj"> 

            <div id="cabecera">
                <!--div id="header_bg"--> 
                <table width=100% class="estilotabla" >
                    <!--table width=100% class="header_bg"-->
                    <tr class="tragreTopBar">

                        <td width="300">
                    <marquee>  <span class="trcoti"  id="module" ></span>
                    </marquee>
                        </td>
                             <td width="150" id="fecha" align=rigth> <?php echo $fechita ?></td>
                        <td> <marquee> <?php echo $_SESSION['ne'] ?>  <marquee> </td>
                   
                        <td width="150" align=rigth>  
                            <span id="reloj" size="8" class="trtotal" >
                        <td width="200" align=rigth> 
                            <?php
                            if (isset($_SESSION['usuario'])) {
                                echo '<a href="cerrar.php" target="_top">Cerrar Sesion: <b>' . $_SESSION['usuario'] . '</b></a>';
                            } else {
                                if (session_id() != '')
                                    session_destroy();
                                echo "Inicio de Session";
                                //  echo "<script>location.href='index.php'</script>";
                            }
                            ?>          </td>
                        <td width="80">
                            <a href="MENU_COS.php" target="_parent" >
                                <img src="img/images.png" width="21" height="23" border="0"><br/><span class="Estilo2">MENU</span></a>

                        </td>
                    </tr>
                </table>
            </div>
        </form>
        <script type="text/JavaScript">
            $('#module').html(parent.document.title); 
        </script>
    </body>

</html>