javais zapper beaucoup de truc...
This commit is contained in:
652
WEBBE/cinema/sql/cinema.sql
Normal file
652
WEBBE/cinema/sql/cinema.sql
Normal file
File diff suppressed because one or more lines are too long
18
WEBBE/cinema/src/css/style.css
Normal file
18
WEBBE/cinema/src/css/style.css
Normal 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
WEBBE/cinema/src/films.php
Normal file
14
WEBBE/cinema/src/films.php
Normal 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';
|
||||
?>
|
||||
|
16
WEBBE/cinema/src/modeles/modeleFilms.php
Normal file
16
WEBBE/cinema/src/modeles/modeleFilms.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
function _getConnection()
|
||||
{
|
||||
static $_conn = NULL;
|
||||
if ($_conn === NULL){
|
||||
$_conn = mysqli_connect("localhost","","","");
|
||||
}
|
||||
return $_conn;
|
||||
}
|
||||
|
||||
|
||||
function getFilms()
|
||||
{
|
||||
// A completer
|
||||
}
|
||||
?>
|
3
WEBBE/cinema/src/vues/footer.php
Normal file
3
WEBBE/cinema/src/vues/footer.php
Normal file
@@ -0,0 +1,3 @@
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
13
WEBBE/cinema/src/vues/header.php
Normal file
13
WEBBE/cinema/src/vues/header.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Films</title>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@1/css/pico.min.css">
|
||||
<link rel="stylesheet" href="./css/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<main class="container">
|
||||
|
||||
|
31
WEBBE/cinema/src/vues/vueFilms.php
Normal file
31
WEBBE/cinema/src/vues/vueFilms.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<!-- 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>
|
||||
|
Reference in New Issue
Block a user