session_start(); require '../Model/User.php'; require '../Model/Flux.php'; $xml = 'rss'; //ENVOIE URL if (isset($_POST['send'])) { if (strpos($_POST['url'], $xml)) { $flux = new Flux(); $flux->sendUrl($_SESSION['id'], $_POST['url']); } else { echo "url non valide"; } } //AFFICHAGE DES FLUX $affichage = new Flux(); if (isset($_GET['suppr'])) { $suppr = $affichage->supprFlux(0, $_GET['suppr']); } if (isset($_GET['restaure'])) { $suppr = $affichage->restFlux(1, $_GET['restaure']); } $lien = ""; $affich = $affichage->affichMyUrl($_SESSION['id']); $affichSuppr = $affichage->affichMySupprUrl($_SESSION['id']); if (isset($_GET['id'])) { $lien = $affichage->affichContent($_SESSION['id'], $_GET['id']); if (empty($lien)) { header('Location:accueil.php'); } } require '../Templates/accueil.html';