Пример #1
0
<?php

$tabnews = NewsGateway::getAllNews();
?>
<html>
    <head>
        <?php 
require_once 'header.php';
$roleSession = 'none';
if (isset($_SESSION['login']) && isset($_SESSION['role'])) {
    $roleSession = $_SESSION['role'];
}
?>
        <link rel="stylesheet" href="<?php 
global $serverInfo;
echo $serverInfo . 'css/actualites.css';
?>
">
    </head>
    <body>
        <?php 
require_once 'menu.php';
require_once 'aside.php';
?>
        
        <h2 class="centrer">
            Actualit&eacute;s
        </h2>
	<?php 
if (Config::hasErreur()) {
    require Config::getViews()['erreur'];
Пример #2
0
<?php

$tabnews = NewsGateway::get3News();
?>
<html lang="fr">
    <head>
        <?php 
require_once 'header.php';
?>
        <link rel="stylesheet" href="<?php 
global $serverInfo;
echo $serverInfo . 'css/accueil.css';
?>
">
    </head>
    <body>
        <?php 
require_once 'menu.php';
require_once 'asideAccueil.php';
?>
        <div class="presentation">
            <div class="centrer">
                <h1>
                    Doctor Who Fanpage
                </h1>

                <h3 class="presentation_sous-titre">
                        Pour les fans français de Doctor Who.
                </h3>
                <h3 class="presentation_sous-titre">
                    D&eacute;couvrez les actualit&eacute;s Doctor Who les plus juteuses r&eacute;unies en un site !
Пример #3
0
 private function modifierNews()
 {
     if (empty($_REQUEST['indexNews'])) {
         Config::ajouterErreur("Problème d'index d'Actualité pour la suppression");
         require Config::getViews()['vueActualites'];
         return;
     }
     if (isset($_REQUEST['titre']) && isset($_REQUEST['resume']) && isset($_REQUEST['contenu'])) {
         if (!empty($_FILES['image']['tmp_name'])) {
             $pathImage = UploadImageGestionnaire::addImage($_FILES['image'], 'images/imageActualite', $_REQUEST['indexNews']);
         } else {
             $news = NewsGateway::get1News($_REQUEST['indexNews']);
             $pathImage['pathImage'] = $news->pathImage;
         }
         $news = NewsGateway::modifierNews($_REQUEST['indexNews'], $_REQUEST['titre'], $pathImage['pathImage'], $_REQUEST['resume'], $_REQUEST['contenu']);
         require Config::getViews()['vueActualites'];
         return;
     }
     $news = NewsGateway::get1News($_REQUEST['indexNews']);
     if ($news == null) {
         require Config::getViews()["Erreur de Recuperation de donnée pour l'actualite a modifier"];
         require Config::getViews()['vueActualites'];
     } else {
         $dataVue = array();
         $dataVue['news'] = $news;
         require Config::getViews()['vueModifActualite'];
     }
 }