コード例 #1
0
ファイル: mostrarPlatillos.php プロジェクト: netor27/Efood
echo $restaurante->idRestaurante;
?>
">Administrar categorías de platillos</a></h4>
<h4><a href="platillos.php?a=alta&r=<?php 
echo $restaurante->idRestaurante;
?>
">Agregar platillo</a></h4>
<h4><a href="platillos.php?a=duplicar&r=<?php 
echo $restaurante->idRestaurante;
?>
">Duplicar platillo</a></h4>
<div style="width: 100%;overflow-x: scroll;">
    <table border="1">
        <?php 
require_once 'modulos/platillos/clases/Platillo.php';
Platillo::printHeader();
if (isset($platillos)) {
    foreach ($platillos as $platillo) {
        $platillo->printPlatillo();
    }
}
?>
    </table>
</div>
<?php 
$restauranteLoggeado = getRestauranteLoggeado();
if (isset($restauranteLoggeado)) {
    echo '<a href="adminRestaurante.php">Regresar</a>';
} else {
    echo '<a href="restaurantes.php">Regresar</a>';
}
コード例 #2
0
ファイル: platilloControlador.php プロジェクト: netor27/Efood
function mostrar()
{
    require_once 'modulos/platillos/modelos/platilloModelo.php';
    $idPlatillo = $_GET['i'];
    $platillo = getPlatillo($idPlatillo);
    if (validarAdministrador() || validarRestauranteLoggeadoId($platillo->idRestaurante)) {
        echo '<table border=1>';
        Platillo::printHeader();
        $platillo->printPlatillo();
        echo '</table';
    } else {
        goToIndex();
    }
}