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
| <html>
<title>
Liste complète des films
</title>
<link href="presentation.css" rel="stylesheet" type="text/css"/>
<?php
if(isset($_POST['requete']) && $_POST['requete'] != NULL)
{
mysql_connect('localhost','root','');
mysql_select_db('videotheque');
$requete = htmlspecialchars($_POST['requete']);
$query = mysql_query("select distinct (titre), annee, resume, duree, GROUP_CONCAT((CONCAT(prenomartiste,' ', nomartiste))SEPARATOR '; ') as acteur from film, artiste, casting WHERE film.IDFILM=casting.IDFILM AND artiste.IDARTISTE=casting.IDACT GROUP BY titre, annee, resume, duree DESC") or die (mysql_error());
$nb_resultats = mysql_num_rows($query);
if($nb_resultats != 0)
{
?>
<h3>Liste complète de nos films disponibles.</h3>
<p>Cette liste se compose de <?php echo $nb_resultats;
if($nb_resultats > 1)
{ echo ' films '; }
else
{ echo ' film '; }
?>
.<br/>
<br/>
<table border=2 CELLPADDING=6 CELLSPACING=6 WIDTH=100% align=center>
<tr>
<td align=center><B>Titre du film</td>
<td align=center>Année de sortie</td>
<td align=center>Acteurs</td>
<td align=center>Résumé</td>
<td align=center>Durée en minutes</td>
<td align=center>Modifier</td>
</tr>
<tr>
<?php
while($donnees = mysql_fetch_array($query))
{
?>
</tr>
<td align=center><B><I><?php echo $donnees['titre']; ?></a><br/></td>
<td align=center><?php echo $donnees['annee']; ?></a><br/></td>
<td><?php echo $donnees['acteur']; ?></a><br/></td>
<td><?php echo $donnees['resume']; ?></a><br/></td>
<td align=center><?php echo $donnees['duree']; ?></a><br/></td>
<td align=center><input type='submit' value='Modifier'></a><br/></td>
<?php
?>
<?php
}
?>
</td>
</table>
</br>
</br>
<a href="choix.php"> Faire une nouvelle recherche</a></p>
<?php
}
else
{
?>
<?php
}
mysql_close();
}
else
{
?>
<form action="film_all.php" method="Post">
<input type="submit" value="Voir tous nos films disponibles" name="requete">
</form>
<?php
}
?>
</html> |
Partager