Subversion Repositories Sites.tela-botanica.org

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
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
include_ecrire ("inc_index.php3");
16
include_ecrire ("inc_logos.php3");
17
 
18
 
19
 
20
$query = "SELECT titre, id_rubrique FROM spip_articles WHERE id_article='$id_article'";
21
$result = spip_query($query);
22
 
23
while($row = spip_fetch_array($result)) {
24
	$titre = $row["titre"];
25
	$id_rubrique = $row["id_rubrique"];
26
}
27
 
28
 
29
debut_page($titre, "documents", "articles");
30
 
31
 
32
 
33
debut_grand_cadre();
34
 
35
afficher_hierarchie($id_rubrique);
36
 
37
fin_grand_cadre();
38
 
39
 
40
 
41
debut_gauche();
42
 
43
 
44
debut_boite_info();
45
 
46
echo "<FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=2>";
47
echo "<P align=left>"._T('info_gauche_suivi_forum');
48
 
49
echo aide ("suiviforum");
50
echo "</FONT>";
51
 
52
fin_boite_info();
53
 
54
 
55
debut_droite();
56
 
57
 
58
echo "\n<table cellpadding=0 cellspacing=0 border=0 width='100%'>";
59
echo "<tr width='100%'>";
60
echo "<td>";
61
	icone(_T('icone_retour'), "articles.php3?id_article=$id_article", "article-24.gif", "rien.gif");
62
 
63
echo "</td>";
64
echo "<td>" . http_img_pack('rien.gif', " ", "width='10'") ."</td>\n";
65
echo "<td width='100%'>";
66
echo _T('texte_messages_publics');
67
gros_titre($titre);
68
echo "</td></tr></table>";
69
echo "<p>";
70
 
71
// Ne pas donner les cles du forum a des non-admins
72
if (! ($connect_statut=='0minirezo' AND acces_rubrique($id_rubrique)))
73
	return;
74
 
75
echo "<div class='serif2'>";
76
 
77
// reglages
78
if (!$debut) $debut = 0;
79
$pack = 5;		// nb de forums affiches par page
80
$enplus = 200;	// intervalle affiche autour du debut
81
$limitdeb = ($debut > $enplus) ? $debut-$enplus : 0;
82
$limitnb = $debut + $enplus - $limitdeb;
83
 
84
$query_forum = "SELECT id_forum FROM spip_forum WHERE id_article='$id_article' AND id_parent=0 AND statut IN ('publie', 'off', 'prop') LIMIT $limitdeb, $limitnb";
85
$result_forum = spip_query($query_forum);
86
 
87
 
88
$i = $limitdeb;
89
if ($i>0)
90
	echo "<A HREF='articles_forum.php3?id_article=$id_article&page=$page'>0</A> ... | ";
91
while ($row = spip_fetch_array($result_forum)) {
92
 
93
	// barre de navigation
94
	if ($i == $pack*floor($i/$pack)) {
95
		if ($i == $debut)
96
			echo "<FONT SIZE=3><B>$i</B></FONT>";
97
		else
98
			echo "<A HREF='articles_forum.php3?id_article=$id_article&debut=$i&page=$page'>$i</A>";
99
		echo " | ";
100
	}
101
 
102
	// elements a controler
103
 
104
	$i ++;
105
}
106
echo "<A HREF='articles_forum.php3?id_article=$id_article&debut=$i&page=$page'>...</A>";
107
 
108
echo "</div>";
109
 
110
 
111
$mots_cles_forums = lire_meta("mots_cles_forums");
112
 
113
if ($connect_statut == "0minirezo") {
114
	$query_forum = "SELECT pied.*, max(thread.date_heure) AS date
115
		FROM spip_forum AS pied, spip_forum AS thread
116
		WHERE pied.id_article='$id_article'
117
		AND pied.id_parent=0
118
		AND pied.statut IN ('publie', 'off', 'prop')
119
		AND thread.id_thread=pied.id_forum
120
		GROUP BY id_thread
121
		ORDER BY date DESC LIMIT $debut, $pack";
122
	$result_forum = spip_query($query_forum);
123
	afficher_forum($result_forum, $forum_retour, $id_article);
124
}
125
 
126
echo "</FONT>";
127
 
128
fin_page();
129
 
130
?>