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
 
16
debut_html();
17
 
18
	if ($spip_ecran == "large") {
19
		$nb_col = 4;
20
	} else {
21
		$nb_col = 3;
22
	}
23
 
24
	if ($effacer_suivant == "oui") {
25
		for ($i = $frame+1; $i < $nb_col; $i++) {
26
			echo "<script>parent.iframe$i.location.href='brouteur_frame.php3?frame=$i'</script>";
27
		}
28
	}
29
	echo "<div class='arial2'>";
30
 
31
 
32
	if ($special == "redac") {
33
		$query = "SELECT articles.id_article, articles.titre, articles.statut FROM spip_articles AS articles, spip_auteurs_articles AS lien WHERE articles.statut = 'prepa' AND articles.id_article = lien.id_article AND lien.id_auteur = $connect_id_auteur GROUP BY id_article ORDER BY articles.date DESC";
34
		$result=spip_query($query);
35
		if (spip_num_rows($result)>0) {
36
			echo "<div style='padding-top: 6px; padding-bottom: 3px;'><b class='verdana2'>"._T("info_cours_edition")."</b></div>";
37
			echo "<div class='plan-articles'>";
38
			while($row=spip_fetch_array($result)){
39
				$id_article=$row['id_article'];
40
				$titre = typo($row['titre']);
41
				$statut = $row['statut'];
42
				echo "<a class='$statut' href='javascript:window.parent.location=\"articles.php3?id_article=$id_article\"'>$titre</a>";
43
			}
44
			echo "</div>";
45
		}
46
 
47
	}
48
	else if ($special == "valider") {
49
		$query = "SELECT articles.id_article, articles.titre, articles.statut FROM spip_articles AS articles WHERE articles.statut = 'prop' ORDER BY articles.date DESC";
50
		$result=spip_query($query);
51
		if (spip_num_rows($result)>0) {
52
			echo "<div style='padding-top: 6px; padding-bottom: 3px;'><b class='verdana2'>"._T("info_articles_proposes")."</b></div>";
53
			echo "<div class='plan-articles'>";
54
			while($row=spip_fetch_array($result)){
55
				$id_article=$row['id_article'];
56
				$titre = typo($row['titre']);
57
				$statut = $row['statut'];
58
				echo "<a class='$statut' href='javascript:window.parent.location=\"articles.php3?id_article=$id_article\"'>$titre</a>";
59
			}
60
			echo "</div>";
61
		}
62
 
63
		$query = "SELECT * FROM spip_breves WHERE statut = 'prop' ORDER BY date_heure DESC LIMIT 0, 20";
64
		$result=spip_query($query);
65
		if (spip_num_rows($result)>0) {
66
			echo "<div style='padding-top: 6px;'><b class='verdana2'>"._T("info_breves_valider")."</b></div>";
67
			echo "<div class='plan-articles'>";
68
			while($row=spip_fetch_array($result)){
69
				$id_breve=$row['id_breve'];
70
				$titre = typo($row['titre']);
71
				$statut = $row['statut'];
72
				$puce = "puce-orange-breve.gif";
73
				echo "<a class='$statut' href='javascript:window.parent.location=\"breves_voir.php3?id_breve=$id_breve\"'>$titre</a>";
74
			}
75
			echo "</div>";
76
		}
77
 
78
	}
