Ejemplo n.º 1
0
 public static function realizar()
 {
     try {
         $arrayReserva = array();
         $arrayReserva['Usuario'] = $_POST['user'];
         $arrayReserva['Habitacion'] = $_POST['habitacion'];
         $arrayReserva['Duracion'] = $_POST['Duracion'];
         $arrayReserva['TipoReserva'] = $_POST['reserva'];
         $arrayReserva['FechaEntrada'] = $_POST['fechaEn'];
         $arrayReserva['FechaSalida'] = $_POST['fechaSal'];
         $arrayReserva['Estado'] = "Activa";
         $reserva = new reserva($arrayReserva);
         $reserva->realizar();
         header("Location: ../V/pages/formsReserva.php");
     } catch (Exception $e) {
         //header("Location: ../insertar.php?respuesta=error");
     }
 }
Ejemplo n.º 2
0
 public function update(reserva $reserva)
 {
     $mysqli = new mysqli(Connection::DBHOST, Connection::DBUSERNAME, Connection::DBPASS, Connection::DBNAME);
     $query = "UPDATE reserva SET id_casa=?, id_persona_reserva=?, id_estadp=?, fecha_desde=FROM_UNIXTIME(?),\n                  fecha_hasta=FROM_UNIXTIME(?), valor=?, observacion=? where id=?";
     $statement = $mysqli->prepare($query);
     $idCasa = $reserva->getIdCasa();
     $idPersonaReserva = $reserva->getIdPersonaReserva();
     $idEstado = $reserva->getIdEstado();
     $fechaDesde = $reserva->getFechaDesde();
     $fechaHasta = $reserva->getFechaHasta();
     $valor = $reserva->getFechaHasta();
     $observacion = $reserva->getObservacion();
     $id = $reserva->getId();
     $statement->bind_param("iiiiidsi", $idCasa, $idPersonaReserva, $idEstado, $fechaDesde->getTimestamp(), $fechaHasta->getTimestamp(), $valor, $observacion, $id);
     $statement->execute();
     $statement->close();
     $mysqli->close();
 }
 public function populaReserva($row)
 {
     $reserva = new reserva();
     $reserva->setdias_permanencia($row['dias_permanencia']);
     $reserva->setnro_pessoas($row['nro_pessoas']);
     $reserva->setvalor_diaria($row['valor_diaria']);
     $reserva->setnhospede($row['nhospede']);
     return $reserva;
 }
Ejemplo n.º 4
0
<?php

include_once "../../login/check.php";
if (!empty($_POST)) {
    include_once "../../class/reserva.php";
    $reserva = new reserva();
    $CodReserva = $_POST['CodReserva'];
    $reserva->eliminarRegistro("CodReserva=" . $CodReserva);
}
Ejemplo n.º 5
0
<?php

include_once "../../login/check.php";
$folder = "../../";
$codreserva = $_POST['codreserva'];
include_once "../../class/reserva.php";
$reserva = new reserva();
$res = $reserva->eliminarRegistro("codreserva=" . $codreserva);
Ejemplo n.º 6
0
<?php

/*echo "<pre>";
print_r($_POST);
echo "</pre>";*/
extract($_POST);
$valores = array("fechaevento" => "'{$fechaevento}'", "horaevento" => "'{$horaevento}'", "direccionevento" => "'{$direccionevento}'", "nroinvitados" => "'{$nroinvitados}'", "nombrecliente" => "'{$nombrecliente}'", "cicliente" => "'{$cicliente}'", "telefonocliente" => "'{$telefonocliente}'", "correo" => "'{$correo}'", "tipo" => "'Pedido'", "cuentatigo" => "''", "codcolor" => "'{$codcolor}'", "coddiseno" => "'{$coddiseno}'", "codflores" => "'{$codflores}'", "codglobos" => "'{$codglobos}'", "total" => "'{$total}'", "opciondecoracion" => "'{$opciondecoracion}'", "acuenta" => "'0'", "saldo" => "'0'", "estado" => "'Pendiente'", "id" => "'0'", "nivel" => "'0'");
/*echo "<pre>";
print_r($valores);
echo "</pre>";*/
include_once "../class/reserva.php";
$reserva = new reserva();
$reserva->insertarRegistro($valores);
$folder = "../";
include_once $folder . "cabecerahtml.php";
include_once $folder . "cabecera.php";
?>
<section class="">
    <div class="container">
         <div class="row">
                <h2 class="section-title">Mensaje de Confirmación</h2>
                <div class="col-sm-8">
                    <div class="panel panel-default">
                        <div class="panel-heading"></div>
                        <div class="panel-body">
                            <div class="alert alert-info">
                            <h4>Gracias por Confiar en Nosotros</h4>
                            <br>
                            <h5>Su Reserva Personalizada se Registro Correctamente</h5>
                            </div>
                        </div>
Ejemplo n.º 7
0
<?php

