public static function getHtmlDevelopped($Article) { $htmlCode = "<div class=\"actu_serie\"> <br/> \n"; $htmlCode .= "<h3>" . $Article->getTitre() . "</h3> \n"; $htmlCode .= "<p><small>" . $Article->getDateParution() . "</small></p> \n"; if (strlen($Article->getImage()) >= 1) { $htmlCode .= "<img src=\"" . $Article->getImage() . "\" alt=\"" . $Article->getTitre() . "\" /> <br/> \n"; } $htmlCode .= "<p>" . $Article->getContenu() . "</p> <br/> \n"; $htmlCode .= "</div> <br/> \n"; $htmlCode .= CommentaireView::getHtmlDevelopedCollection(CommentaireGateway::getCommentaireByArticleID($dataError, $Article->getId())); $htmlCode .= "<p> Ajouter un commentaire : </p>"; $htmlCode .= CommentaireView::getFormHTML("?action=putCommentaire&id=" . $Article->getId(), Commentaire::getDefaultCommentaire()); $_POST['test'] = "test"; return $htmlCode; }
echo VueHtmlUtils::enTeteHTML5('Bienvenue sur notre site', 'UTF-8', Config::getStyleSheetsURL()['default']); ?> <div id="images-box"> <section> <?php echo ArticleView::getHtmlDevelopped($modele->getData()); ?> <a href="?action=get-all-news">[ Revenir à la liste des news ]</a> </section> </div> <?php echo "<section>"; echo "<h2> Commentaires: </h2>"; foreach ($listCom->getData() as $commentaire) { echo "--------------------------------------------------------------------------------------------"; echo CommentaireView::getHtmlDevelopped($commentaire); if (isset($_SESSION['login'])) { echo "<p><a href=\"?action=delete-com&idCom=" . $commentaire->getIdCom() . "&idArticle=" . $modele->getData()->getId() . "\"> [ supprimer ] </a></p>"; } } echo "</section>"; ?> <section> <?php echo CommentaireFormView::getDefaultFormHTML("?action=put-com", $idArticle); ?> </section> <?php