79
	else {
80
	  if (isset($id_rubrique) && ($id_rubrique !== ''))
81
 {
82
 
83
		$query = "SELECT * FROM spip_rubriques WHERE id_rubrique='$id_rubrique' ORDER BY 0+titre, titre";
84
		$result=spip_query($query);
85
		if ($row=spip_fetch_array($result)){
86
			$ze_rubrique=$row['id_rubrique'];
87
			$titre = typo($row['titre']);
88
			$id_parent=$row['id_parent'];
89
 
90
			if ($id_parent == 0) $icone = "secteur-24.gif";
91
			else $icone = "rubrique-24.gif";
92
 
93
			echo "<div style='background-color: #cccccc; border: 1px solid #444444;'>";
94
			icone_horizontale("$titre", "javascript:window.parent.location=\"naviguer.php3?id_rubrique=$id_rubrique\"", "$icone","");
95
			echo "</div>";
96
		}  else if ($frame == 0) {
97
			echo "<div style='background-color: #cccccc; border: 1px solid #444444;'>";
98
			icone_horizontale(_T('info_racine_site'), "javascript:window.parent.location=\"naviguer.php3\"", "racine-site-24.gif","");
99
			echo "</div>";
100
		}
101
 
102
 
103
		$query = "SELECT * FROM spip_rubriques WHERE id_parent='$id_rubrique' ORDER BY 0+titre, titre";
104
		$result=spip_query($query);
105
		while($row=spip_fetch_array($result)){
106
			$ze_rubrique=$row['id_rubrique'];
107
			$titre = typo($row['titre']);
108
			$id_parent=$row['id_parent'];
109
 
110
			echo "<div class='brouteur_rubrique' onMouseOver=\"changeclass(this, 'brouteur_rubrique_on');\" onMouseOut=\"changeclass(this, 'brouteur_rubrique');\">";
111
 
112
			if ($id_parent == '0') 	{
113
			  echo "<div style='background-image: url(" . _DIR_IMG_PACK . "secteur-24.gif);'><a href='brouteur_frame.php3?id_rubrique=$ze_rubrique&frame=".($frame+1)."&effacer_suivant=oui' target='iframe".($frame+1)."'>$titre</a></div>";
114
			}
115
			else {
116
				if ($frame+1 < $nb_col)
117
				  echo "<div style='background-image: url(" . _DIR_IMG_PACK . "rubrique-24.gif);'><a href='brouteur_frame.php3?id_rubrique=$ze_rubrique&frame=".($frame+1)."&effacer_suivant=oui' target='iframe".($frame+1)."'>$titre</a></div>";
118
				else  echo "<div style='background-image: url(" . _DIR_IMG_PACK . "rubrique-24.gif);'><a href='javascript:window.parent.location=\"brouteur.php3?id_rubrique=$ze_rubrique\"'>$titre</a></div>";
119
			}
120
			echo "</div>\n";
121
		}
122
 
123
 
124
		if ($id_rubrique > 0) {
125
			if ($connect_statut == "0minirezo") $query = "SELECT articles.id_article, articles.titre, articles.statut FROM spip_articles AS articles WHERE id_rubrique=$id_rubrique ORDER BY date DESC";
126
			else $query = "SELECT articles.id_article, articles.titre, articles.statut FROM spip_articles AS articles, spip_auteurs_articles AS lien WHERE articles.id_rubrique=$id_rubrique AND (articles.statut = 'publie' OR articles.statut = 'prop' OR (articles.statut = 'prepa' AND articles.id_article = lien.id_article AND lien.id_auteur = $connect_id_auteur)) GROUP BY id_article ORDER BY articles.date DESC";
127
			$result=spip_query($query);
128
			if (spip_num_rows($result)>0) {
129
				echo "<div style='padding-top: 6px; padding-bottom: 3px;'><b class='verdana2'>"._T('info_articles')."</b></div>";
130
				echo "<div class='plan-articles'>";
131
				while($row=spip_fetch_array($result)){
132
					$id_article=$row['id_article'];
133
					$titre = typo($row['titre']);
134
					$statut = $row['statut'];
135
					echo "<a class='$statut' href='javascript:window.parent.location=\"articles.php3?id_article=$id_article\"'>$titre</a>";
136
				}
137
				echo "</div>";
138
			}
139
 
140
			$query = "SELECT * FROM spip_breves WHERE id_rubrique=$id_rubrique ORDER BY date_heure DESC LIMIT 0, 20";
141
			$result=spip_query($query);
142
			if (spip_num_rows($result)>0) {
143
				echo "<div style='padding-top: 6px;'><b class='verdana2'>"._T('info_breves_02')."</b></div>";
144
				echo "<div class='plan-articles'>";
145
				while($row=spip_fetch_array($result)){
146
					$id_breve=$row['id_breve'];
147
					$titre = typo($row['titre']);
148
					$statut = $row['statut'];
149
					switch ($statut) {
150
						case 'publie':
151
							$puce = 'verte';
152
								break;
153
						case 'prepa':
154
							$puce = 'blanche';
155
							break;
156
						case 'prop':
157
							$puce = 'orange';
158
							break;
159
						case 'refuse':
160
							$puce = 'rouge';
161
							break;
162
						case 'poubelle':
163
							$puce = 'poubelle';
164
							break;
165
					}
166
					$puce = "puce-$puce-breve.gif";
167
					echo "<a class='$statut' href='javascript:window.parent.location=\"breves_voir.php3?id_breve=$id_breve\"'>$titre</a>";
168
				}
169
				echo "</div>";
170
 
171
 
172
			}
173
 
174
 
175
 
176
 
177
			$query = "SELECT * FROM spip_syndic WHERE id_rubrique='$id_rubrique' AND statut!='refuse' ORDER BY nom_site";
178
			$result=spip_query($query);
179
			if (spip_num_rows($result)>0) {
180
				echo "<div style='padding-top: 6px;'><b class='verdana2'>"._T('icone_sites_references')."</b></div>";
181
				while($row=spip_fetch_array($result)){
182
					$id_syndic=$row['id_syndic'];
183
					$titre = typo($row['nom_site']);
184
					$statut = $row['statut'];
185
					switch ($statut) {
186
						case 'publie':
187
							$puce = 'verte';
188
								break;
189
						case 'prepa':
190
							$puce = 'blanche';
191
							break;
192
						case 'prop':
193
							$puce = 'orange';
194
							break;
195
						case 'refuse':
196
							$puce = 'rouge';
197
							break;
198
						case 'poubelle':
199
							$puce = 'poubelle';
200
							break;
201
					}
202
					echo "<div " . http_style_background('site-24.gif',  "$spip_lang_left center no-repeat; margin:3px; padding-top: 5px; padding-bottom: 5px; padding-$spip_lang_left: 28px") . "><b><a href='javascript:window.parent.location=\"sites.php3?id_syndic=$id_syndic\"'>$titre</a></b></div>";
203
				}
204
			}
205
		}
206
 
207
 
208
		if ($frame == 0 AND $id_rubrique==0) {
209
 
210
			$query = "SELECT articles.id_article, articles.titre, articles.statut FROM spip_articles AS articles, spip_auteurs_articles AS lien WHERE articles.statut = 'prepa' AND articles.id_article = lien.id_article AND lien.id_auteur = $connect_id_auteur GROUP BY id_article ORDER BY articles.date DESC";
211
			$result=spip_query($query);
212
			if (spip_num_rows($result)>0) {
213
			  echo "<div ", http_style_background('article-24.gif',  "$spip_lang_left center no-repeat; margin:3px; padding-top: 5px; padding-bottom: 5px; padding-$spip_lang_left: 28px"),"><b class='verdana2'><a href='brouteur_frame.php3?special=redac&frame=".($frame+1)."&effacer_suivant=oui' target='iframe".($frame+1)."'>"._T("info_cours_edition")."</a></b></div>";
214
			}
215
 
216
			$query = "SELECT articles.id_article, articles.titre, articles.statut FROM spip_articles AS articles WHERE articles.statut = 'prop' ORDER BY articles.date DESC";
217
			$result = spip_query($query);
218
			$total_articles = spip_num_rows($result);
219
 
220
			$query = "SELECT * FROM spip_breves WHERE statut = 'prop' ORDER BY date_heure DESC LIMIT 0, 20";
221
			$result=spip_query($query);
222
			$total_breves = spip_num_rows($result);
223
 
224
			if ($total_articles + $total_breves > 0)
225
			  echo "<div ", http_style_background('article-24.gif',  "$spip_lang_left center no-repeat; margin:3px; padding-top: 5px; padding-bottom: 5px; padding-$spip_lang_left: 28px"),
226
					  "><b class='verdana2'><a href='brouteur_frame.php3?special=valider&frame=".($frame+1)."&effacer_suivant=oui' target='iframe".($frame+1)."'>"._T("info_articles_proposes")." / "._T("info_breves_valider")."</a></b></div>";
227
 
228
 
229
 
230
		}
231
 
232
	}
233
   }
234
	echo "</div>";
235
 
236
echo "</body></html>";
237
 
238
 
239
?>