-
Notifications
You must be signed in to change notification settings - Fork 0
/
movie.php
118 lines (107 loc) · 4.42 KB
/
movie.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?php
// var_dump($_GET);
if($_SERVER['REQUEST_METHOD'] == "GET"){
require_once "./functions/database.php";
if(!empty($_GET['idFilm'])){
$idfilm = $_GET['idFilm'];
// select * from programme,film as f where date_projection="2022-01-22" and f.idFilm = "1" and f.idGenre="3" and YEAR(f.date_sortie)=2018
$req = "SELECT * FROM film as f , genre as g WHERE idFilm =$idfilm AND g.idGenre = f.idGenre";
$requete = $pdo->query($req);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="./css/style.css">
<link rel="stylesheet" href="https://unicons.iconscout.com/release/v4.0.0/css/line.css">
<link rel="icon" href="./logoCinema.png">
<style>
.inner-grid{
display: grid ;
grid-template-columns:30% 70% ;
border-bottom: 1px solid black ;
margin: 1em 0;
}
.grid{
display: grid ;
grid-template-columns:30% 70% ;
}
@media screen and (max-width:1048px) {
.grid{
display: grid ;
grid-template-columns:20% 80% ;
}
}
</style>
<title>CinemaTi</title>
</head>
<body>
<?php include './header.php'; ?>
<?php echo '<span style="display : none ;" id="programmeID">$idProgramme</span>'; ?>
<main class="">
<?php
if($requete->rowCount() > 0){
$film = $requete->fetch(PDO::FETCH_ASSOC);
?>
<div class="grid">
<div>
<a href="./movies.php" class="fixedarrow btn btn-primary mb-2"><i class="uil uil-left-arrow-from-left">Retour</i></a>
<img src="<?= $film['photo'] ?>" style="height:500px; width: 90%;" class="me-2" alt="">
</div>
<div>
<div class="d-flex justify-content-between p-2">
<h1 class="text-center"><?= $film['titre'] ?></h1>
</div>
<div class="inner-grid">
<h5>date de sortie </h5>
<h6><?= $film['date_sortie'] ?></h6>
</div>
<div class="inner-grid">
<h5 class="">type </h5>
<h6><?= $film['libelle'] ?></h6>
</div>
<div class="inner-grid">
<h5>description </h5>
<p class=""><?= $film['resume'] ?></p>
</div>
<div class="inner-grid">
<h5>Cast </h5>
<p class=""><?= $film['cast'] ?></p>
</div>
<div class="inner-grid">
<h5>Duree</h5>
<h5 class=""><?= $film['duree'] ?> Minutes</h5>
</div>
<div class="inner-grid">
<h5>en cours de projection</h5>
<h5 class=""><?php if($film['en_cours_de_projection']){echo "oui";}else{echo "non";} ?></h5>
</div>
<div class="inner-grid">
<h5>trailer</h5>
<h6> <a href="<?= $film['trailer'] ?>" target="_blank">trailer</a></h6>
</div>
</div>
</div
<?php
}else{
$film = $requete->fetch(PDO::FETCH_ASSOC);
?>
<div class="alert alert-danger m-5" role="alert" id="not-found">
Désolé, nous n'avons pas réussi à trouver le film</div>
<?php
}
}else{
header('location: ./');
}
}
?>
</main>
<div class="absoluteCart m-2 p-1"></div>
<script src="node_modules/jquery/dist/jquery.slim.min.js"></script>
<script src="node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="./javascript/panie.js"></script>
</body>
</html>