-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspectacleForum.php
More file actions
100 lines (88 loc) · 3.99 KB
/
spectacleForum.php
File metadata and controls
100 lines (88 loc) · 3.99 KB
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
<?php
session_start();
$titre = 'spectacle';
include('start.php');
include('BDD.php');
?>
<?php /* include("head.php"); */ ?>
<?php
include("header.php");
include("nav.php");
?>
<section>
<aside class ="new">
<?php
include('nouveauteEvenement.php');
if (!isset($_SESSION['ID'])) {
include("connexion.php");
}
if (isset($_SESSION['SWITCH']) AND $_SESSION['SWITCH'] == "organisateur" AND $_SESSION['ID'] != null) {
?>
<div class="positionBouton">
<a href="creationEvenement.php"><img src ="img/ampouleCreerEvenement.png"/></a>
</div>
<?php
}
?>
</aside>
<aside class ="navg">
<?php include ("arbre.php"); ?>
</aside>
<article>
<?php if (isset($_SESSION['SWITCH']) AND ($_SESSION['SWITCH'] == "organisateur" OR $_SESSION['SWITCH'] == "participant" )
AND $_SESSION['ID'] != null) { ?>
<div class="creerTopic">
<a href="ajouterSujet.php?idSouscategorie=4"> Ajouter un sujet</a>
</div>
<?php } ?>
<div class="backPage">
<a href="indexForum.php" alt="retour à l'accueil du forum" title="Retour à l'accueil du forum"> Retour à l'accueil</a>
</div>
<?php
$tab_info_spectacle = array();
$var_tab_info_array = 0;
$req = $bdd->query('(SELECT organisateur.pseudo,topicforum.* FROM topicforum, souscategorieforum,organisateur WHERE souscategorieforum.ID = 4
AND topicforum.id_souscategorie = souscategorieforum.ID
AND topicforum.id_organisateur = organisateur.id
)
UNION
(
SELECT participant.pseudo,topicforum.* FROM topicforum,souscategorieforum,participant WHERE souscategorieforum.ID=4
AND topicforum.id_souscategorie = souscategorieforum.ID
AND topicforum.id_participant = participant.id)');
while ($donnees = $req->fetch()) {
$tab_info_spectacle[$var_tab_info_array][0] = $donnees["nom"];
$tab_info_spectacle[$var_tab_info_array][1] = $donnees["commentaire"];
$tab_info_spectacle[$var_tab_info_array][2] = $donnees["date_creation"];
$tab_info_spectacle[$var_tab_info_array][3] = $donnees["id"];
$tab_info_spectacle[$var_tab_info_array][4] = $donnees["pseudo"];
$var_tab_info_array++;
}
?>
<div class="navigationForum">
<div class="sousMenuBasculeForum">
<span> Spectacle </span>
<div class="sousMenuForumBeta">
<table class="affichageTableau">
<tr class="barreDeTitre">
<th class="sujet"> Sujet </th>
<th class="dernierMessage"> Dernier message </th>
<th class="auteur"> Auteur </th>
<th class="dateDecreation"> Date de création </th>
</tr>
<?php for ($a = 0; $a < count($tab_info_spectacle); $a++) {
?>
<tr class="affichageSujet">
<td class="contenuMessage"><a href="commentaireForum.php?idTopic=<?php echo $tab_info_spectacle[$a][3] ?>&titreTopic=<?php echo $tab_info_spectacle[$a][0]; ?>"><?php echo $tab_info_spectacle[$a][0]; ?></a></td>
<td class="message"><?php echo $tab_info_spectacle[$a][1]; ?></td>
<td class="auteur"><?php echo $tab_info_spectacle[$a][4]; ?></td>
<td class="date"><?php echo $tab_info_spectacle[$a][2]; ?></td>
</tr>
<?php } ?>
</table>
</div>
</div>
</div>
</article>
</section>
<?php include('footer.php'); ?>