<?php include 'mods/site/model/Article.php'; include 'mods/site/view/VueSite.php'; include 'mods/site/model/Commentaire.php'; include 'mods/site/config.php'; $numPage = 0; $mod = 'news'; $article = false; include 'core/controller/menu.php'; $vueSite = new VueSite(); if (isset($_GET['page'])) { $numPage = $_GET['page']; } $vueSite->setPageName('News'); $vueSite->setSiteName($nomSite); $vueSite->setNumPage($numPage); $vueSite->forgerPageNews(); //Page display $head .= $vueSite->getHead(); $body = $vueSite->getBody();
$auteur = $_REQUEST['auteur']; $message = $_REQUEST['message']; $vueSite->setFormBase(); if ($auteur != '' || $message != '') { $vueSite->setVarsForm($auteur, $message); $vueSite->setFormSendOK(); $enregistreOk = Commentaire::enregistrerComment($idArticle, $auteur, $message); if (!$enregistreOk) { $vueSite->setFormDoubleSend(); } } } } } $vueSite->forgerPageArticle(); } else { if (isset($_GET['id'])) { $id = $_GET['id']; if (isset($_GET['page'])) { $numPage = $_GET['page']; } $vueSite->setPageName(Menu::getNom($id)); $vueSite->setSiteName($nomSite); $vueSite->setIdmenu($id); $vueSite->setNumPage($numPage); $vueSite->forgerPageCategorie(); } } //Page display $head .= $vueSite->getHead(); $body = $vueSite->getBody();