Exemple #1
0
    }
} else {
    echo '<p>Choisissez une section</p>';
}
?>

        </div>

        <div class="container">

            <div class="row">
                <?php 
if (isset($typepiecechoisi)) {
    if ($typepiecechoisi == "ordinateur") {
        $ordinateurmanager = new OrdinateurManager($_SESSION['connexion']);
        $listeordinateur = $ordinateurmanager->getList();
        $itemdanslistebool = false;
        foreach ($listeordinateur as $obj) {
            if (!empty($obj)) {
                $itemdanslistebool = true;
                echo '
                                <div class="col-xs-12 col-lg-6">
                                    <h2>' . $obj->getNom() . '</h2>
                                    <h3>' . $obj->getPrix() . '€</h3>
                                    <p><a class="btn btn-default" href="?page=item&type=' . $_GET['type'] . '&item=' . $obj->getId() . '" role="button">Plus de détails &raquo;</a></p>
                                </div>
                                ';
            }
        }
        if (!$itemdanslistebool) {
            echo '