4 |
david |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/***************************************************************************\
|
|
|
4 |
* SPIP, Systeme de publication pour l'internet *
|
|
|
5 |
* *
|
|
|
6 |
* Copyright (c) 2001-2005 *
|
|
|
7 |
* Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
|
|
|
8 |
* *
|
|
|
9 |
* Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
|
|
|
10 |
* Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
|
|
|
11 |
\***************************************************************************/
|
|
|
12 |
|
|
|
13 |
|
|
|
14 |
include ("inc.php3");
|
|
|
15 |
|
|
|
16 |
// cette page gere les deux types de forums ; forum_admin.php3 n'est qu'une coquille vide
|
|
|
17 |
if ($admin=='oui') {
|
|
|
18 |
debut_page(_T('titre_page_forum'), "redacteurs", "privadm");
|
|
|
19 |
$statutforum = 'privadm';
|
|
|
20 |
$logo = "forum-admin-24.gif";
|
|
|
21 |
$urlforum = 'forum_admin.php3';
|
|
|
22 |
} else {
|
|
|
23 |
debut_page(_T('titre_forum'), "redacteurs", "forum-interne");
|
|
|
24 |
$statutforum = 'privrac';
|
|
|
25 |
$logo = "forum-interne-24.gif";
|
|
|
26 |
$urlforum = 'forum.php3';
|
|
|
27 |
}
|
|
|
28 |
|
|
|
29 |
debut_gauche();
|
|
|
30 |
|
|
|
31 |
|
|
|
32 |
//
|
|
|
33 |
// Raccourcis
|
|
|
34 |
//
|
|
|
35 |
/*
|
|
|
36 |
debut_raccourcis();
|
|
|
37 |
// rien
|
|
|
38 |
fin_raccourcis();
|
|
|
39 |
*/
|
|
|
40 |
|
|
|
41 |
|
|
|
42 |
debut_droite();
|
|
|
43 |
|
|
|
44 |
if ($admin=='oui')
|
|
|
45 |
gros_titre(_T('titre_cadre_forum_administrateur'));
|
|
|
46 |
else
|
|
|
47 |
gros_titre(_T('titre_cadre_forum_interne'));
|
|
|
48 |
|
|
|
49 |
if ($admin == 'oui' AND $connect_statut != "0minirezo") {
|
|
|
50 |
echo _T('avis_non_acces_page');
|
|
|
51 |
exit;
|
|
|
52 |
}
|
|
|
53 |
|
|
|
54 |
echo "<div class='serif2'>";
|
|
|
55 |
|
|
|
56 |
if (!$debut) $debut = 0;
|
|
|
57 |
|
|
|
58 |
$query_forum = "SELECT COUNT(*) AS cnt FROM spip_forum WHERE statut='$statutforum' AND id_parent=0";
|
|
|
59 |
$result_forum = spip_query($query_forum);
|
|
|
60 |
$total = 0;
|
|
|
61 |
if ($row = spip_fetch_array($result_forum)) $total = $row['cnt'];
|
|
|
62 |
|
|
|
63 |
if ($total > 10) {
|
|
|
64 |
echo "<p>";
|
|
|
65 |
for ($i = 0; $i < $total; $i = $i + 10){
|
|
|
66 |
if ($i > 0) echo " | ";
|
|
|
67 |
if ($i == $debut)
|
|
|
68 |
echo "<FONT SIZE=3><B>$i</B></FONT>";
|
|
|
69 |
else
|
|
|
70 |
echo "<A HREF='$urlforum?debut=$i'>$i</A>";
|
|
|
71 |
}
|
|
|
72 |
}
|
|
|
73 |
|
|
|
74 |
|
|
|
75 |
|
|
|
76 |
echo "<p><div align='center'>";
|
|
|
77 |
icone (_T('icone_poster_message'), "forum_envoi.php3?statut=$statutforum&adresse_retour=$urlforum&titre_message=".urlencode(filtrer_entites(_T('texte_nouveau_message'))), $logo, "creer.gif");
|
|
|
78 |
echo "</div>";
|
|
|
79 |
|
|
|
80 |
|
|
|
81 |
echo "<P align='left'>";
|
|
|
82 |
|
|
|
83 |
$query_forum="SELECT * FROM spip_forum WHERE statut='$statutforum' AND id_parent=0 ORDER BY date_heure DESC LIMIT $debut,10";
|
|
|
84 |
$result_forum=spip_query($query_forum);
|
|
|
85 |
|
|
|
86 |
afficher_forum($result_forum,$urlforum);
|
|
|
87 |
|
|
|
88 |
echo "</div>";
|
|
|
89 |
|
|
|
90 |
|
|
|
91 |
fin_page();
|
|
|
92 |
|
|
|
93 |
?>
|
|
|
94 |
|