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 117
| <body>
<br>
<div class="titre">
<?php
$qry1 = "SELECT * FROM personne WHERE id = ".$_POST['person'];
$result = mysqli_query($connexion, $qry1);
$ligne = mysqli_fetch_array($result);
echo $ligne['nomfamille']." ".$ligne['prenom'];
$text = $_POST['person'];
?>
</div><br><br>
<?php
$qrycountsoiree = "SELECT count(*) as nb FROM chanson WHERE id in (SELECT idchanson FROM interprete WHERE idpersonne = ".$text.")";
$resultcountsoiree = mysqli_query($connexion, $qrycountsoiree);
$lignecountsoiree = mysqli_fetch_array($resultcountsoiree);
if($lignecountsoiree['nb'] > 0) {
echo "<table class='result'>";
echo "<tr><th colspan='7' class='result'>En tant qu'interprète</th></tr>";
$qrysoiree = "SELECT * FROM chanson WHERE id IN (SELECT idchanson FROM interprete WHERE idpersonne = ".$text.") ORDER by titre";
$resultsoiree = mysqli_query($connexion, $qrysoiree);
while ($lignesoiree = mysqli_fetch_array($resultsoiree))
{
extract($lignesoiree);
$chanson = $id;
$qryevent = "SELECT * FROM interpretation WHERE idchanson = ".$id;
$resultevent = mysqli_query($connexion, $qryevent);
$ligneevent = mysqli_fetch_array($resultevent);
$qryevent2 = "SELECT * FROM event WHERE id = ".$ligneevent['idevent'];
$resultevent2 = mysqli_query($connexion, $qryevent2);
$ligneevent2 = mysqli_fetch_array($resultevent2);
echo "<tr class='result2'>";
echo "<td class='result'><a class='titre' href='?".$id."'></form>".$titre."</a></td>";
echo "<td class='result'><a class='event' href='?".$ligneevent2['id']."'>".$ligneevent2['libel']."</a></td>";
echo "<td class='result'>";
$qryauteur = "SELECT idpersonne as auteur FROM auteur WHERE idchanson = ".$id;
$resultauteur = mysqli_query($connexion, $qryauteur);
while ($ligneauteur = mysqli_fetch_array($resultauteur))
{
extract($ligneauteur);
$qryauteur2 = "SELECT * FROM personne WHERE id = ".$auteur;
$resultauteur2 = mysqli_query($connexion, $qryauteur2);
$ligneauteur2 = mysqli_fetch_array($resultauteur2);
echo $ligneauteur2['prenom']." ".$ligneauteur2['nomfamille']."<br>";
}
echo "</td>";
echo "<td class='result'>";
$qrycompo = "SELECT idpersonne as compo FROM compositeur WHERE idchanson = ".$id;
$resultcompo = mysqli_query($connexion, $qrycompo);
while ($lignecompo = mysqli_fetch_array($resultcompo))
{
extract($lignecompo);
$qrycompo2 = "SELECT * FROM personne WHERE id = ".$compo;
$resultcompo2 = mysqli_query($connexion, $qrycompo2);
$lignecompo2 = mysqli_fetch_array($resultcompo2);
echo $lignecompo2['prenom']." ".$lignecompo2['nomfamille']."<br>";
}
echo "</td>";
echo "<td class='result'>";
$qryinter = "SELECT idpersonne as inter FROM interprete WHERE idchanson = ".$id;
$resultinter = mysqli_query($connexion, $qryinter);
while ($ligneinter = mysqli_fetch_array($resultinter))
{
extract($ligneinter);
$qryinter2 = "SELECT * FROM personne WHERE id = ".$inter;
$resultinter2 = mysqli_query($connexion, $qryinter2);
$ligneinter2 = mysqli_fetch_array($resultinter2);
echo $ligneinter2['prenom']." ".$ligneinter2['nomfamille']."<br>";
}
echo "</td>";
echo "<td class='result'>";
$qryharmo = "SELECT idpersonne as harmo FROM harmonisateur WHERE idchanson = ".$id;
$resultharmo = mysqli_query($connexion, $qryharmo);
while ($ligneharmo = mysqli_fetch_array($resultharmo))
{
extract($ligneharmo);
$qryharmo2 = "SELECT * FROM personne WHERE id = ".$harmo;
$resultharmo2 = mysqli_query($connexion, $qryharmo2);
$ligneharmo2 = mysqli_fetch_array($resultharmo2);
echo $ligneharmo2['prenom']." ".$ligneharmo2['nomfamille']."<br>";
}
echo "</td>";
echo "<td class='result'>";
$qrydocs = "SELECT * FROM doctype";
$resultdocs = mysqli_query($connexion, $qrydocs);
while ($lignedocs = mysqli_fetch_array($resultdocs))
{
extract($lignedocs);
$qrydoc = "SELECT count(*) as nb FROM document WHERE doctype IN (SELECT doctype FROM document WHERE idchanson = ".$chanson." AND doctype = ".$id.")";
$resultdoc = mysqli_query($connexion, $qrydoc);
while ($lignedoc = mysqli_fetch_array($resultdoc))
extract($lignedoc);
{
if($nb>0){
echo "<img src='img/type".$id.".png' title='".$type."'> ";
}
else {
echo "<img src='img/type0.png'> ";
}
}
}
echo "</td>";
}
echo "</tr></table><br>";
}
?> |
Partager