<?php $path = "../"; require_once $path . "includes/session.php"; require $path . "Modele/Categorie.class.php"; ?> <!doctype html> <html> <?php require_once $path . "includes/header.php"; ?> <body> <?php require_once $path . "includes/navbar.php"; if (isset($_GET['nom'])) { $categorie = Categorie::getCategorie($_GET['nom']); } else { header("Location: " . $path . "index.php"); } ?> <div class="container"> <div class="jumbotron"> <h2>Modifier une catégorie</h2> <form class="form-horizontal" role="form" enctype="multipart/form-data" action="<?php echo $path . "Controleur/categorie_controleur.php"; ?> " method="POST"> <div class="form-group"> <label class="control-label col-sm-3" for="nom_categorie">Nom:</label> <div class="col-sm-7">
<?php require_once '../../module/Connection.php'; require_once '../../module/model/categorie/Categorie.php'; $id = isset($_GET["id"]) ? $_GET["id"] : ""; if ($id != "") { $model = new Categorie(); $categorie = $model->getCategorie($id); $data = $categorie->fetch(); } else { echo ""; } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"> <html> <head> <link href="../../css/style.css" rel="stylesheet" type="text/css" > <meta http-equiv="Content-Type" content="text/html; charset=Cp1252"> <title>Insert title here</title> <script language="javascript" src="../../js/validation.js"></script> </head> <body> <h3>Modification de la categorie: <?php echo $data["nom_categorie"]; ?> </h3> <div id="form"> <form name="categorieForm" action="../../actions/categorie/editerAction.php" method="post"><!-- pour cree le formuulaire --> <table> <tr> <td colspan=2 id="bloc_erreur">
$listeCats = $categorie->listeCategorie(); foreach ($listeCats as $cat) { echo "<label class='checkbox-inline'>"; echo " <input type='checkbox' onclick='filtres(" . $cat['idCategorie'] . ")' id='f" . $cat['idCategorie'] . "' value='" . $cat['idCategorie'] . "'> " . $cat['nom']; echo "</label>"; } ?> </div> </div> <?php $listeMovies = $movies->listeFilm(); foreach ($listeMovies as $movie) { echo "<div class='film num" . $movie['idCategorie'] . "'>"; echo "<h1><a href='lib/movies.php?id=" . $movie['idMovie'] . "'>" . $movie['titre'] . "</a></h1>"; echo "<h4>Catégorie : " . $categorie->getCategorie($movie['idCategorie'])['nom'] . "</h4>"; echo "<p>" . $movie['descShort'] . "</p>"; echo "</div>"; } ?> </div> <footer> <div class="pied"> <hr> Construit par <a href="http://angelo-chirat.fr" target="_blank">Angelo Chirat</a> </div> </footer> <!-- JS Libraries --> <script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<?php require_once "backend/module/Connection.php"; require_once "backend/module/model/categorie/Categorie.php"; $categorie = new Categorie(); $resultat = $categorie->getCategorie(); ?> <div id="menu"> <ul> <?php #debut de la boucle while ($data = $resultat->fetch()) { ?> <!-- contenue de la boucle --> <li><a href="#"><?php echo $data["nom_categorie"]; ?> </a></li> <?php } ?> </ul> <!-- menue statique <ul> <li><a href="#">infos nationales</a></li> <li><a href="#">economie</a></li> <li><a href="#">politique</a></li> <li><a href="#">soci�t�</a></li> <li><a href="#">sport</a></li> <li><a href="#">art</a></li> </ul>
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> </head> <body> <?php require "topbar.php"; require_once "../modeles/movies.php"; require_once "../modeles/noter.php"; require_once "../modeles/categorie.php"; $movies = new Movies(); $noter = new Noter(); $categorie = new Categorie(); $note = $noter->getNote($_GET['id']); $film = $movies->getFilm($_GET['id']); $nomCat = $categorie->getCategorie($film['idCategorie'])['nom']; ?> <div class="contenu"> <div class="jumbotron"> <div class="row"> <div class="col-md-1"></div> <div class="col-md-4"> <img src='<?php echo "../" . $film['image']; ?> ' class="thumbnail img-rounded pull-left"> </div> <div class="col-md-6"> <?php echo "<h2>" . $film['titre'] . "</h2>";