forked from ghouar-t/SaeDEV2.2
travail en colab avec alexis et nicolas sur un partage
This commit is contained in:
parent
32378720ad
commit
3f767f5ea4
15
CI3/application/controllers/Evenement_info.php
Normal file
15
CI3/application/controllers/Evenement_info.php
Normal 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');
|
||||
}
|
||||
|
||||
}
|
@ -7,28 +7,17 @@ class Model_site extends CI_MODEL {
|
||||
$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
|
||||
where Film.idMes=Artiste.idArtiste AND idFilm=$id");
|
||||
$res=$this->db->query("SELECT * from evenement WHERE id=$id");
|
||||
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
|
||||
where Role.idActeur=Artiste.idArtiste AND Role.idFilm=$id");
|
||||
$res=$this->db->query("SELECT * FROM commentaire WHERE id_event=$id");
|
||||
return $res->result_array();
|
||||
}
|
||||
|
||||
|
1
CI3/application/views/evenement_info.php
Normal file
1
CI3/application/views/evenement_info.php
Normal file
@ -0,0 +1 @@
|
||||
<?php echo "hello"; ?>
|
@ -1,9 +1,4 @@
|
||||
/*Pour toutes les pages : */
|
||||
@font-face {
|
||||
font-family: "RobotoFlex";
|
||||
src: url(/assets/RobotoFlex.ttf);
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
@ -20,7 +15,6 @@
|
||||
background-attachment: fixed;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
font-family: "RobotoFlex";
|
||||
}
|
||||
|
||||
body::before{
|
||||
@ -31,7 +25,8 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
z-index: -1;}
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
#content.index {
|
||||
flex: 1;
|
||||
@ -59,6 +54,7 @@
|
||||
background-image: url(../img/ouiouibaguette.jpg);
|
||||
padding: 10px 0;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
a.categorie{
|
||||
@ -183,6 +179,10 @@
|
||||
border-radius: 50px;
|
||||
text-align: center;
|
||||
font-size: 140%;
|
||||
line-height: 160px;
|
||||
line-height: 170%;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.Event{
|
||||
color: #ffffff;
|
||||
}
|
@ -62,9 +62,18 @@ $event = mysqli_stmt_get_result($stmt);
|
||||
<header>
|
||||
<h1 class='Hello'>Liste des Évènements</h1>
|
||||
<nav>
|
||||
<a href="../" class="categorie">Page d'accueil</a>
|
||||
<a href='profil.php'><img class='profil' src='https://dwarves.iut-fbleau.fr/~ghouar-t/SaeDEV2.2/img/photo-profil.png' alt='profil'></a>
|
||||
<a href='deconnexion.php' class='categorie'>Déconnexion</a>
|
||||
<?php
|
||||
if (isset($_SESSION['login'])) {
|
||||
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>
|
||||
</header>
|
||||
<div class="ListeEvenement">
|
||||
@ -82,16 +91,16 @@ $event = mysqli_stmt_get_result($stmt);
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th 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 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>
|
||||
<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 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 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 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>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
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>
|
||||
|
Loading…
Reference in New Issue
Block a user