include_once "../../login/check.php";
$codreserva = $_GET['c'];
include_once "../../class/reserva.php";
$reserva = new reserva();
$res = $reserva->mostrarTodoRegistro("codreserva=" . $codreserva);
$res = array_shift($res);
include_once "../../class/servicio.php";
$servicio = new servicio();
$ser = $servicio->mostrarTodoRegistro("", "1", "titulo");
include_once "../../class/color.php";
$color = new color();
$col = $color->mostrarTodoRegistro("", 1, "descripcion");
include_once "../../class/diseno.php";
$diseno = new diseno();
$dis = $diseno->mostrarTodoRegistro("", 1, "descripcion");
include_once "../../class/flores.php";
$flores = new flores();
$flo = $flores->mostrarTodoRegistro("", 1, "descripcion");
include_once "../../class/globos.php";
$globos = new globos();
$glo = $globos->mostrarTodoRegistro("", 1, "descripcion");
$folder = "../../";
include_once $folder . "cabecerahtml.php";
?>
<script language="javascript" type="text/javascript">
$(document).on("ready",function(){
    $(document).on("change","[name=total],[name=acuenta],[name=saldo]",function(e){
        var total=parseFloat($("[name=total]").val());
        var acuenta=parseFloat($("[name=acuenta]").val());
Ejemplo n.º 8
0
<?php

$cantidadmaxima = 0;
$FechaEvento = $_POST['FechaEvento'];
include_once "class/reserva.php";
$reserva = new reserva();
$res = $reserva->mostrarTodoRegistro("estado='Confirmado' and fechaevento='{$FechaEvento}'");
if (count($res) > $cantidadmaxima) {
    ?>
<div class="alert alert-danger"><small>Personal no Disponible para esta fecha</small></div>
<script>$("#botonenviar").attr("disabled","disabled")</script>
<?php 
} else {
    ?>
<div class="alert alert-success"><small>Personal  Disponible para esta fecha</small></div>
<script>$("#botonenviar").removeAttr("disabled")</script>
<?php 
}
Ejemplo n.º 9
0
<?php

include_once "../../login/check.php";
if (!empty($_POST)) {
    include_once "../../class/reserva.php";
    $reserva = new reserva();
    $CodAlumno = $_POST['CodAlumno'];
    ?>
	<table class="table table-striped table-hover table-bordered">
    <thead>
    <tr><th>N</th><th><?php 
    echo $idioma['MontoReserva'];
    ?>
</th><th><?php 
    echo $idioma['FechaReserva'];
    ?>
</th></tr>
    </thead>
	<?php 
    foreach ($reserva->mostrarTodoRegistro("CodAlumno={$CodAlumno}") as $r) {
        $i++;
        ?>
		    <tr><td><?php 
        echo $i;
        ?>
</td><td><?php 
        echo $r['MontoReserva'];
        ?>
</td><td><?php 
        echo fecha2Str($r['FechaRegistro']);
        ?>
Ejemplo n.º 10
0
<?php

include_once "../../class/reserva.php";
$reserva = new reserva();
extract($_POST);
$res = $reserva->mostrarTodoRegistro("fechaevento='{$fechaevento}' and nombrecliente LIKE '{$nombrecliente}%' and estado LIKE '{$estado}' and tipo LIKE '{$tipo}'", 1, "");
?>
<table class="table table-bordered table-striped table-hover">
<thead>
<tr><th>Nº</th><th>Fecha Evento</th><th>Hora Evento</th><th>Nro Invitados</th><th>Nombre Cliente</th><th>C.I. Cliente</th><th>Telefono Cliente</th><th>Total</th><th>A Cuenta</th><th>Saldo</th><th>Estado</th><th>Tipo Evento</th><th>Personal</th><th></th></tr>
</thead>
<?php 
foreach ($res as $r) {
    $i++;
    switch ($r['estado']) {
        case "Pendiente":
            $estado = "danger";
            break;
        case "Confirmado":
            $estado = "success";
            break;
    }
    ?>
<tr>
    <td class="der"><?php 
    echo $i;
    ?>
</td>
    <td><?php 
    echo date("d-m-Y", strtotime($r['fechaevento']));
    ?>
Ejemplo n.º 11
0
<?php

include_once "../../login/check.php";
/*echo "<pre>";
print_r($_POST);
echo "</pre>";*/
extract($_POST);
$valores = array("codservicio" => "'{$codservicio}'", "fechaevento" => "'{$fechaevento}'", "horaevento" => "'{$horaevento}'", "direccionevento" => "'{$direccionevento}'", "nroinvitados" => "'{$nroinvitados}'", "nombrecliente" => "'{$nombrecliente}'", "cicliente" => "'{$cicliente}'", "telefonocliente" => "'{$telefonocliente}'", "tipo" => "'{$tipo}'", "cuentatigo" => "''", "codcolor" => "'{$codcolor}'", "coddiseno" => "'{$coddiseno}'", "codflores" => "'{$codflores}'", "codglobos" => "'{$codglobos}'", "total" => "'{$total}'", "opciondecoracion" => "'{$opciondecoracion}'", "conclusion" => "'{$conclusion}'", "acuenta" => "'{$acuenta}'", "saldo" => "'{$saldo}'", "estado" => "'{$estado}'", "id" => "'0'", "nivel" => "'0'");
/*echo "<pre>";
print_r($valores);
echo "</pre>";*/
include_once "../../class/reserva.php";
$reserva = new reserva();
$reserva->actualizarRegistro($valores, "codreserva={$codreserva}");
header("Location:listar.php");