This commit is contained in:
2026-04-08 08:49:36 +02:00
parent 91524fb5e5
commit c165b74c99
26 changed files with 965 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
table{
width:100%;
}
img{
width:500px;
}
td + td + td + td{
width : 20%;
}
td:first-child + td{
width:10%;
}
td:first-child{
width:30%;
}
td:first-child + td + td {
width:30%;
}
+14
View File
@@ -0,0 +1,14 @@
<?php
include './modeles/modeleFilms.php';
$films = getFilms();
//
// on "charge" la vue
//
include './vues/header.php';
include './vues/vueFilms.php';
include './vues/footer.php';
?>
@@ -0,0 +1,16 @@
<?php
function _getConnection()
{
static $_conn = NULL;
if ($_conn === NULL){
$_conn = mysqli_connect("localhost","","","");
}
return $_conn;
}
function getFilms()
{
// A completer
}
?>
+3
View File
@@ -0,0 +1,3 @@
</main>
</body>
</html>
+14
View File
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8" />
<title>Films</title>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"
/>
<link rel="stylesheet" href="./css/style.css">
</head>
<body>
<main class="container">
+32
View File
@@ -0,0 +1,32 @@
<!--
Variables de la vue
$films : les films de la page
-->
<h2>Films</h2>
<table>
<thead>
<tr>
<th>Titre</th>
<th>Année</th>
<th>Genre</th>
<th>Réalisateur</th>
</tr>
</thead>
<tbody>
<?php
foreach($films as $film){
echo "
<tr>
<td><a href='#'>{$film['titre']}</a></td>
<td>{$film['annee']}</td>
<td>{$film['genre']}</td>
<td>{$film['prenom']} {$film['nom']}</td>
</tr>";
}
?>
</tbody>
</table>