public function habitacion($id_hotel, $max)
 {
     $proteccion = new Proteccion();
     $tp = new TemplatePower("templates/AltaHotel.html");
     $tp->prepare();
     $tp->gotoBlock("_ROOT");
     if ($max == 1) {
         $tp->newBlock("hotelcreado");
     } else {
         $capacidad = $proteccion->html($_POST['capacidad']);
         $disponibilidad = $proteccion->html($_POST['disponibilidad']);
         $piso = $proteccion->html($_POST['piso']);
         $ubicacion = $proteccion->html($_POST['ubicacion']);
         $habitacion = new Habitacion($capacidad, $disponibilidad, $piso, $ubicacion);
         $id_habitacion = $habitacion->insertarHabitacion();
         $hotel = new Hotel();
         $hotel->AgregarHabitacion($id_hotel, $id_habitacion);
         $max = (int) $max - 1;
         $tp->newBlock("habitacion");
         $tp->assign("id_hotel", $id_hotel);
         $tp->assign("max", $max);
     }
     echo $tp->getOutputContent();
 }