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_rubriques.php3");
|
|
|
16 |
include_ecrire ("inc_logos.php3");
|
|
|
17 |
include_ecrire ("inc_mots.php3");
|
|
|
18 |
include_ecrire ("inc_documents.php3");
|
|
|
19 |
include_ecrire ("inc_abstract_sql.php3");
|
|
|
20 |
|
|
|
21 |
//
|
|
|
22 |
// Gerer les modifications...
|
|
|
23 |
//
|
|
|
24 |
|
|
|
25 |
$id_parent = intval($id_parent);
|
|
|
26 |
$id_rubrique = intval($id_rubrique);
|
|
|
27 |
$flag_mots = lire_meta("articles_mots");
|
|
|
28 |
$flag_editable = ($connect_statut == '0minirezo' AND (acces_rubrique($id_parent) OR acces_rubrique($id_rubrique))); // id_parent necessaire en cas de creation de sous-rubrique
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
if (!$titre) {
|
|
|
32 |
if ($modifier_rubrique == "oui") calculer_rubriques();
|
|
|
33 |
}
|
|
|
34 |
else {
|
|
|
35 |
// creation, le cas echeant
|
|
|
36 |
if ($new == 'oui' AND $flag_editable AND !$id_rubrique) {
|
|
|
37 |
$id_rubrique = spip_abstract_insert("spip_rubriques",
|
|
|
38 |
"(titre, id_parent)",
|
|
|
39 |
"('"._T('item_nouvelle_rubrique')."', '$id_parent')");
|
|
|
40 |
|
|
|
41 |
// Modifier le lien de base pour qu'il prenne en compte le nouvel id
|
|
|
42 |
unset($_POST['id_parent']);
|
|
|
43 |
$_POST['id_rubrique'] = $id_rubrique;
|
|
|
44 |
$clean_link = new Link();
|
|
|
45 |
}
|
|
|
46 |
|
|
|
47 |
// si c'est une rubrique-secteur contenant des breves, ne deplacer
|
|
|
48 |
// que si $confirme_deplace == 'oui'
|
|
|
49 |
|
|
|
50 |
if ((spip_num_rows(spip_query("SELECT id_rubrique FROM spip_breves WHERE id_rubrique='$id_rubrique' LIMIT 0,1")) > 0)
|
|
|
51 |
AND ($confirme_deplace != 'oui')) {
|
|
|
52 |
$id_parent = 0;
|
|
|
53 |
}
|
|
|
54 |
|
|
|
55 |
if ($flag_editable) {
|
|
|
56 |
|
|
|
57 |
if ($champs_extra) {
|
|
|
58 |
include_ecrire("inc_extra.php3");
|
|
|
59 |
$champs_extra = ", extra = '".addslashes(extra_recup_saisie("rubriques"))."'";
|
|
|
60 |
}
|
|
|
61 |
spip_query("UPDATE spip_rubriques SET " .
|
|
|
62 |
(acces_rubrique($id_parent) ? "id_parent='$id_parent'," : "") . "
|
|
|
63 |
titre='" . addslashes($titre) ."',
|
|
|
64 |
descriptif='" . addslashes($descriptif) . "',
|
|
|
65 |
texte='" . addslashes($texte) . "'
|
|
|
66 |
$champs_extra
|
|
|
67 |
WHERE id_rubrique=$id_rubrique");
|
|
|
68 |
}
|
|
|
69 |
|
|
|
70 |
calculer_rubriques();
|
|
|
71 |
calculer_langues_rubriques();
|
|
|
72 |
|
|
|
73 |
// invalider et reindexer
|
|
|
74 |
if ($invalider_caches) {
|
|
|
75 |
include_ecrire ("inc_invalideur.php3");
|
|
|
76 |
suivre_invalideur("id='id_rubrique/$id_rubrique'");
|
|
|
77 |
}
|
|
|
78 |
if (lire_meta('activer_moteur') == 'oui') {
|
|
|
79 |
include_ecrire ("inc_index.php3");
|
|
|
80 |
marquer_indexer('rubrique', $id_rubrique);
|
|
|
81 |
}
|
|
|
82 |
}
|
|
|
83 |
|
|
|
84 |
//
|
|
|
85 |
// Appliquer le changement de langue
|
|
|
86 |
//
|
|
|
87 |
if ($changer_lang AND $id_rubrique>0 AND lire_meta('multi_rubriques') == 'oui' AND (lire_meta('multi_secteurs') == 'non' OR $id_parent == 0) AND $flag_editable) {
|
|
|
88 |
if ($changer_lang != "herit")
|
|
|
89 |
spip_query("UPDATE spip_rubriques SET lang='".addslashes($changer_lang)."', langue_choisie='oui' WHERE id_rubrique=$id_rubrique");
|
|
|
90 |
else {
|
|
|
91 |
if ($id_parent == 0)
|
|
|
92 |
$langue_parent = lire_meta('langue_site');
|
|
|
93 |
else {
|
|
|
94 |
$row = spip_fetch_array(spip_query("SELECT lang FROM spip_rubriques WHERE id_rubrique=$id_parent"));
|
|
|
95 |
$langue_parent = $row['lang'];
|
|
|
96 |
}
|
|
|
97 |
spip_query("UPDATE spip_rubriques SET lang='".addslashes($langue_parent)."', langue_choisie='non' WHERE id_rubrique=$id_rubrique");
|
|
|
98 |
}
|
|
|
99 |
calculer_langues_rubriques();
|
|
|
100 |
}
|
|
|
101 |
|
|
|
102 |
//
|
|
|
103 |
// infos sur cette rubrique
|
|
|
104 |
//
|
|
|
105 |
|
|
|
106 |
if ($row=spip_fetch_array(spip_query("SELECT * FROM spip_rubriques WHERE id_rubrique='$id_rubrique'"))){
|
|
|
107 |
$id_rubrique=$row['id_rubrique'];
|
|
|
108 |
$id_parent=$row['id_parent'];
|
|
|
109 |
$titre=$row['titre'];
|
|
|
110 |
$descriptif=$row['descriptif'];
|
|
|
111 |
$texte=$row['texte'];
|
|
|
112 |
$statut = $row['statut'];
|
|
|
113 |
$extra = $row["extra"];
|
|
|
114 |
$langue_rubrique = $row['lang'];
|
|
|
115 |
}
|
|
|
116 |
|
|
|
117 |
if ($titre)
|
|
|
118 |
$titre_page = "« ".textebrut(typo($titre))." »";
|
|
|
119 |
else
|
|
|
120 |
$titre_page = _T('titre_naviguer_dans_le_site');
|
|
|
121 |
|
|
|
122 |
|
|
|
123 |
///// debut de la page
|
|
|
124 |
debut_page($titre_page, "documents", "rubriques");
|
|
|
125 |
|
|
|
126 |
|
|
|
127 |
//////// parents
|
|
|
128 |
|
|
|
129 |
|
|
|
130 |
debut_grand_cadre();
|
|
|
131 |
|
|
|
132 |
if ($id_rubrique > 0) {
|
|
|
133 |
afficher_hierarchie($id_parent);
|
|
|
134 |
}
|
|
|
135 |
|
|
|
136 |
fin_grand_cadre();
|
|
|
137 |
|
|
|
138 |
changer_typo('', 'rubrique'.$id_rubrique);
|
|
|
139 |
|
|
|
140 |
|
|
|
141 |
debut_gauche();
|
|
|
142 |
|
|
|
143 |
if ($spip_display != 4) {
|
|
|
144 |
if ($id_rubrique > 0) {
|
|
|
145 |
debut_boite_info();
|
|
|
146 |
echo "<CENTER>";
|
|
|
147 |
echo "<FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=1><B>"._T('titre_numero_rubrique')."</B></FONT>";
|
|
|
148 |
echo "<BR><FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=6><B>$id_rubrique</B></FONT>";
|
|
|
149 |
echo "</CENTER>";
|
|
|
150 |
|
|
|
151 |
voir_en_ligne ('rubrique', $id_rubrique, $statut);
|
|
|
152 |
|
|
|
153 |
fin_boite_info();
|
|
|
154 |
}
|
|
|
155 |
|
|
|
156 |
//
|
|
|
157 |
// Logos de la rubrique
|
|
|
158 |
//
|
|
|
159 |
|
|
|
160 |
if ($connect_statut == '0minirezo' AND acces_rubrique($id_rubrique)) {
|
|
|
161 |
if ($id_rubrique)
|
|
|
162 |
afficher_boite_logo('rub', 'id_rubrique', $id_rubrique,
|
|
|
163 |
_T('logo_rubrique')." ".aide ("rublogo"), _T('logo_survol'));
|
|
|
164 |
else
|
|
|
165 |
afficher_boite_logo('rub', 'id_rubrique', 0,
|
|
|
166 |
_T('logo_standard_rubrique')." ".aide ("rublogo"),
|
|
|
167 |
_T('logo_survol'));
|
|
|
168 |
}
|
|
|
169 |
|
|
|
170 |
|
|
|
171 |
//
|
|
|
172 |
// Afficher les boutons de creation d'article et de breve
|
|
|
173 |
//
|
|
|
174 |
debut_raccourcis();
|
|
|
175 |
|
|
|
176 |
|
|
|
177 |
icone_horizontale(_T('icone_tous_articles'), "articles_page.php3", "article-24.gif");
|
|
|
178 |
|
|
|
179 |
if (spip_num_rows(spip_query("SELECT id_rubrique FROM spip_rubriques LIMIT 0,1")) > 0) {
|
|
|
180 |
if ($id_rubrique > 0)
|
|
|
181 |
icone_horizontale(_T('icone_ecrire_article'), "articles_edit.php3?id_rubrique=$id_rubrique&new=oui", "article-24.gif","creer.gif");
|
|
|
182 |
|
|
|
183 |
$activer_breves = lire_meta("activer_breves");
|
|
|
184 |
if ($activer_breves != "non" AND $id_parent == "0" AND $id_rubrique != "0") {
|
|
|
185 |
icone_horizontale(_T('icone_nouvelle_breve'), "breves_edit.php3?id_rubrique=$id_rubrique&new=oui", "breve-24.gif","creer.gif");
|
|
|
186 |
}
|
|
|
187 |
}
|
|
|
188 |
else {
|
|
|
189 |
if ($connect_statut == '0minirezo') {
|
|
|
190 |
echo "<p>"._T('info_creation_rubrique');
|
|
|
191 |
}
|
|
|
192 |
}
|
|
|
193 |
|
|
|
194 |
fin_raccourcis();
|
|
|
195 |
}
|
|
|
196 |
|
|
|
197 |
|
|
|
198 |
debut_droite();
|
|
|
199 |
|
|
|
200 |
|
|
|
201 |
if ($id_rubrique == 0) {
|
|
|
202 |
$nom_site = lire_meta("nom_site");
|
|
|
203 |
$titre = _T('info_racine_site').": ".$nom_site;
|
|
|
204 |
}
|
|
|
205 |
|
|
|
206 |
if ($id_rubrique == 0) $ze_logo = "racine-site-24.gif";
|
|
|
207 |
else if ($id_parent == 0) $ze_logo = "secteur-24.gif";
|
|
|
208 |
else $ze_logo = "rubrique-24.gif";
|
|
|
209 |
|
|
|
210 |
|
|
|
211 |
debut_cadre_relief($ze_logo);
|
|
|
212 |
|
|
|
213 |
echo "\n<table cellpadding=0 cellspacing=0 border=0 width='100%'>";
|
|
|
214 |
echo "<tr width='100%'><td width='100%' valign='top'>";
|
|
|
215 |
gros_titre((!acces_restreint_rubrique($id_rubrique) ? '' :
|
|
|
216 |
http_img_pack("admin-12.gif",'', "width='12' height='12'",
|
|
|
217 |
_T('info_administrer_rubrique'))) .
|
|
|
218 |
$titre);
|
|
|
219 |
echo "</td>";
|
|
|
220 |
|
|
|
221 |
if ($id_rubrique > 0 AND $flag_editable) {
|
|
|
222 |
echo "<td>", http_img_pack("rien.gif", ' ', "width='5'") ."</td>\n";
|
|
|
223 |
echo "<td align='$spip_lang_right' valign='top'>";
|
|
|
224 |
icone(_T('icone_modifier_rubrique'), "rubriques_edit.php3?id_rubrique=$id_rubrique&retour=nav", $ze_logo, "edit.gif");
|
|
|
225 |
echo "</td>";
|
|
|
226 |
}
|
|
|
227 |
echo "</tr>\n";
|
|
|
228 |
|
|
|
229 |
if (strlen($descriptif) > 1) {
|
|
|
230 |
echo "<tr><td>\n";
|
|
|
231 |
echo "<div align='$spip_lang_left' style='padding: 5px; border: 1px dashed #aaaaaa;'>";
|
|
|
232 |
echo "<font size=2 face='Verdana,Arial,Sans,sans-serif'>";
|
|
|
233 |
echo propre($descriptif."~");
|
|
|
234 |
echo "</font>";
|
|
|
235 |
echo "</div></td></tr>\n";
|
|
|
236 |
}
|
|
|
237 |
|
|
|
238 |
echo "</table>\n";
|
|
|
239 |
|
|
|
240 |
if ($champs_extra AND $extra) {
|
|
|
241 |
include_ecrire("inc_extra.php3");
|
|
|
242 |
extra_affichage($extra, "rubriques");
|
|
|
243 |
}
|
|
|
244 |
|
|
|
245 |
|
|
|
246 |
/// Mots-cles
|
|
|
247 |
if ($flag_mots!= 'non' AND $flag_editable AND $options == 'avancees' AND $id_rubrique > 0) {
|
|
|
248 |
echo "\n<p>";
|
|
|
249 |
formulaire_mots('rubriques', $id_rubrique, $nouv_mot, $supp_mot, $cherche_mot, $flag_editable);
|
|
|
250 |
}
|
|
|
251 |
|
|
|
252 |
|
|
|
253 |
if (strlen($texte) > 1) {
|
|
|
254 |
echo "\n<p><div align='justify'><font size=3 face='Verdana,Arial,Sans,sans-serif'>";
|
|
|
255 |
echo justifier(propre($texte));
|
|
|
256 |
echo " </font></div>";
|
|
|
257 |
}
|
|
|
258 |
|
|
|
259 |
|
|
|
260 |
//
|
|
|
261 |
// Langue de la rubrique
|
|
|
262 |
//
|
|
|
263 |
if ($id_rubrique>0 AND lire_meta('multi_rubriques') == 'oui' AND (lire_meta('multi_secteurs') == 'non' OR $id_parent == 0) AND $flag_editable) {
|
|
|
264 |
|
|
|
265 |
$row = spip_fetch_array(spip_query("SELECT lang, langue_choisie FROM spip_rubriques WHERE id_rubrique=$id_rubrique"));
|
|
|
266 |
$langue_rubrique = $row['lang'];
|
|
|
267 |
$langue_choisie_rubrique = $row['langue_choisie'];
|
|
|
268 |
if ($id_parent) {
|
|
|
269 |
$row = spip_fetch_array(spip_query("SELECT lang FROM spip_rubriques WHERE id_rubrique=$id_parent"));
|
|
|
270 |
$langue_parent = $row[0];
|
|
|
271 |
}
|
|
|
272 |
else $langue_parent = lire_meta('langue_site');
|
|
|
273 |
|
|
|
274 |
debut_cadre_enfonce('langues-24.gif');
|
|
|
275 |
echo "<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=3 WIDTH=100% BACKGROUND=''><TR><TD BGCOLOR='#EEEECC' class='serif2'>";
|
|
|
276 |
echo bouton_block_invisible('languesrubrique');
|
|
|
277 |
echo "<B>";
|
|
|
278 |
echo _T('titre_langue_rubrique');
|
|
|
279 |
echo " (".traduire_nom_langue($langue_rubrique).")";
|
|
|
280 |
echo "</B>";
|
|
|
281 |
echo "</TD></TR></TABLE>";
|
|
|
282 |
|
|
|
283 |
echo debut_block_invisible('languesrubrique');
|
|
|
284 |
echo "<div class='verdana2' align='center'>";
|
|
|
285 |
echo menu_langues('changer_lang', $langue_rubrique, '', $langue_parent);
|
|
|
286 |
echo "</div>\n";
|
|
|
287 |
echo fin_block();
|
|
|
288 |
|
|
|
289 |
fin_cadre_enfonce();
|
|
|
290 |
}
|
|
|
291 |
|
|
|
292 |
|
|
|
293 |
fin_cadre_relief();
|
|
|
294 |
|
|
|
295 |
|
|
|
296 |
///// Afficher les rubriques
|
|
|
297 |
afficher_enfant_rub($id_rubrique, $flag_editable);
|
|
|
298 |
|
|
|
299 |
|
|
|
300 |
|
|
|
301 |
//echo "<div align='$spip_lang_left'>";
|
|
|
302 |
|
|
|
303 |
|
|
|
304 |
////////// Vos articles en cours de redaction
|
|
|
305 |
/////////////////////////
|
|
|
306 |
|
|
|
307 |
echo "<P>";
|
|
|
308 |
|
|
|
309 |
|
|
|
310 |
//
|
|
|
311 |
// Verifier les boucles a mettre en relief
|
|
|
312 |
//
|
|
|
313 |
|
|
|
314 |
$relief = false;
|
|
|
315 |
|
|
|
316 |
if (!$relief) {
|
|
|
317 |
$query = "SELECT id_article FROM spip_articles AS articles WHERE id_rubrique='$id_rubrique' AND statut='prop'$vos_articles LIMIT 0,1";
|
|
|
318 |
$result = spip_query($query);
|
|
|
319 |
$relief = (spip_num_rows($result) > 0);
|
|
|
320 |
}
|
|
|
321 |
|
|
|
322 |
if (!$relief) {
|
|
|
323 |
$query = "SELECT id_breve FROM spip_breves WHERE id_rubrique='$id_rubrique' AND (statut='prepa' OR statut='prop') LIMIT 0,1";
|
|
|
324 |
$result = spip_query($query);
|
|
|
325 |
$relief = (spip_num_rows($result) > 0);
|
|
|
326 |
}
|
|
|
327 |
|
|
|
328 |
if (!$relief AND lire_meta('activer_syndic') != 'non') {
|
|
|
329 |
$query = "SELECT id_syndic FROM spip_syndic WHERE id_rubrique='$id_rubrique' AND statut='prop' LIMIT 0,1";
|
|
|
330 |
$result = spip_query($query);
|
|
|
331 |
$relief = (spip_num_rows($result) > 0);
|
|
|
332 |
}
|
|
|
333 |
|
|
|
334 |
if (!$relief AND lire_meta('activer_syndic') != 'non' AND $connect_statut == '0minirezo' AND $connect_toutes_rubriques) {
|
|
|
335 |
$query = "SELECT id_syndic FROM spip_syndic WHERE id_rubrique='$id_rubrique' AND (syndication='off' OR syndication='sus') LIMIT 0,1";
|
|
|
336 |
$result = spip_query($query);
|
|
|
337 |
$relief = (spip_num_rows($result) > 0);
|
|
|
338 |
}
|
|
|
339 |
|
|
|
340 |
|
|
|
341 |
if ($relief) {
|
|
|
342 |
echo "<p>";
|
|
|
343 |
debut_cadre_couleur();
|
|
|
344 |
echo "<div class='verdana2' style='color: black;'><b>"._T('texte_en_cours_validation')."</b></div><p>";
|
|
|
345 |
|
|
|
346 |
//
|
|
|
347 |
// Les articles a valider
|
|
|
348 |
//
|
|
|
349 |
afficher_articles(_T('info_articles_proposes'),
|
|
|
350 |
"WHERE id_rubrique='$id_rubrique' AND statut='prop'$vos_articles ORDER BY date DESC");
|
|
|
351 |
|
|
|
352 |
//
|
|
|
353 |
// Les breves a valider
|
|
|
354 |
//
|
|
|
355 |
$query = "SELECT * FROM spip_breves WHERE id_rubrique='$id_rubrique' AND (statut='prepa' OR statut='prop') ORDER BY date_heure DESC";
|
|
|
356 |
afficher_breves(_T('info_breves_valider'), $query, true);
|
|
|
357 |
|
|
|
358 |
//
|
|
|
359 |
// Les sites references a valider
|
|
|
360 |
//
|
|
|
361 |
if (lire_meta('activer_syndic') != 'non') {
|
|
|
362 |
include_ecrire("inc_sites.php3");
|
|
|
363 |
afficher_sites(_T('info_site_valider'), "SELECT * FROM spip_syndic WHERE id_rubrique='$id_rubrique' AND statut='prop' ORDER BY nom_site");
|
|
|
364 |
}
|
|
|
365 |
|
|
|
366 |
//
|
|
|
367 |
// Les sites a probleme
|
|
|
368 |
//
|
|
|
369 |
if (lire_meta('activer_syndic') != 'non' AND $connect_statut == '0minirezo' AND $connect_toutes_rubriques) {
|
|
|
370 |
include_ecrire("inc_sites.php3");
|
|
|
371 |
afficher_sites(_T('avis_sites_syndiques_probleme'),
|
|
|
372 |
"SELECT * FROM spip_syndic WHERE id_rubrique='$id_rubrique' AND (syndication='off' OR syndication='sus') AND statut='publie' ORDER BY nom_site");
|
|
|
373 |
}
|
|
|
374 |
|
|
|
375 |
// Les articles syndiques en attente de validation
|
|
|
376 |
if ($id_rubrique == 0 AND $connect_statut == '0minirezo' AND $connect_toutes_rubriques) {
|
|
|
377 |
$result = spip_query ("SELECT COUNT(*) AS compte FROM spip_syndic_articles AND statut='dispo'");
|
|
|
378 |
if (($row = spip_fetch_array($result)) AND $row['compte'])
|
|
|
379 |
echo "<br><small><a href='sites_tous.php3'>".$row['compte']." "._T('info_liens_syndiques_1')."</a> "._T('info_liens_syndiques_2')."</small>";
|
|
|
380 |
}
|
|
|
381 |
|
|
|
382 |
fin_cadre_couleur();
|
|
|
383 |
}
|
|
|
384 |
|
|
|
385 |
|
|
|
386 |
|
|
|
387 |
|
|
|
388 |
////////// Les articles en cours de redaction
|
|
|
389 |
/////////////////////////
|
|
|
390 |
|
|
|
391 |
if ($connect_statut == "0minirezo" AND $options == 'avancees') {
|
|
|
392 |
afficher_articles(_T('info_tous_articles_en_redaction'),
|
|
|
393 |
"WHERE statut='prepa' AND id_rubrique='$id_rubrique' ORDER BY date DESC");
|
|
|
394 |
}
|
|
|
395 |
|
|
|
396 |
|
|
|
397 |
////////// Les articles publies
|
|
|
398 |
/////////////////////////
|
|
|
399 |
|
|
|
400 |
afficher_articles(_T('info_tous_articles_presents'),
|
|
|
401 |
"WHERE statut='publie' AND id_rubrique='$id_rubrique' ORDER BY date DESC", true);
|
|
|
402 |
|
|
|
403 |
if ($id_rubrique > 0){
|
|
|
404 |
echo "<div align='$spip_lang_right'>";
|
|
|
405 |
icone(_T('icone_ecrire_article'), "articles_edit.php3?id_rubrique=$id_rubrique&new=oui", "article-24.gif", "creer.gif");
|
|
|
406 |
echo "</div><p>";
|
|
|
407 |
}
|
|
|
408 |
|
|
|
409 |
//// Les breves
|
|
|
410 |
|
|
|
411 |
afficher_breves(_T('icone_ecrire_nouvel_article'), "SELECT * FROM spip_breves WHERE id_rubrique='$id_rubrique' AND statut != 'prop' AND statut != 'prepa' ORDER BY date_heure DESC");
|
|
|
412 |
|
|
|
413 |
$activer_breves=lire_meta("activer_breves");
|
|
|
414 |
|
|
|
415 |
if ($id_parent == "0" AND $id_rubrique != "0" AND $activer_breves!="non"){
|
|
|
416 |
echo "<div align='$spip_lang_right'>";
|
|
|
417 |
icone(_T('icone_nouvelle_breve'), "breves_edit.php3?id_rubrique=$id_rubrique&new=oui", "breve-24.gif", "creer.gif");
|
|
|
418 |
echo "</div><p>";
|
|
|
419 |
}
|
|
|
420 |
|
|
|
421 |
|
|
|
422 |
|
|
|
423 |
//// Les sites references
|
|
|
424 |
|
|
|
425 |
if (lire_meta("activer_sites") == 'oui') {
|
|
|
426 |
include_ecrire("inc_sites.php3");
|
|
|
427 |
afficher_sites(_T('titre_sites_references_rubrique'), "SELECT * FROM spip_syndic WHERE id_rubrique='$id_rubrique' AND statut!='refuse' AND statut != 'prop' AND syndication NOT IN ('off','sus') ORDER BY nom_site");
|
|
|
428 |
|
|
|
429 |
$proposer_sites=lire_meta("proposer_sites");
|
|
|
430 |
if ($id_rubrique > 0 AND ($flag_editable OR $proposer_sites > 0)) {
|
|
|
431 |
$link = new Link('sites_edit.php3');
|
|
|
432 |
$link->addVar('id_rubrique', $id_rubrique);
|
|
|
433 |
$link->addVar('target', 'sites.php3');
|
|
|
434 |
$link->addVar('redirect', $clean_link->getUrl());
|
|
|
435 |
|
|
|
436 |
echo "<div align='$spip_lang_right'>";
|
|
|
437 |
icone(_T('info_sites_referencer'), $link->getUrl(), "site-24.gif", "creer.gif");
|
|
|
438 |
echo "</div><p>";
|
|
|
439 |
}
|
|
|
440 |
}
|
|
|
441 |
|
|
|
442 |
/// Documents associes a la rubrique
|
|
|
443 |
|
|
|
444 |
if ($id_rubrique>0) {
|
|
|
445 |
# modifs de la description d'un des docs joints
|
|
|
446 |
if ($flag_editable) maj_documents($id_rubrique, 'rubrique');
|
|
|
447 |
afficher_documents_non_inclus($id_rubrique, "rubrique", $flag_editable);
|
|
|
448 |
}
|
|
|
449 |
|
|
|
450 |
|
|
|
451 |
|
|
|
452 |
////// Supprimer cette rubrique (si vide)
|
|
|
453 |
|
|
|
454 |
if (($id_rubrique>0) AND tester_rubrique_vide($id_rubrique) AND $flag_editable) {
|
|
|
455 |
$link = new Link('naviguer.php3');
|
|
|
456 |
$link->addVar('id_rubrique', $id_parent);
|
|
|
457 |
$link->addVar('supp_rubrique', $id_rubrique);
|
|
|
458 |
|
|
|
459 |
echo "<p><div align='center'>";
|
|
|
460 |
icone(_T('icone_supprimer_rubrique'), $link->getUrl(), "$ze_logo", "supprimer.gif");
|
|
|
461 |
echo "</div><p>";
|
|
|
462 |
|
|
|
463 |
|
|
|
464 |
}
|
|
|
465 |
|
|
|
466 |
|
|
|
467 |
|
|
|
468 |
fin_page();
|
|
|
469 |
|
|
|
470 |
?>
|