travail en colab avec alexis et nicolas sur un partage

This commit is contained in:
Ghouar-Toussaint Rafael 2024-06-16 02:03:06 +02:00
parent 32378720ad
commit 3f767f5ea4
7 changed files with 46 additions and 32 deletions

View File

@ -0,0 +1,15 @@
<?php defined('BASEPATH') OR exit('No direct script access allowed');
class Evenement_info extends CI_Controller{
public function view($id){
$this->load->model('Model_site');
$event=$this->Model_site->get_evenement($id);
$com=$this->Model_site->get_commentaire($id);
$data=array('event' => $event, 'com' => $com);
$this->load->view('header');
$this->load->view('evenement_info',$data);
$this->load->view('footer');
}
}

View File

@ -7,28 +7,17 @@ class Model_site extends CI_MODEL {
$this->load->database(); $this->load->database();
} }
public function get_films()
{
$res=$this->db->query("SELECT Film.titre, Film.annee, Film.idFilm,
Film.genre, Artiste.nom, Artiste.prenom
from Film INNER JOIN Artiste
where Film.idMes=Artiste.idArtiste
ORDER by Film.titre
");
return $res->result_array();
}
public function get_fiche($id) public function get_evenement($id)
{ {
$res=$this->db->query("SELECT * from Film INNER JOIN Artiste $res=$this->db->query("SELECT * from evenement WHERE id=$id");
where Film.idMes=Artiste.idArtiste AND idFilm=$id");
return $res->row(); return $res->row();
} }
public function get_actors($id) public function get_commentaire($id)
{ {
$res=$this->db->query("SELECT prenom, nom, nomRole from Artiste INNER JOIN Role $res=$this->db->query("SELECT * FROM commentaire WHERE id_event=$id");
where Role.idActeur=Artiste.idArtiste AND Role.idFilm=$id");
return $res->result_array(); return $res->result_array();
} }

View File

@ -0,0 +1 @@
<?php echo "hello"; ?>

View File

@ -1,9 +1,4 @@
/*Pour toutes les pages : */ /*Pour toutes les pages : */
@font-face {
font-family: "RobotoFlex";
src: url(/assets/RobotoFlex.ttf);
font-display: swap;
}
html, body { html, body {
height: 100%; height: 100%;
@ -20,7 +15,6 @@
background-attachment: fixed; background-attachment: fixed;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
font-family: "RobotoFlex";
} }
body::before{ body::before{
@ -31,7 +25,8 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
background: rgba(0, 0, 0, 0.6); background: rgba(0, 0, 0, 0.6);
z-index: -1;} z-index: -1;
}
#content.index { #content.index {
flex: 1; flex: 1;
@ -59,6 +54,7 @@
background-image: url(../img/ouiouibaguette.jpg); background-image: url(../img/ouiouibaguette.jpg);
padding: 10px 0; padding: 10px 0;
text-align: center; text-align: center;
} }
a.categorie{ a.categorie{
@ -183,6 +179,10 @@
border-radius: 50px; border-radius: 50px;
text-align: center; text-align: center;
font-size: 140%; font-size: 140%;
line-height: 160px; line-height: 170%;
color: #000000;
} }
.Event{
color: #ffffff;
}

View File

@ -62,9 +62,18 @@ $event = mysqli_stmt_get_result($stmt);
<header> <header>
<h1 class='Hello'>Liste des Évènements</h1> <h1 class='Hello'>Liste des Évènements</h1>
<nav> <nav>
<a href="../" class="categorie">Page d'accueil</a> <?php
<a href='profil.php'><img class='profil' src='https://dwarves.iut-fbleau.fr/~ghouar-t/SaeDEV2.2/img/photo-profil.png' alt='profil'></a> if (isset($_SESSION['login'])) {
<a href='deconnexion.php' class='categorie'>Déconnexion</a> echo " <a href='../' class='categorie'>Page d'accueil</a>";
echo " <a href='profil.php'><img class='profil' src='https://dwarves.iut-fbleau.fr/~ghouar-t/SaeDEV2.2/img/photo-profil.png' alt='profil'></a>";
echo "<a href='deconnexion.php' class='categorie'>Déconnexion</a>";
}
else {
echo "<a href='../' class='categorie'>Page d'accueil</a>";
echo "<a href='connexion.php' class='categorie'>Connexion</a>";
echo "<a href='inscription.php' class='categorie'>Inscription</a>";
}
?>
</nav> </nav>
</header> </header>
<div class="ListeEvenement"> <div class="ListeEvenement">
@ -82,16 +91,16 @@ $event = mysqli_stmt_get_result($stmt);
<table> <table>
<thead> <thead>
<tr> <tr>
<th scope="col"><a href="?order_by=Sport&order_dir=<?php echo $order_by == 'Sport' && $order_dir == 'ASC' ? 'DESC' : 'ASC'; ?>">Sport</a></th> <br><th class="Event" scope="col"><a href="?order_by=Sport&order_dir=<?php echo $order_by == 'Sport' && $order_dir == 'ASC' ? 'DESC' : 'ASC'; ?>">Sport</a></th>
<th scope="col"><a href="?order_by=Lieux&order_dir=<?php echo $order_by == 'Lieux' && $order_dir == 'ASC' ? 'DESC' : 'ASC'; ?>">Lieux de l'évènement</a></th> <th class="Event" scope="col"><a href="?order_by=Lieux&order_dir=<?php echo $order_by == 'Lieux' && $order_dir == 'ASC' ? 'DESC' : 'ASC'; ?>">Lieux de l'évènement</a></th>
<th scope="col"><a href="?order_by=Date&order_dir=<?php echo $order_by == 'Date' && $order_dir == 'ASC' ? 'DESC' : 'ASC'; ?>">Date</a></th> <th class="Event" scope="col"><a href="?order_by=Date&order_dir=<?php echo $order_by == 'Date' && $order_dir == 'ASC' ? 'DESC' : 'ASC'; ?>">Date</a></th>
<th scope="col"><a href="?order_by=NbInscrit&order_dir=<?php echo $order_by == 'NbInscrit' && $order_dir == 'ASC' ? 'DESC' : 'ASC'; ?>">Nombre de Participant</a></th> <th class="Event" scope="col"><a href="?order_by=NbInscrit&order_dir=<?php echo $order_by == 'NbInscrit' && $order_dir == 'ASC' ? 'DESC' : 'ASC'; ?>">Nombre de Participant</a></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php <?php
while ($row = mysqli_fetch_assoc($event)) { while ($row = mysqli_fetch_assoc($event)) {
echo "<tr> <td>".$row['Sport']."</td><td>".$row['Lieux']."</td><td>".$row['Date']."</td><td>".$row['NbInscrit']."</td></tr>"; echo "<tr > <th scope='row' class='Event'><a href='/~ghouar-t/SaeDEV2.2/CI3/index.php/Evenement_info/view/{$row['id']}'><br>".$row['Sport']."</th><th><br>".$row['Lieux']."</th><th><br>".$row['Date']."</th><th><br>".$row['NbInscrit']."</th></tr>";
} }
?> ?>
</tbody> </tbody>