Exemplo n.º 1
0
require_once "../../../Class/ClassMySql.php";
$acceso = new AccesoMySql();
$id_mesa = $_POST['id_mesa'];
$id_user = $_POST['id_user'];
$total = $_POST['total'];
$acceso->setMesaPlatoConfirmarCobro($id_mesa, $id_user, $total);
//CREAMOS NUESTRA VISTA Y LA DEVOLVEMOS AL AJAX
$acceso = new AccesoMySql();
$mesas = $acceso->getMesasCobrar();
if (sizeof($mesas) > 0) {
    ?>
        <div id="accordion1">
        
            <?php 
    foreach ($mesas as $mesa) {
        $acceso = new AccesoMySql();
        $usuarios = $acceso->getMososMesaCobrar($mesa['id_mesa']);
        //                if(sizeof($usuarios)>0){
        ?>
                
                <h3>Mesa <?php 
        echo $mesa['id_mesa'];
        ?>
</h3>
                <div style="height: auto !important">
                <table class="table table-striped table-condensed table-hover">
                <tr>
                    <th width="300">Cedula</th>
                    <th width="300">Nombre</th>
                    <th width="200">Apellido</th>
                    <th width="150">Total</th>
Exemplo n.º 2
0
<body>
    <?php 
if (isset($_SESSION["loged"]) && $_SESSION["loged"] == "Cocina") {
    ?>
    <header>Ver Mesas</header>
    <div id="contenido" >
        <?php 
    $acceso = new AccesoMySql();
    $mesas = $acceso->getMesasConPlatos();
    if (sizeof($mesas) > 0) {
        ?>
        <div id="accordion1">
        
            <?php 
        foreach ($mesas as $mesa) {
            $acceso = new AccesoMySql();
            $usuarios = $acceso->getPlatosMesaCocinero($mesa['id_mesa']);
            //                if(sizeof($usuarios)>0){
            ?>
                
                <h3>Mesa <?php 
            echo $mesa['id_mesa'];
            ?>
</h3>
                <div style="height: auto !important">
                <table class="table table-striped table-condensed table-hover">
                <tr>
                    <th width="300">id_mesa_plato</th>
                    <th width="300">id_plato</th>
                    <th width="200">nombre</th>
                    <th width="150">precio</th>
Exemplo n.º 3
0
<?php

require_once "../../../Class/ClassMySql.php";
$acceso = new AccesoMySql();
$dato = $_POST['dato'];
//EJECUTAMOS LA CONSULTA DE BUSQUEDA
$usuarios = $acceso->FiltrarUsuario($dato);
//CREAMOS NUESTRA VISTA Y LA DEVOLVEMOS AL AJAX
echo '<table class="table table-striped table-condensed table-hover">
            <tr>
                <th width="300">Nombre</th>
                <th width="200">Apellido</th>
                <th width="150">Cedula</th>
                <th width="150">Tipo</th>
                <th width="50">Opciones</th>
            </tr>';
if (sizeof($usuarios) > 0) {
    foreach ($usuarios as $usuario) {
        echo '<tr>
                        <td>' . $usuario['nombre'] . '</td>
                        <td>' . $usuario['apellido'] . '</td>
                        <td>' . $usuario['cedula'] . '</td>
                        <td>' . $usuario['tipoUser'] . '</td>
                        <td><a href="javascript:editarProducto(' . $usuario['cedula'] . ');" class="glyphicon glyphicon-edit"></a> <a href="javascript:eliminarProducto(' . $usuario['cedula'] . ');" class="glyphicon glyphicon-remove-circle"></a></td>
                    </tr>';
    }
} else {
    echo '<tr>
				<td colspan="6">No se encontraron resultados</td>
			</tr>';
}
Exemplo n.º 4
0
extract($_GET);
$ObjAcceso = new AccesoMySql();
$ArrayPlatos = array();
$ArrayPlatos = $ObjAcceso->CargarPlatos();
$totalPedidos = array();
if (isset($_POST['idPlato'])) {
    $Plato = $_POST['idPlato'];
    $Mesa = $_POST['idMesa'];
    $CantidadPlato = $_POST['cantidad'];
    $Usuario = $_SESSION["usuario"];
    $acceso = new AccesoMySql();
    $acceso->InsertarPlatoOrden($Plato, $Mesa, $CantidadPlato, $Usuario);
    $totalPedidos = $acceso->CargarPedidos($Usuario, $Mesa);
}
if (isset($_POST['Mesa'])) {
    $acceso = new AccesoMySql();
    $Usuario = $_SESSION["usuario"];
    $Mesa = $_POST['Mesa'];
    $totalPedidos = $acceso->CargarPedidos($Usuario, $Mesa);
    echo json_encode($totalPedidos);
}
if (isset($_POST['BorrarOrden'])) {
    $acceso = new AccesoMySql();
    $IdOrden = $_POST['BorrarOrden'];
    $acceso->eliminarOrden($IdOrden);
}
if (isset($_POST['idTerminar'])) {
    $acceso = new AccesoMySql();
    $Terminar = $_POST['idTerminar'];
    $acceso->terminarOrden($Terminar);
}
Exemplo n.º 5
0
            <td width="150"><button id="nueva-comida" class="btn btn-primary">Nuevo</button></td>
        </tr>
    </table>
    </section>

    <div class="registros" id="agrega-comidas">
        <table class="table table-striped table-condensed table-hover">
            <tr>
                <th width="150">Nombre</th>
                <th width="350">Descripcion</th>
                <th width="100">Precio</th>
                <th width="150">Tipo</th>
                <th width="100">Imagen</th>
            </tr>
        <?php 
    $acceso = new AccesoMySql();
    $comidas = $acceso->CargarPlatos();
    foreach ($comidas as $comida) {
        echo '<tr>
                        <td>' . $comida['nombre'] . '</td>
                        <td>' . $comida['descripcion'] . '</td>
                        <td>' . $comida['precio'] . '</td>
                        <td>' . $comida['tipo'] . '</td>
                        <td>' . $comida['imagen'] . '</td>
                        <td><a href="javascript:editarComida(' . $comida['id_plato'] . ');"><img width="30px" height="30px" src="css/Icono_Editar.png"/></a> <a href="javascript:eliminarComida(' . $comida['id_plato'] . ');"><img width="30px" height="30px" src="css/Icono_Eliminar.jpg"/></a></td>
                    </tr>';
    }
    ?>
        </table>
    </div>
    <!-- MODAL PARA EL REGISTRO DE comidas-->
<?php

require_once "../../../Class/ClassMySql.php";
$acceso = new AccesoMySql();
$dato = $_POST['dato'];
//EJECUTAMOS LA CONSULTA DE BUSQUEDA
$historialVentas = $acceso->FiltrarHistorialVenta($dato);
//CREAMOS NUESTRA VISTA Y LA DEVOLVEMOS AL AJAX
echo '<table class="table table-striped table-condensed table-hover">
            <tr>
                <th width="150">Mozo</th>
                <th width="100">Mesa</th>
                <th width="80">Precio Total</th>
                <th width="80">Fecha</th>
            </tr>';
if (sizeof($historialVentas) > 0) {
    $precioTotal = "";
    foreach ($historialVentas as $historVenta) {
        echo '<tr>
                <td>' . $historVenta['idMozo'] . '</td>
                      <td>' . $historVenta['idMesa'] . '</td>
                      <td>' . $historVenta['precioTotal'] . '</td>
                      <td>' . $historVenta['fecha'] . '</td>
                 </tr>';
        $precioTotal += $historVenta['precioTotal'];
    }
    echo ' <tr>
                <td>
                    <br/>
                    <h1> Precio total venta: ' . $precioTotal . ' </h1>
                </td>
Exemplo n.º 7
0
    </head>
    <body>
        
        <div id="accordion">
            <?php 
$ObjAcceso = new AccesoMySql();
$ArrayCategoriaPlatos = array();
$ArrayCategoriaPlatos = $ObjAcceso->CargarCategoriaPlatos();
foreach ($ArrayCategoriaPlatos as $ind => $Categoria) {
    ?>
            <h3><?php 
    echo $Categoria['tipo'];
    ?>
</h3>
                 <?php 
    $ObjAcceso1 = new AccesoMySql();
    $ArrayPlatos = array();
    $ArrayPlatos = $ObjAcceso1->CargarPlatosCategoria($Categoria['tipo']);
    ?>
 
                       
            <div class="container">
                <?php 
    foreach ($ArrayPlatos as $ind => $plato) {
        ?>
 
                <div class="content"> 
                    <table>
                        <tr>
                            <td>
                                <div style="width: 150px"><h1> $ <?php 
Exemplo n.º 8
0
<?php

require_once '../Class/ClassMySql.php';
?>
<!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=iso-8859-1" />
    <title>Pagina Web Tecnologo Informatica San Jose</title>
    <style>
        .morris-hover{position:absolute;z-index:1000}.morris-hover.morris-default-style{border-radius:10px;padding:6px;color:#666;background:rgba(255,255,255,0.8);border:solid 2px rgba(230,230,230,0.8);font-family:sans-serif;font-size:12px;text-align:center}.morris-hover.morris-default-style .morris-hover-row-label{font-weight:bold;margin:0.25em 0}
        .morris-hover.morris-default-style .morris-hover-point{white-space:nowrap;margin:0.1em 0}
    </style>
    <script>
        <?php 
$acceso = new AccesoMySql();
$datos = $acceso->getValGrafica();
?>
        
        var datos=[
            <?php 
foreach ($datos as $dato) {
    ?>
                {y: '<?php 
    echo $dato['nombre'] . ' ' . $dato['apellido'];
    ?>
', a: <?php 
    echo $dato['total'];
    ?>
},   
            <?php 
Exemplo n.º 9
0
            <td width="100"><button id="nuevo-producto" class="btn btn-primary">Nuevo</button></td>
        </tr>
    </table>
    </section>

    <div class="registros" id="agrega-registros">
        <table class="table table-striped table-condensed table-hover">
            <tr>
                <th width="300">Nombre</th>
                <th width="200">Apellido</th>
                <th width="150">Cedula</th>
                <th width="150">Tipo</th>
                <th width="50">Opciones</th>
            </tr>
        <?php 
    $acceso = new AccesoMySql();
    $usuarios = $acceso->getAllUsers();
    foreach ($usuarios as $usuario) {
        echo '<tr>
                        <td>' . $usuario['nombre'] . '</td>
                        <td>' . $usuario['apellido'] . '</td>
                        <td>' . $usuario['cedula'] . '</td>
                        <td>' . $usuario['tipoUser'] . '</td>
                        <td><a href="javascript:editarProducto(' . $usuario['cedula'] . ');" class="glyphicon glyphicon-edit"></a> <a href="javascript:eliminarProducto(' . $usuario['cedula'] . ');" class="glyphicon glyphicon-remove-circle"></a></td>
                    </tr>';
    }
    ?>
        </table>
    </div>
    <!-- MODAL PARA EL REGISTRO DE PRODUCTOS-->
    <div class="modal fade" id="registra-producto" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
Exemplo n.º 10
0
        </tr>
    </table>
    </section>

    <div class="container-fluid" id="historialVenta">
        <div class="row">
            <div>
                <table class="table table-striped table-condensed table-hover">
                    <tr>
                        <th width="150">Mozo</th>
                        <th width="100">Mesa</th>
                        <th width="80">Precio Total</th>
                        <th width="80">Fecha</th>
                    </tr>
                <?php 
    $acceso = new AccesoMySql();
    $historial = $acceso->getHistorialVentas();
    foreach ($historial as $historVenta) {
        echo '<tr>
                                <td>' . $historVenta['idMozo'] . '</td>
                                <td>' . $historVenta['idMesa'] . '</td>
                                <td>' . $historVenta['precioTotal'] . '</td>
                                <td>' . $historVenta['fecha'] . '</td>
                            </tr>';
    }
    ?>
                </table>
            </div>
        </div>
    </div>
    <?php 
Exemplo n.º 11
0
<?php

require_once "../../../Class/ClassMySql.php";
$acceso = new AccesoMySql();
$dato = $_POST['dato'];
//EJECUTAMOS LA CONSULTA DE BUSQUEDA
$comidas = $acceso->FiltrarComida($dato);
//CREAMOS NUESTRA VISTA Y LA DEVOLVEMOS AL AJAX
echo '<table class="table table-striped table-condensed table-hover">
            <tr>
                <th width="150">Nombre</th>
                <th width="350">Descripcion</th>
                <th width="100">Precio</th>
                <th width="150">Tipo</th>
                <th width="100">Imagen</th>
            </tr>';
if (sizeof($comidas) > 0) {
    foreach ($comidas as $comida) {
        echo '<tr>
                        <td>' . $comida['nombre'] . '</td>
                        <td>' . $comida['descripcion'] . '</td>
                        <td>' . $comida['precio'] . '</td>
                        <td>' . $comida['tipo'] . '</td>
                        <td>' . $comida['imagen'] . '</td>
                        <td><a href="javascript:editarComida(' . $comida['id_plato'] . ');" ><img width="30px" height="30px" src="css/Icono_Editar.png"/></a> <a href="javascript:eliminarComida(' . $comida['id_plato'] . ');"><img width="30px" height="30px" src="css/Icono_Eliminar.jpg"/></a></td>
                    </tr>';
    }
} else {
    echo '<tr>
				<td colspan="6">No se encontraron resultados</td>
			</tr>';
Exemplo n.º 12
0
<?php

require_once "Class/ClassMySql.php";
session_start();
extract($_POST);
extract($_GET);
if (isset($_POST['enviar'])) {
    $usuario = $_POST['usuario'];
    $clave = $_POST['clave'];
    $exist = false;
    $acceso = new AccesoMySql();
    $passMd5 = md5($clave);
    $exist = $acceso->validarUsuario($usuario, $passMd5);
    if ($exist != "") {
        $_SESSION["usuario"] = $usuario;
        $_SESSION["loged"] = $exist;
        $_SESSION["id"] = $exist["Id"];
        header("location: index.php?tipo=" . $_SESSION["loged"] . "&user="******"usuario"]);
        exit;
    }
}
if (isset($_GET['logout'])) {
    $loged = $_GET['logout'];
    $_SESSION['logout'] = 1;
    if ($_SESSION['logout'] == 1) {
        session_unset();
        session_destroy();
        header("Location: index.php");
        exit;
    }
}