Example #1
0
<?php

include "IncluirClases.php";
$title = "Bebidas";
$PlatoEntidad = new Plato();
if (isset($_GET['id'])) {
    $id = $_GET['id'];
} else {
    // hacer select de postres cuando se cargue del menu
    $tipoPlatosEntidad = new TipoPlato();
    $tipoPlatosEntidad->__set('descripcion', $title);
    $tipoPlatos = new TipoPlatoBLL();
    $vTipoPlatos = $tipoPlatos->ConsultarNombre($tipoPlatosEntidad);
    if (!empty($vTipoPlatos)) {
        foreach ($vTipoPlatos as $tipoPlatoSelect) {
            $id = $tipoPlatoSelect[0];
        }
    }
}
$PlatoEntidad->__set('id_tipo_plato', $id);
$Plato = new PlatoBLL();
$vPlatos = $Plato->Consultar($PlatoEntidad);
$content = "<hr>\n<div class='row'><div class='col-lg-12'><h3>{$title}</h3></div></div>\n<div class='row text-center'>";
foreach ($vPlatos as $plato) {
    $content .= "<div class='col-md-3 col-sm-6 hero-feature'>\n\t<div class='thumbnail'>\n\t<img src='img/{$plato['3']}' alt=''  >\n\t<div class='caption'>\n\t<h3>{$plato['1']}</h3>\n\t<p><span class='label label-success'>Valor: ยข{$plato['2']}</span></p>\n\t<p>";
    // guarda la receta de cada plato(array) para mostrarlo.
    $RecetaBLL = new RecetaBLL();
    $Receta = $RecetaBLL->ConsultarRegistro($plato[0]);
    $ingredienteReceta = 'Receta:<br/>';
    if (!empty($Receta)) {
        foreach ($Receta as $ingrediente) {