-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathforum.php
107 lines (99 loc) · 3.96 KB
/
forum.php
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
<?php
include_once("./includes.php");
entete("Forum");
verif_connexion();
?>
<div class="container">
<ul class="breadcrumb">
<li>
<a href="./index.php">Home</a> <span class="divider">/</span>
<?php
$req_connexion=query("select idCat, nomCat from categorie c,forum f where c.idCat = f.id_Cat and f.idForum='".$_GET['id']."'");
while ($row = mysql_fetch_array($req_connexion, MYSQL_NUM))
{
echo "<a href=./categorie.php?id=".$row[0].">".$row[1]."</a><span class='divider'> /</span>";
$req_connexion1=query("select * from forum where idforum='".$_GET['id']."'");
while ($row = mysql_fetch_array($req_connexion1, MYSQL_NUM))
{
echo "<a href=./forum.php?id=".$row[0].">".$row[1]."</a>";
}
}
?>
</li>
</ul>
<!------------------ SOUS-FORUMS ------------------>
<?php
$forum_connexion=query("SELECT idForumPere FROM forum WHERE idForum='".$_GET['id']."'");
$forum_find=mysql_fetch_array($forum_connexion);
$forum=$forum_find[0];
if($forum!=0)
{
}else
{
echo"<div class='well'>
<legend>Sous-Forum</legend>
<table class='table table-bordered table-condensed'>
<thead>
<tr class='row'>
<th><center>Forums </center></th>
<th>Sujets</th>
<th>Messages</th>
<th>Dernier Messages</th>
</tr>
</thead>
<tbody>";
$req_connexion=query("select * from forum where idForumPere='".$_GET['id']."'");
while ($row = mysql_fetch_array($req_connexion, MYSQL_NUM))
{
echo " <tr class='row'>
<td><a href='./forum.php?id=".$row[0]."'>".$row[1]."</a></td>
<td></td>
<td></td>
<td></td>
</tr>
";
}
echo"</tbody>
</table>
</div>";
}
?>
<!------------------ TOPICS ------------------>
<div class="well">
<legend>Topics</legend>
<table class="table table-bordered table-condensed">
<thead>
<tr class="row">
<th><center>Sujets</center></th>
<th>Auteur</th>
<th>Réponse</th>
<th>Vues</th>
<th>Dernier Message</th>
</tr>
</thead>
<tbody>
<?php
$req_connexion=query("select * from topic where id_Forum='".$_GET['id']."'");
while ($row = mysql_fetch_array($req_connexion, MYSQL_NUM))
{
echo " <tr class='row'>
<td><a href='./topic.php?id=".$row[0]."'>".$row[1]."</a></td>";
$util_connexion=query("SELECT pseudo FROM utilisateur WHERE idUtil='".$row[4]."'");
$util_find=mysql_fetch_array($util_connexion);
$util=$util_find[0];
echo "<td>".$util."</td>
<td></td>
<td></td>
<td></td>
</tr>";
}
echo"</tbody>
</table>
<div class='btn-group form-actions'>
<a href='./addTopic.php?id=".$_GET['id']."' class='btn btn-success'>Nouveau</a>
</div>";
?>
</div>
<?php
pied();
?>