Esempio n. 1
0
        }
        ?>
                    <!--Se muestra solo si se definio previamente el intervalo de fechas de reserva-->

                </div>
            </div>
            <div class="row">
                <div class="col-md-8 col-xs-12 caracteristicas">
                    <h3>Caracteristicas</h3>
                    <?php 
        if ($casaCaracteristicas->count() == 0) {
            echo '<p>Esta casa no posee ninguna caracteristica especial</p>';
        } else {
            foreach ($casaCaracteristicas as $cc) {
                $caracteristicaRepository = new CaracteristicaRepository();
                $caracteristica = $caracteristicaRepository->getOne($cc->getIdCaracteristica());
                ?>
                            <p><span
                                    class="glyphicon glyphicon-star"></span> <?php 
                echo $caracteristica->getNombre();
                ?>
                            </p>
                        <?php 
            }
        }
        ?>
                </div>
            </div>
        </div>
        <?php 
    }
Esempio n. 2
0
<?php

use app\model\Caracteristica;
use app\repository\CaracteristicaRepository;
require_once 'repository/CaracteristicaRepository.php';
require_once 'repository/Connection.php';
require_once 'model/Caracteristica.php';
if (isset($_SESSION['id']) && $_SESSION['admin']) {
    if (isset($_GET['id'])) {
        $id = $_GET['id'];
        $caracteristica = new Caracteristica();
        $caracteristicaRepository = new CaracteristicaRepository();
        $caracteristica = $caracteristicaRepository->getOne($id);
        $nombre = $caracteristica->getNombre();
    }
    ?>
<div class="container principal" ng-controller="CaracteristicasController">
    <div class="row">
        <div class="col-md-4 col-xs-12">
            <h3>Agregar caracteristica</h3>

            <form role="form" method="post" id="caractAlta"
                  action="controller/caracteristica/caracteristica_update.php">
                <?php 
    if (isset($id)) {
        ?>
                    <div class="form-group" hidden>
                        <label for="id">ID</label>
                        <input type="text" class="form-control" id="id"
                               name="id" value="<?php 
        echo $id;