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 |
include ("inc.php3");
|
|
|
14 |
|
|
|
15 |
include_ecrire ("inc_logos.php3");
|
|
|
16 |
include_ecrire ("inc_mots.php3");
|
|
|
17 |
include_ecrire ("inc_date.php3");
|
|
|
18 |
include_ecrire ("inc_documents.php3");
|
|
|
19 |
include_ecrire ("inc_forum.php3");
|
|
|
20 |
include_ecrire ("inc_abstract_sql.php3");
|
|
|
21 |
|
|
|
22 |
$articles_surtitre = lire_meta("articles_surtitre");
|
|
|
23 |
$articles_soustitre = lire_meta("articles_soustitre");
|
|
|
24 |
$articles_descriptif = lire_meta("articles_descriptif");
|
|
|
25 |
$articles_urlref = lire_meta("articles_urlref");
|
|
|
26 |
$articles_chapeau = lire_meta("articles_chapeau");
|
|
|
27 |
$articles_ps = lire_meta("articles_ps");
|
|
|
28 |
$articles_redac = lire_meta("articles_redac");
|
|
|
29 |
$articles_mots = lire_meta("articles_mots");
|
|
|
30 |
$articles_versions = (lire_meta("articles_versions")=='oui') && $flag_revisions;
|
|
|
31 |
|
|
|
32 |
if ($id_article==0) {
|
|
|
33 |
if ($new=='oui') {
|
|
|
34 |
$id_rubrique = intval($id_rubrique);
|
|
|
35 |
if ($titre=='') $titre = _T('info_sans_titre');
|
|
|
36 |
|
|
|
37 |
$langue_new = '';
|
|
|
38 |
$result_lang_rub = spip_query("SELECT lang FROM spip_rubriques WHERE id_rubrique=$id_rubrique");
|
|
|
39 |
if ($row = spip_fetch_array($result_lang_rub))
|
|
|
40 |
$langue_new = $row["lang"];
|
|
|
41 |
|
|
|
42 |
if (!$langue_new) $langue_new = lire_meta('langue_site');
|
|
|
43 |
$langue_choisie_new = 'non';
|
|
|
44 |
|
|
|
45 |
$forums_publics = substr(lire_meta('forums_publics'),0,3);
|
|
|
46 |
|
|
|
47 |
$id_article = spip_abstract_insert("spip_articles",
|
|
|
48 |
"(id_rubrique, statut, date, accepter_forum, lang, langue_choisie)",
|
|
|
49 |
"($id_rubrique, 'prepa', NOW(), '$forums_publics', '$langue_new', '$langue_choisie_new')");
|
|
|
50 |
|
|
|
51 |
spip_query("DELETE FROM spip_auteurs_articles WHERE id_article = $id_article");
|
|
|
52 |
spip_query("INSERT INTO spip_auteurs_articles (id_auteur, id_article) VALUES ($connect_id_auteur, $id_article)");
|
|
|
53 |
|
|
|
54 |
// Modifier le lien de base pour qu'il prenne en compte le nouvel id
|
|
|
55 |
unset($_POST['id_rubrique']);
|
|
|
56 |
$_POST['id_article'] = $id_article;
|
|
|
57 |
$clean_link = new Link();
|
|
|
58 |
} else {
|
|
|
59 |
redirige_par_entete("./index.php3");
|
|
|
60 |
}
|
|
|
61 |
}
|
|
|
62 |
|
|
|
63 |
|
|
|
64 |
$clean_link = new Link("articles.php3?id_article=$id_article");
|
|
|
65 |
|
|
|
66 |
|
|
|
67 |
|
|
|
68 |
//////////////////////////////////////////////////////
|
|
|
69 |
// Determiner les droits d'edition de l'article
|
|
|
70 |
//
|
|
|
71 |
|
|
|
72 |
$query = "SELECT statut, titre, id_rubrique FROM spip_articles WHERE id_article=$id_article";
|
|
|
73 |
$result = spip_query($query);
|
|
|
74 |
if ($row = spip_fetch_array($result)) {
|
|
|
75 |
$statut_article = $row['statut'];
|
|
|
76 |
$titre_article = $row['titre'];
|
|
|
77 |
$rubrique_article = $row['id_rubrique'];
|
|
|
78 |
}
|
|
|
79 |
else {
|
|
|
80 |
$statut_article = '';
|
|
|
81 |
}
|
|
|
82 |
|
|
|
83 |
$query = "SELECT * FROM spip_auteurs_articles WHERE id_article=$id_article AND id_auteur=$connect_id_auteur";
|
|
|
84 |
$result_auteur = spip_query($query);
|
|
|
85 |
|
|
|
86 |
$flag_auteur = (spip_num_rows($result_auteur) > 0);
|
|
|
87 |
$flag_editable = (acces_rubrique($rubrique_article)
|
|
|
88 |
OR ($flag_auteur AND ($statut_article == 'prepa' OR $statut_article == 'prop' OR $statut_article == 'poubelle')));
|
|
|
89 |
|
|
|
90 |
|
|
|
91 |
|
|
|
92 |
//
|
|
|
93 |
// Appliquer les modifications
|
|
|
94 |
//
|
|
|
95 |
|
|
|
96 |
$suivi_edito = lire_meta("suivi_edito");
|
|
|
97 |
|
|
|
98 |
$ok_nouveau_statut = false;
|
|
|
99 |
|
|
|
100 |
|
|
|
101 |
if ($statut_nouv) {
|
|
|
102 |
if (acces_rubrique($rubrique_article)) $ok_nouveau_statut = true;
|
|
|
103 |
else if ($flag_auteur) {
|
|
|
104 |
if ($statut_nouv == 'prop' AND $statut_article == 'prepa')
|
|
|
105 |
$ok_nouveau_statut = true;
|
|
|
106 |
else if ($statut_nouv == 'prepa' AND $statut_article == 'poubelle')
|
|
|
107 |
$ok_nouveau_statut = true;
|
|
|
108 |
}
|
|
|
109 |
if ($ok_nouveau_statut) {
|
|
|
110 |
$query = "UPDATE spip_articles SET statut='$statut_nouv' WHERE id_article=$id_article";
|
|
|
111 |
$result = spip_query($query);
|
|
|
112 |
|
|
|
113 |
if ($statut_nouv == 'publie' AND $statut_nouv != $statut_article)
|
|
|
114 |
spip_query("UPDATE spip_articles SET date=NOW() WHERE id_article=$id_article");
|
|
|
115 |
|
|
|
116 |
$statut_ancien = $statut_article; // message pour les traitements de fond (indexation ; envoi mail)
|
|
|
117 |
$statut_article = $statut_nouv;
|
|
|
118 |
$flag_editable = (acces_rubrique($rubrique_article)
|
|
|
119 |
OR ($flag_auteur AND ($statut_article == 'prepa' OR $statut_article == 'prop')));
|
|
|
120 |
}
|
|
|
121 |
}
|
|
|
122 |
|
|
|
123 |
// 'publie' => reindexer
|
|
|
124 |
if ($ok_nouveau_statut AND $statut_nouv == 'publie' AND $statut_nouv != $statut_ancien AND (lire_meta('activer_moteur') == 'oui')) {
|
|
|
125 |
include_ecrire ("inc_index.php3");
|
|
|
126 |
marquer_indexer('article', $id_article);
|
|
|
127 |
}
|
|
|
128 |
|
|
|
129 |
// 'dĀpublie' => invalider les caches
|
|
|
130 |
if ($ok_nouveau_statut AND $statut_ancien == 'publie' AND $statut_nouv != $statut_ancien AND $invalider_caches) {
|
|
|
131 |
include_ecrire ("inc_invalideur.php3");
|
|
|
132 |
suivre_invalideur("id='id_article/$id_article'");
|
|
|
133 |
}
|
|
|
134 |
|
|
|
135 |
if ($jour && $flag_editable) {
|
|
|
136 |
$date = format_mysql_date($annee, $mois, $jour, $heure, $minute);
|
|
|
137 |
spip_query("UPDATE spip_articles SET date='$date'
|
|
|
138 |
WHERE id_article=$id_article");
|
|
|
139 |
calculer_rubriques();
|
|
|
140 |
}
|
|
|
141 |
|
|
|
142 |
if ($jour_redac && $flag_editable) {
|
|
|
143 |
if ($annee_redac<>'' AND $annee_redac < 1001) $annee_redac += 9000;
|
|
|
144 |
|
|
|
145 |
if ($avec_redac == 'non')
|
|
|
146 |
$date_redac = format_mysql_date();
|
|
|
147 |
else
|
|
|
148 |
$date_redac = format_mysql_date(
|
|
|
149 |
$annee_redac, $mois_redac, $jour_redac,
|
|
|
150 |
$heure_redac, $minute_redac);
|
|
|
151 |
|
|
|
152 |
spip_query("UPDATE spip_articles SET date_redac='$date_redac'
|
|
|
153 |
WHERE id_article=$id_article");
|
|
|
154 |
}
|
|
|
155 |
|
|
|
156 |
|
|
|
157 |
// Appliquer la modification de langue
|
|
|
158 |
if (lire_meta('multi_articles') == 'oui' AND $flag_editable) {
|
|
|
159 |
$row = spip_fetch_array(spip_query("SELECT lang FROM spip_rubriques WHERE id_rubrique=" . intval($rubrique_article)));
|
|
|
160 |
$langue_parent = $row['lang'];
|
|
|
161 |
|
|
|
162 |
if ($changer_lang) {
|
|
|
163 |
if ($changer_lang != "herit")
|
|
|
164 |
spip_query("UPDATE spip_articles SET lang='".addslashes($changer_lang)."', langue_choisie='oui' WHERE id_article=$id_article");
|
|
|
165 |
else
|
|
|
166 |
spip_query("UPDATE spip_articles SET lang='".addslashes($langue_parent)."', langue_choisie='non' WHERE id_article=$id_article");
|
|
|
167 |
}
|
|
|
168 |
}
|
|
|
169 |
|
|
|
170 |
// Passer les images/docs en "inclus=non"
|
|
|
171 |
$query = "SELECT docs.id_document FROM spip_documents AS docs, spip_documents_articles AS lien WHERE lien.id_article=$id_article AND lien.id_document=docs.id_document";
|
|
|
172 |
$result = spip_query($query);
|
|
|
173 |
|
|
|
174 |
while($row=spip_fetch_array($result)){
|
|
|
175 |
$ze_doc[]=$row['id_document'];
|
|
|
176 |
}
|
|
|
177 |
|
|
|
178 |
if (count($ze_doc)>0){
|
|
|
179 |
$ze_docs = join($ze_doc,",");
|
|
|
180 |
spip_query("UPDATE spip_documents SET inclus='non' WHERE id_document IN ($ze_docs)");
|
|
|
181 |
}
|
|
|
182 |
|
|
|
183 |
|
|
|
184 |
# modifs de la description d'un des docs joints
|
|
|
185 |
if ($flag_editable) maj_documents($id_article, 'article');
|
|
|
186 |
|
|
|
187 |
|
|
|
188 |
//
|
|
|
189 |
// Reunit les textes decoupes parce que trop longs
|
|
|
190 |
//
|
|
|
191 |
|
|
|
192 |
$nb_texte = 0;
|
|
|
193 |
while ($nb_texte ++ < 100){ // 100 pour eviter une improbable boucle infinie
|
|
|
194 |
$varname = "texte$nb_texte";
|
|
|
195 |
$texte_plus = $$varname; // double $ pour obtenir $texte1, $texte2...
|
|
|
196 |
if ($texte_plus){
|
|
|
197 |
$texte_plus = ereg_replace("<!--SPIP-->[\n\r]*","",$texte_plus);
|
|
|
198 |
$texte_ajout .= $texte_plus;
|
|
|
199 |
} else {
|
|
|
200 |
break;
|
|
|
201 |
}
|
|
|
202 |
}
|
|
|
203 |
$texte = $texte_ajout . $texte;
|
|
|
204 |
|
|
|
205 |
// preparer le virtuel
|
|
|
206 |
|
|
|
207 |
if ($changer_virtuel && $flag_editable) {
|
|
|
208 |
$virtuel = eregi_replace("^http://$", "", trim($virtuel));
|
|
|
209 |
if ($virtuel) $chapo = addslashes(corriger_caracteres("=$virtuel"));
|
|
|
210 |
else $chapo = "";
|
|
|
211 |
$query = "UPDATE spip_articles SET chapo='$chapo' WHERE id_article=$id_article";
|
|
|
212 |
$result = spip_query($query);
|
|
|
213 |
}
|
|
|
214 |
|
|
|
215 |
if ($titre && !$ajout_forum && $flag_editable) {
|
|
|
216 |
$champs = array('surtitre', 'titre', 'soustitre', 'descriptif', 'nom_site', 'url_site', 'chapo', 'texte', 'ps');
|
|
|
217 |
$champs_version = array();
|
|
|
218 |
foreach ($champs as $nom_champ) {
|
|
|
219 |
$t = $champs_versions[$nom_champ] = corriger_caracteres($$nom_champ);
|
|
|
220 |
$$nom_champ = addslashes($t);
|
|
|
221 |
}
|
|
|
222 |
|
|
|
223 |
// recoller les champs du extra
|
|
|
224 |
if ($champs_extra) {
|
|
|
225 |
include_ecrire("inc_extra.php3");
|
|
|
226 |
$add_extra = ", extra = '".addslashes(extra_recup_saisie("articles", $id_secteur))."'";
|
|
|
227 |
} else
|
|
|
228 |
$add_extra = '';
|
|
|
229 |
|
|
|
230 |
// Verifier qu'on envoie bien dans une rubrique autorisee
|
|
|
231 |
if ($id_rubrique>0 AND ($flag_auteur OR acces_rubrique($id_rubrique))) {
|
|
|
232 |
$change_rubrique = "id_rubrique=$id_rubrique,";
|
|
|
233 |
} else {
|
|
|
234 |
$change_rubrique = "";
|
|
|
235 |
}
|
|
|
236 |
|
|
|
237 |
// Stockage des versions : creer une premier version si non-existante
|
|
|
238 |
if ($articles_versions) {
|
|
|
239 |
include("lab_revisions.php");
|
|
|
240 |
if ($new != 'oui') {
|
|
|
241 |
$query = "SELECT id_article FROM spip_versions WHERE id_article=$id_article LIMIT 0,1";
|
|
|
242 |
if (!spip_num_rows(spip_query($query))) {
|
|
|
243 |
spip_log("version initiale de l'article $id_article");
|
|
|
244 |
$select = join(", ", $champs);
|
|
|
245 |
$query = "SELECT $select FROM spip_articles WHERE id_article=$id_article";
|
|
|
246 |
$champs_originaux = spip_fetch_array(spip_query($query));
|
|
|
247 |
$id_version = ajouter_version($id_article, $champs_originaux, _T('version_initiale'));
|
|
|
248 |
|
|
|
249 |
// Remettre une date un peu ancienne pour la version initiale
|
|
|
250 |
if ($id_version == 1) // test inutile ?
|
|
|
251 |
spip_query("UPDATE spip_versions
|
|
|
252 |
SET date=DATE_SUB(NOW(), INTERVAL 2 HOUR)
|
|
|
253 |
WHERE id_article=$id_article AND id_version=1");
|
|
|
254 |
}
|
|
|
255 |
}
|
|
|
256 |
}
|
|
|
257 |
|
|
|
258 |
$query = "UPDATE spip_articles SET surtitre='$surtitre', titre='$titre', soustitre='$soustitre', $change_rubrique descriptif='$descriptif', chapo='$chapo', texte='$texte', ps='$ps', url_site='$url_site', nom_site='$nom_site' $add_extra WHERE id_article=$id_article";
|
|
|
259 |
$result = spip_query($query);
|
|
|
260 |
calculer_rubriques();
|
|
|
261 |
|
|
|
262 |
// invalider et reindexer
|
|
|
263 |
if ($statut_article == 'publie') {
|
|
|
264 |
if ($invalider_caches) {
|
|
|
265 |
include_ecrire ("inc_invalideur.php3");
|
|
|
266 |
suivre_invalideur("id='id_article/$id_article'");
|
|
|
267 |
}
|
|
|
268 |
if (lire_meta('activer_moteur') == 'oui') {
|
|
|
269 |
include_ecrire ("inc_index.php3");
|
|
|
270 |
marquer_indexer('article', $id_article);
|
|
|
271 |
}
|
|
|
272 |
}
|
|
|
273 |
|
|
|
274 |
// Stockage des versions
|
|
|
275 |
if ($articles_versions) {
|
|
|
276 |
ajouter_version($id_article, $champs_versions);
|
|
|
277 |
}
|
|
|
278 |
|
|
|
279 |
// Changer la langue heritee
|
|
|
280 |
if ($id_rubrique != $id_rubrique_old) {
|
|
|
281 |
$row = spip_fetch_array(spip_query("SELECT lang, langue_choisie FROM spip_articles WHERE id_article=$id_article"));
|
|
|
282 |
$langue_old = $row['lang'];
|
|
|
283 |
$langue_choisie_old = $row['langue_choisie'];
|
|
|
284 |
|
|
|
285 |
if ($langue_choisie_old != "oui") {
|
|
|
286 |
$row = spip_fetch_array(spip_query("SELECT lang FROM spip_rubriques WHERE id_rubrique=$id_rubrique"));
|
|
|
287 |
$langue_new = $row['lang'];
|
|
|
288 |
if ($langue_new != $langue_old) spip_query("UPDATE spip_articles SET lang = '$langue_new' WHERE id_article = $id_article");
|
|
|
289 |
}
|
|
|
290 |
}
|
|
|
291 |
|
|
|
292 |
// afficher le nouveau titre dans la barre de fenetre
|
|
|
293 |
$titre_article = stripslashes($titre);
|
|
|
294 |
|
|
|
295 |
// marquer l'article (important pour les articles nouvellement crees)
|
|
|
296 |
spip_query("UPDATE spip_articles SET date_modif=NOW(), auteur_modif=$connect_id_auteur WHERE id_article=$id_article");
|
|
|
297 |
$id_article_bloque = $id_article; // message pour inc_presentation
|
|
|
298 |
}
|
|
|
299 |
|
|
|
300 |
|
|
|
301 |
|
|
|
302 |
|
|
|
303 |
//
|
|
|
304 |
// Lire l'article
|
|
|
305 |
//
|
|
|
306 |
|
|
|
307 |
$query = "SELECT * FROM spip_articles WHERE id_article='$id_article'";
|
|
|
308 |
$result = spip_query($query);
|
|
|
309 |
|
|
|
310 |
if ($row = spip_fetch_array($result)) {
|
|
|
311 |
$id_article = $row["id_article"];
|
|
|
312 |
$surtitre = $row["surtitre"];
|
|
|
313 |
$titre = $row["titre"];
|
|
|
314 |
$soustitre = $row["soustitre"];
|
|
|
315 |
$id_rubrique = $row["id_rubrique"];
|
|
|
316 |
$descriptif = $row["descriptif"];
|
|
|
317 |
$nom_site = $row["nom_site"];
|
|
|
318 |
$url_site = $row["url_site"];
|
|
|
319 |
$chapo = $row["chapo"];
|
|
|
320 |
$texte = $row["texte"];
|
|
|
321 |
$ps = $row["ps"];
|
|
|
322 |
$date = $row["date"];
|
|
|
323 |
$statut_article = $row["statut"];
|
|
|
324 |
$maj = $row["maj"];
|
|
|
325 |
$date_redac = $row["date_redac"];
|
|
|
326 |
$visites = $row["visites"];
|
|
|
327 |
$referers = $row["referers"];
|
|
|
328 |
$extra = $row["extra"];
|
|
|
329 |
$id_trad = $row["id_trad"];
|
|
|
330 |
$id_version = $row["id_version"];
|
|
|
331 |
}
|
|
|
332 |
|
|
|
333 |
// pour l'affichage du virtuel
|
|
|
334 |
unset($virtuel);
|
|
|
335 |
if (substr($chapo, 0, 1) == '=') {
|
|
|
336 |
$virtuel = substr($chapo, 1);
|
|
|
337 |
}
|
|
|
338 |
|
|
|
339 |
if (ereg("([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2})", $date_redac, $regs)) {
|
|
|
340 |
$annee_redac = $regs[1];
|
|
|
341 |
$mois_redac = $regs[2];
|
|
|
342 |
$jour_redac = $regs[3];
|
|
|
343 |
$heure_redac = $regs[4];
|
|
|
344 |
$minute_redac = $regs[5];
|
|
|
345 |
if ($annee_redac > 4000) $annee_redac -= 9000;
|
|
|
346 |
}
|
|
|
347 |
|
|
|
348 |
if (ereg("([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2})", $date, $regs)) {
|
|
|
349 |
$annee = $regs[1];
|
|
|
350 |
$mois = $regs[2];
|
|
|
351 |
$jour = $regs[3];
|
|
|
352 |
$heure = $regs[4];
|
|
|
353 |
$minute = $regs[5];
|
|
|
354 |
}
|
|
|
355 |
|
|
|
356 |
|
|
|
357 |
|
|
|
358 |
debut_page("« $titre_article »", "documents", "articles");
|
|
|
359 |
|
|
|
360 |
debut_grand_cadre();
|
|
|
361 |
|
|
|
362 |
afficher_hierarchie($id_rubrique);
|
|
|
363 |
|
|
|
364 |
fin_grand_cadre();
|
|
|
365 |
|
|
|
366 |
|
|
|
367 |
|
|
|
368 |
//////////////////////////////////////////////////////
|
|
|
369 |
// Affichage de la colonne de gauche
|
|
|
370 |
//
|
|
|
371 |
|
|
|
372 |
debut_gauche();
|
|
|
373 |
|
|
|
374 |
debut_boite_info();
|
|
|
375 |
|
|
|
376 |
echo "<div align='center'>\n";
|
|
|
377 |
|
|
|
378 |
|
|
|
379 |
echo "<font face='Verdana,Arial,Sans,sans-serif' size='1'><b>"._T('info_numero_article')."</b></font>\n";
|
|
|
380 |
echo "<br><font face='Verdana,Arial,Sans,sans-serif' size='6'><b>$id_article</b></font>\n";
|
|
|
381 |
|
|
|
382 |
voir_en_ligne ('article', $id_article, $statut_article);
|
|
|
383 |
|
|
|
384 |
|
|
|
385 |
$activer_statistiques = lire_meta("activer_statistiques");
|
|
|
386 |
|
|
|
387 |
if ($connect_statut == "0minirezo" AND $statut_article == 'publie' AND $visites > 0 AND $activer_statistiques != "non" AND $options == "avancees"){
|
|
|
388 |
icone_horizontale(_T('icone_evolution_visites', array('visites' => $visites)), "statistiques_visites.php3?id_article=$id_article", "statistiques-24.gif","rien.gif");
|
|
|
389 |
}
|
|
|
390 |
|
|
|
391 |
if ($articles_versions AND $id_version>1 AND $options == "avancees") {
|
|
|
392 |
icone_horizontale(_T('info_historique_lien'), "articles_versions.php3?id_article=$id_article", "historique-24.gif", "rien.gif");
|
|
|
393 |
}
|
|
|
394 |
|
|
|
395 |
// Correction orthographique
|
|
|
396 |
if (lire_meta('articles_ortho') == 'oui') {
|
|
|
397 |
$js_ortho = "onclick=\"window.open(this.href, 'spip_ortho', 'scrollbars=yes, resizable=yes, width=740, height=580'); return false;\"";
|
|
|
398 |
icone_horizontale(_T('ortho_verifier'), "articles_ortho.php?id_article=$id_article", "ortho-24.gif", "rien.gif", 'echo', $js_ortho);
|
|
|
399 |
}
|
|
|
400 |
|
|
|
401 |
echo "</div>\n";
|
|
|
402 |
|
|
|
403 |
fin_boite_info();
|
|
|
404 |
|
|
|
405 |
|
|
|
406 |
// Logos de l'article
|
|
|
407 |
|
|
|
408 |
if ($id_article AND $flag_editable)
|
|
|
409 |
afficher_boite_logo('art', 'id_article', $id_article,
|
|
|
410 |
_T('logo_article').aide ("logoart"), _T('logo_survol'));
|
|
|
411 |
|
|
|
412 |
|
|
|
413 |
//
|
|
|
414 |
// Boites de configuration avancee
|
|
|
415 |
//
|
|
|
416 |
|
|
|
417 |
if ($options == "avancees" && $connect_statut=='0minirezo' && $flag_editable) {
|
|
|
418 |
echo "<p>";
|
|
|
419 |
debut_cadre_relief("forum-interne-24.gif");
|
|
|
420 |
|
|
|
421 |
|
|
|
422 |
list($nb_forums) = spip_fetch_array(spip_query(
|
|
|
423 |
"SELECT count(*) AS count FROM spip_forum
|
|
|
424 |
WHERE id_article=$id_article
|
|
|
425 |
AND statut IN ('publie', 'off', 'prop')"));
|
|
|
426 |
|
|
|
427 |
list($nb_signatures) = spip_fetch_array(spip_query(
|
|
|
428 |
"SELECT COUNT(*) AS count FROM spip_signatures
|
|
|
429 |
WHERE id_article=$id_article
|
|
|
430 |
AND statut IN ('publie', 'poubelle')"));
|
|
|
431 |
|
|
|
432 |
|
|
|
433 |
$visible = $change_accepter_forum || $change_petition
|
|
|
434 |
|| $nb_forums || $nb_signatures;
|
|
|
435 |
|
|
|
436 |
echo "<div class='verdana1' style='text-align: center;'><b>";
|
|
|
437 |
if ($visible)
|
|
|
438 |
echo bouton_block_visible("forumpetition");
|
|
|
439 |
else
|
|
|
440 |
echo bouton_block_invisible("forumpetition");
|
|
|
441 |
echo _T('bouton_forum_petition') .aide('confforums');
|
|
|
442 |
echo "</b></div>";
|
|
|
443 |
if ($visible)
|
|
|
444 |
echo debut_block_visible("forumpetition");
|
|
|
445 |
else
|
|
|
446 |
echo debut_block_invisible("forumpetition");
|
|
|
447 |
|
|
|
448 |
|
|
|
449 |
echo "<font face='Verdana,Arial,Sans,sans-serif' size='1'>\n";
|
|
|
450 |
|
|
|
451 |
|
|
|
452 |
// Forums
|
|
|
453 |
|
|
|
454 |
if ($nb_forums) {
|
|
|
455 |
echo "<br />\n";
|
|
|
456 |
icone_horizontale(_T('icone_suivi_forum', array('nb_forums' => $nb_forums)),
|
|
|
457 |
"articles_forum.php3?id_article=$id_article", "suivi-forum-24.gif", "");
|
|
|
458 |
}
|
|
|
459 |
|
|
|
460 |
// Reglage existant
|
|
|
461 |
$forums_publics = get_forums_publics($id_article);
|
|
|
462 |
|
|
|
463 |
// Modification du reglage ?
|
|
|
464 |
if (isset($change_accepter_forum)
|
|
|
465 |
AND $change_accepter_forum <> $forums_publics) {
|
|
|
466 |
$forums_publics = $change_accepter_forum;
|
|
|
467 |
modifier_forums_publics($id_article, $forums_publics);
|
|
|
468 |
}
|
|
|
469 |
|
|
|
470 |
// Afficher le formulaire de modification du reglage
|
|
|
471 |
echo formulaire_modification_forums_publics($id_article, $forums_publics);
|
|
|
472 |
|
|
|
473 |
|
|
|
474 |
// Petitions
|
|
|
475 |
|
|
|
476 |
if ($change_petition) {
|
|
|
477 |
if ($change_petition == "on") {
|
|
|
478 |
if (!$email_unique) $email_unique = "non";
|
|
|
479 |
if (!$site_obli) $site_obli = "non";
|
|
|
480 |
if (!$site_unique) $site_unique = "non";
|
|
|
481 |
if (!$message) $message = "non";
|
|
|
482 |
|
|
|
483 |
$texte_petition = addslashes($texte_petition);
|
|
|
484 |
|
|
|
485 |
$query_pet = "REPLACE spip_petitions (id_article, email_unique, site_obli, site_unique, message, texte) ".
|
|
|
486 |
"VALUES ($id_article, '$email_unique', '$site_obli', '$site_unique', '$message', '$texte_petition')";
|
|
|
487 |
$result_pet = spip_query($query_pet);
|
|
|
488 |
}
|
|
|
489 |
else if ($change_petition == "off") {
|
|
|
490 |
$query_pet = "DELETE FROM spip_petitions WHERE id_article=$id_article";
|
|
|
491 |
$result_pet = spip_query($query_pet);
|
|
|
492 |
}
|
|
|
493 |
}
|
|
|
494 |
|
|
|
495 |
$petition = spip_fetch_array(spip_query(
|
|
|
496 |
"SELECT * FROM spip_petitions WHERE id_article=$id_article"));
|
|
|
497 |
|
|
|
498 |
$email_unique=$petition["email_unique"];
|
|
|
499 |
$site_obli=$petition["site_obli"];
|
|
|
500 |
$site_unique=$petition["site_unique"];
|
|
|
501 |
$message=$petition["message"];
|
|
|
502 |
$texte_petition=$petition["texte"];
|
|
|
503 |
|
|
|
504 |
echo "\n<form action='".$GLOBALS['clean_link']->getUrl()
|
|
|
505 |
."' method='POST'>";
|
|
|
506 |
echo "\n<input type='hidden' name='id_article' value='$id_article'>";
|
|
|
507 |
|
|
|
508 |
echo "<select name='change_petition'
|
|
|
509 |
class='fondl' style='font-size:10px;'
|
|
|
510 |
onChange=\"setvisibility('valider_petition', 'visible');\"
|
|
|
511 |
>\n";
|
|
|
512 |
|
|
|
513 |
if ($petition) {
|
|
|
514 |
$menu = array(
|
|
|
515 |
'on' => _T('bouton_radio_petition_activee'),
|
|
|
516 |
'off'=> _T('bouton_radio_supprimer_petition')
|
|
|
517 |
);
|
|
|
518 |
$val_menu = 'on';
|
|
|
519 |
} else {
|
|
|
520 |
$menu = array(
|
|
|
521 |
'off'=> _T('bouton_radio_pas_petition'),
|
|
|
522 |
'on' => _T('bouton_radio_activer_petition')
|
|
|
523 |
);
|
|
|
524 |
$val_menu = 'off';
|
|
|
525 |
}
|
|
|
526 |
|
|
|
527 |
|
|
|
528 |
foreach ($menu as $val => $desc) {
|
|
|
529 |
echo "<option";
|
|
|
530 |
if ($val_menu == $val)
|
|
|
531 |
echo " selected";
|
|
|
532 |
echo " value='$val'>".$desc."</option>\n";
|
|
|
533 |
}
|
|
|
534 |
echo "</select>\n";
|
|
|
535 |
|
|
|
536 |
if ($petition) {
|
|
|
537 |
if ($nb_signatures) {
|
|
|
538 |
echo "<br />\n";
|
|
|
539 |
icone_horizontale($nb_signatures.' '. _T('info_signatures'),
|
|
|
540 |
"controle_petition.php3?id_article=$id_article", "suivi-petition-24.gif", "");
|
|
|
541 |
}
|
|
|
542 |
|
|
|
543 |
echo "<br />\n";
|
|
|
544 |
|
|
|
545 |
if ($email_unique=="oui")
|
|
|
546 |
echo "<input type='checkbox' name='email_unique' value='oui' id='emailunique' checked>";
|
|
|
547 |
else
|
|
|
548 |
echo "<input type='checkbox' name='email_unique' value='oui' id='emailunique'>";
|
|
|
549 |
echo " <label for='emailunique'>"._T('bouton_checkbox_signature_unique_email')."</label><BR>";
|
|
|
550 |
if ($site_obli=="oui")
|
|
|
551 |
echo "<input type='checkbox' name='site_obli' value='oui' id='siteobli' checked>";
|
|
|
552 |
else
|
|
|
553 |
echo "<input type='checkbox' name='site_obli' value='oui' id='siteobli'>";
|
|
|
554 |
echo " <label for='siteobli'>"._T('bouton_checkbox_indiquer_site')."</label><BR>";
|
|
|
555 |
if ($site_unique=="oui")
|
|
|
556 |
echo "<input type='checkbox' name='site_unique' value='oui' id='siteunique' checked>";
|
|
|
557 |
else
|
|
|
558 |
echo "<input type='checkbox' name='site_unique' value='oui' id='siteunique'>";
|
|
|
559 |
echo " <label for='siteunique'>"._T('bouton_checkbox_signature_unique_site')."</label><BR>";
|
|
|
560 |
if ($message=="oui")
|
|
|
561 |
echo "<input type='checkbox' name='message' value='oui' id='message' checked>";
|
|
|
562 |
else
|
|
|
563 |
echo "<input type='checkbox' name='message' value='oui' id='message'>";
|
|
|
564 |
echo " <label for='message'>"._T('bouton_checkbox_envoi_message')."</label>";
|
|
|
565 |
|
|
|
566 |
echo "<P>"._T('texte_descriptif_petition')." :<BR>";
|
|
|
567 |
echo "<TEXTAREA NAME='texte_petition' CLASS='forml' ROWS='4' COLS='10' wrap=soft>";
|
|
|
568 |
echo $texte_petition;
|
|
|
569 |
echo "</TEXTAREA><P>\n";
|
|
|
570 |
|
|
|
571 |
echo "<P align='$spip_lang_right'>";
|
|
|
572 |
}
|
|
|
573 |
|
|
|
574 |
if (!$petition) echo "<span class='visible_au_chargement' id='valider_petition'>";
|
|
|
575 |
echo "<INPUT TYPE='submit' NAME='Changer' CLASS='fondo' VALUE='"._T('bouton_changer')."' STYLE='font-size:10px'>";
|
|
|
576 |
if (!$petition) echo "</span>";
|
|
|
577 |
echo "</FORM>";
|
|
|
578 |
|
|
|
579 |
echo "</font>";
|
|
|
580 |
echo fin_block();
|
|
|
581 |
|
|
|
582 |
fin_cadre_relief();
|
|
|
583 |
|
|
|
584 |
|
|
|
585 |
|
|
|
586 |
// Redirection (article virtuel)
|
|
|
587 |
debut_cadre_relief("site-24.gif");
|
|
|
588 |
$visible = ($changer_virtuel || $virtuel);
|
|
|
589 |
|
|
|
590 |
echo "<div class='verdana1' style='text-align: center;'><b>";
|
|
|
591 |
if ($visible)
|
|
|
592 |
echo bouton_block_visible("redirection");
|
|
|
593 |
else
|
|
|
594 |
echo bouton_block_invisible("redirection");
|
|
|
595 |
echo _T('bouton_redirection');
|
|
|
596 |
echo aide ("artvirt");
|
|
|
597 |
echo "</b></div>";
|
|
|
598 |
if ($visible)
|
|
|
599 |
echo debut_block_visible("redirection");
|
|
|
600 |
else
|
|
|
601 |
echo debut_block_invisible("redirection");
|
|
|
602 |
|
|
|
603 |
echo "<form action='articles.php3?id_article=$id_article' method='post'>";
|
|
|
604 |
echo "\n<INPUT TYPE='hidden' NAME='id_article' VALUE='$id_article'>";
|
|
|
605 |
echo "\n<INPUT TYPE='hidden' NAME='changer_virtuel' VALUE='oui'>";
|
|
|
606 |
$virtuelhttp = ($virtuel ? "" : "http://");
|
|
|
607 |
|
|
|
608 |
echo "<INPUT TYPE='text' NAME='virtuel' CLASS='formo' style='font-size:9px;' VALUE=\"$virtuelhttp$virtuel\" SIZE='40'><br>";
|
|
|
609 |
echo "<font face='Verdana,Arial,Sans,sans-serif' size=2>";
|
|
|
610 |
echo "(<b>"._T('texte_article_virtuel')." :</b> "._T('texte_reference_mais_redirige').")";
|
|
|
611 |
echo "</font>";
|
|
|
612 |
echo "<div align='$spip_lang_right'><INPUT TYPE='submit' NAME='Changer' CLASS='fondo' VALUE='"._T('bouton_changer')."' STYLE='font-size:10px'></div>";
|
|
|
613 |
echo "</form>";
|
|
|
614 |
echo fin_block();
|
|
|
615 |
|
|
|
616 |
fin_cadre_relief();
|
|
|
617 |
}
|
|
|
618 |
|
|
|
619 |
|
|
|
620 |
//
|
|
|
621 |
// Articles dans la meme rubrique
|
|
|
622 |
//
|
|
|
623 |
|
|
|
624 |
$vos_articles = spip_query("SELECT articles.id_article, articles.titre, articles.statut FROM spip_articles AS articles WHERE articles.id_rubrique='$id_rubrique' AND (articles.statut = 'publie' OR articles.statut = 'prop') AND articles.id_article != '$id_article' ".
|
|
|
625 |
" ORDER BY articles.date DESC LIMIT 0,30");
|
|
|
626 |
if (spip_num_rows($vos_articles) > 0) {
|
|
|
627 |
echo "<div> </div>";
|
|
|
628 |
echo "<div class='bandeau_rubriques' style='z-index: 1;'>";
|
|
|
629 |
bandeau_titre_boite2(_T('info_meme_rubrique'), "article-24.gif");
|
|
|
630 |
echo "<div class='plan-articles'>";
|
|
|
631 |
while($row = spip_fetch_array($vos_articles)) {
|
|
|
632 |
$ze_article = $row['id_article'];
|
|
|
633 |
$ze_titre = typo($row['titre']);
|
|
|
634 |
$ze_statut = $row['statut'];
|
|
|
635 |
|
|
|
636 |
if ($options == "avancees") {
|
|
|
637 |
$numero = "<div class='arial1' style='float: $spip_lang_right; color: black; padding-$spip_lang_left: 4px;'><b>"._T('info_numero_abbreviation')."$ze_article</b></div>";
|
|
|
638 |
}
|
|
|
639 |
echo "<a class='$ze_statut' style='font-size: 10px;' href='articles.php3?id_article=$ze_article'>$numero$ze_titre</a>";
|
|
|
640 |
}
|
|
|
641 |
echo "</div>";
|
|
|
642 |
echo "</div>";
|
|
|
643 |
}
|
|
|
644 |
|
|
|
645 |
|
|
|
646 |
//////////////////////////////////////////////////////
|
|
|
647 |
// Affichage de la colonne de droite
|
|
|
648 |
//
|
|
|
649 |
|
|
|
650 |
debut_droite();
|
|
|
651 |
|
|
|
652 |
|
|
|
653 |
changer_typo('','article'.$id_article);
|
|
|
654 |
|
|
|
655 |
debut_cadre_relief();
|
|
|
656 |
|
|
|
657 |
//
|
|
|
658 |
// Titre, surtitre, sous-titre
|
|
|
659 |
//
|
|
|
660 |
|
|
|
661 |
$logo_statut = "puce-".puce_statut($statut_article).".gif";
|
|
|
662 |
|
|
|
663 |
echo "\n<table cellpadding=0 cellspacing=0 border=0 width='100%'>";
|
|
|
664 |
echo "<tr width='100%'><td width='100%' valign='top'>";
|
|
|
665 |
if ($surtitre) {
|
|
|
666 |
echo "<span $dir_lang><font face='arial,helvetica' size=3><b>";
|
|
|
667 |
echo typo($surtitre);
|
|
|
668 |
echo "</b></font></span>\n";
|
|
|
669 |
}
|
|
|
670 |
gros_titre($titre, $logo_statut);
|
|
|
671 |
|
|
|
672 |
if ($soustitre) {
|
|
|
673 |
echo "<span $dir_lang><font face='arial,helvetica' size=3><b>";
|
|
|
674 |
echo typo($soustitre);
|
|
|
675 |
echo "</b></font></span>\n";
|
|
|
676 |
}
|
|
|
677 |
|
|
|
678 |
|
|
|
679 |
if ($descriptif OR $url_site OR $nom_site) {
|
|
|
680 |
echo "<p><div align='$spip_lang_left' style='padding: 5px; border: 1px dashed #aaaaaa; background-color: #e4e4e4;' $dir_lang>";
|
|
|
681 |
echo "<font size=2 face='Verdana,Arial,Sans,sans-serif'>";
|
|
|
682 |
$texte_case = ($descriptif) ? "{{"._T('info_descriptif')."}} $descriptif\n\n" : '';
|
|
|
683 |
$texte_case .= ($nom_site.$url_site) ? "{{"._T('info_urlref')."}} [".$nom_site."->".$url_site."]" : '';
|
|
|
684 |
echo propre($texte_case);
|
|
|
685 |
echo "</font>";
|
|
|
686 |
echo "</div>";
|
|
|
687 |
}
|
|
|
688 |
|
|
|
689 |
|
|
|
690 |
if ($statut_article == 'prop') {
|
|
|
691 |
echo "<P><FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=2 COLOR='red'><B>"._T('text_article_propose_publication')."</B></FONT></P>";
|
|
|
692 |
}
|
|
|
693 |
|
|
|
694 |
echo "</td>";
|
|
|
695 |
|
|
|
696 |
|
|
|
697 |
if ($flag_editable) {
|
|
|
698 |
echo "<td>". http_img_pack('rien.gif', " ", "width='5'") . "</td>\n";
|
|
|
699 |
echo "<td align='center'>";
|
|
|
700 |
$flag_modif = false;
|
|
|
701 |
|
|
|
702 |
// Recuperer les donnees de l'article
|
|
|
703 |
if (lire_meta('articles_modif') != 'non') {
|
|
|
704 |
$query = "SELECT auteur_modif, UNIX_TIMESTAMP(date_modif) AS modification, UNIX_TIMESTAMP(NOW()) AS maintenant FROM spip_articles WHERE id_article='$id_article'";
|
|
|
705 |
$result = spip_query($query);
|
|
|
706 |
|
|
|
707 |
if ($row = spip_fetch_array($result)) {
|
|
|
708 |
$auteur_modif = $row["auteur_modif"];
|
|
|
709 |
$modification = $row["modification"];
|
|
|
710 |
$maintenant = $row["maintenant"];
|
|
|
711 |
|
|
|
712 |
$date_diff = floor(($maintenant - $modification)/60);
|
|
|
713 |
|
|
|
714 |
if ($date_diff >= 0 AND $date_diff < 60 AND $auteur_modif > 0 AND $auteur_modif != $connect_id_auteur) {
|
|
|
715 |
$flag_modif = true;
|
|
|
716 |
$query_auteur = "SELECT nom FROM spip_auteurs WHERE id_auteur='$auteur_modif'";
|
|
|
717 |
$result_auteur = spip_query($query_auteur);
|
|
|
718 |
if ($row_auteur = spip_fetch_array($result_auteur)) {
|
|
|
719 |
$nom_auteur_modif = typo($row_auteur["nom"]);
|
|
|
720 |
}
|
|
|
721 |
}
|
|
|
722 |
}
|
|
|
723 |
}
|
|
|
724 |
if ($flag_modif) {
|
|
|
725 |
icone(_T('icone_modifier_article'), "articles_edit.php3?id_article=$id_article", "article-24.gif", "edit.gif");
|
|
|
726 |
echo "<font face='arial,helvetica,sans-serif' size='2'>"._T('avis_article_modifie', array('nom_auteur_modif' => $nom_auteur_modif, 'date_diff' => $date_diff))."</font>";
|
|
|
727 |
echo aide("artmodif");
|
|
|
728 |
}
|
|
|
729 |
else {
|
|
|
730 |
icone(_T('icone_modifier_article'), "articles_edit.php3?id_article=$id_article", "article-24.gif", "edit.gif");
|
|
|
731 |
}
|
|
|
732 |
|
|
|
733 |
echo "</td>";
|
|
|
734 |
}
|
|
|
735 |
echo "</tr></table>\n";
|
|
|
736 |
|
|
|
737 |
|
|
|
738 |
echo "<div> </div>";
|
|
|
739 |
echo "<div class='serif' align='$spip_lang_left'>";
|
|
|
740 |
|
|
|
741 |
//
|
|
|
742 |
// Affichage date redac et date publi
|
|
|
743 |
//
|
|
|
744 |
|
|
|
745 |
if ($flag_editable AND $options == 'avancees') {
|
|
|
746 |
debut_cadre_couleur();
|
|
|
747 |
|
|
|
748 |
echo "<FORM ACTION='articles.php3' METHOD='GET' style='margin: 0px; padding: 0px;'>";
|
|
|
749 |
echo "<INPUT TYPE='hidden' NAME='id_article' VALUE='$id_article'>";
|
|
|
750 |
|
|
|
751 |
if ($statut_article == 'publie') {
|
|
|
752 |
|
|
|
753 |
echo "<div><b>";
|
|
|
754 |
echo bouton_block_invisible("datepub");
|
|
|
755 |
echo "<span class='verdana1'>"._T('texte_date_publication_article').'</span> ';
|
|
|
756 |
echo majuscules(affdate($date)),
|
|
|
757 |
# ', <small>'._T('date_fmt_heures_minutes',
|
|
|
758 |
# array('h' =>$heure, 'm'=>$minute)), '</small>',
|
|
|
759 |
"</b>".aide('artdate')."</div>";
|
|
|
760 |
|
|
|
761 |
echo debut_block_invisible("datepub"),
|
|
|
762 |
"<div style='margin: 5px; margin-$spip_lang_left: 20px;'>",
|
|
|
763 |
afficher_jour($jour, "name='jour' size='1' class='fondl' onChange=\"setvisibility('valider_date', 'visible')\"", true),
|
|
|
764 |
afficher_mois($mois, "name='mois' size='1' class='fondl' onChange=\"setvisibility('valider_date', 'visible')\"", true),
|
|
|
765 |
afficher_annee($annee, "name='annee' size='1' class='fondl' onChange=\"setvisibility('valider_date', 'visible')\""),
|
|
|
766 |
' - ',
|
|
|
767 |
afficher_heure($heure, "name='heure' size='1' class='fondl' onChange=\"setvisibility('valider_date', 'visible')\""),
|
|
|
768 |
afficher_minute($minute, "name='minute' size='1' class='fondl' onChange=\"setvisibility('valider_date', 'visible')\""),
|
|
|
769 |
"<span class='visible_au_chargement' id='valider_date'>",
|
|
|
770 |
" <INPUT TYPE='submit' NAME='Changer' CLASS='fondo' VALUE='"._T('bouton_changer')."'>",
|
|
|
771 |
"</span>",
|
|
|
772 |
"</div>",
|
|
|
773 |
fin_block();
|
|
|
774 |
}
|
|
|
775 |
else {
|
|
|
776 |
echo "<div><b> <span class='verdana1'>"._T('texte_date_creation_article').'</span> ';
|
|
|
777 |
echo majuscules(affdate($date))."</b>".aide('artdate')."</div>";
|
|
|
778 |
}
|
|
|
779 |
|
|
|
780 |
$possedeDateRedac=($annee_redac.'-'.$mois_redac.'-'.$jour_redac != '0000-00-00');
|
|
|
781 |
if (($options == 'avancees' AND $articles_redac != 'non')
|
|
|
782 |
OR $possedeDateRedac) {
|
|
|
783 |
if ($possedeDateRedac)
|
|
|
784 |
$date_affichee = majuscules(affdate($date_redac))
|
|
|
785 |
# ." " ._T('date_fmt_heures_minutes', array('h' =>$heure_redac, 'm'=>$minute_redac))
|
|
|
786 |
;
|
|
|
787 |
else
|
|
|
788 |
$date_affichee = majuscules(_T('jour_non_connu_nc'));
|
|
|
789 |
|
|
|
790 |
echo "<div><b>";
|
|
|
791 |
echo bouton_block_invisible('dateredac');
|
|
|
792 |
echo "<span class='verdana1'>"
|
|
|
793 |
. majuscules(_T('texte_date_publication_anterieure'))
|
|
|
794 |
.'</span> '. $date_affichee ." ".aide('artdate_redac')."</b></div>";
|
|
|
795 |
|
|
|
796 |
echo debut_block_invisible('dateredac');
|
|
|
797 |
echo "<div style='margin: 5px; margin-$spip_lang_left: 20px;'>";
|
|
|
798 |
echo '<table cellpadding="0" cellspacing="0" border="0" width="100%">';
|
|
|
799 |
echo '<tr><td align="$spip_lang_left">';
|
|
|
800 |
echo '<input type="radio" name="avec_redac" value="non" id="avec_redac_on"';
|
|
|
801 |
if (!$possedeDateRedac) echo ' checked="checked"';
|
|
|
802 |
echo " onClick=\"setvisibility('valider_date_prec', 'visible')\"";
|
|
|
803 |
echo ' /> <label for="avec_redac_on">'._T('texte_date_publication_anterieure_nonaffichee').'</label>';
|
|
|
804 |
echo '<br /><input type="radio" name="avec_redac" value="oui" id="avec_redac_off"';
|
|
|
805 |
if ($possedeDateRedac) echo ' checked="checked"';
|
|
|
806 |
echo " onClick=\"setvisibility('valider_date_prec', 'visible')\"";
|
|
|
807 |
echo ' /> <label for="avec_redac_off">'._T('bouton_radio_afficher').' :</label> ',
|
|
|
808 |
afficher_jour($jour_redac, "name='jour_redac' class='fondl' onChange=\"setvisibility('valider_date_prec', 'visible')\"", true),
|
|
|
809 |
afficher_mois($mois_redac, "name='mois_redac' class='fondl' onChange=\"setvisibility('valider_date_prec', 'visible')\"", true);
|
|
|
810 |
echo "<input type='text' name='annee_redac' class='fondl' value='".$annee_redac."' size='5' maxlength='4' onClick=\"setvisibility('valider_date_prec', 'visible')\"/>";
|
|
|
811 |
|
|
|
812 |
echo '<div align="center">',
|
|
|
813 |
afficher_heure($heure_redac, "name='heure_redac' class='fondl' onChange=\"setvisibility('valider_date_prec', 'visible')\"", true),
|
|
|
814 |
afficher_minute($minute_redac, "name='minute_redac' class='fondl' onChange=\"setvisibility('valider_date_prec', 'visible')\"", true),
|
|
|
815 |
"</div>\n";
|
|
|
816 |
|
|
|
817 |
echo '</td><td align="$spip_lang_right">';
|
|
|
818 |
echo "<span class='visible_au_chargement' id='valider_date_prec'>";
|
|
|
819 |
echo '<input type="submit" name="Changer" class="fondo" value="'._T('bouton_changer').'" />';
|
|
|
820 |
echo "</span>";
|
|
|
821 |
echo '</td></tr>';
|
|
|
822 |
echo '</table>';
|
|
|
823 |
echo "</div>";
|
|
|
824 |
echo fin_block();
|
|
|
825 |
}
|
|
|
826 |
|
|
|
827 |
echo "</FORM>";
|
|
|
828 |
fin_cadre_couleur();
|
|
|
829 |
}
|
|
|
830 |
else {
|
|
|
831 |
if ($statut_article == 'publie') $texte_date = _T('texte_date_publication_article');
|
|
|
832 |
else $texte_date = _T('texte_date_creation_article');
|
|
|
833 |
|
|
|
834 |
debut_cadre_couleur();
|
|
|
835 |
echo "<div style='text-align:center;'><b> <span class='verdana1'>$texte_date</span> ";
|
|
|
836 |
echo majuscules(affdate($date))."</b>".aide('artdate')."</div>";
|
|
|
837 |
|
|
|
838 |
|
|
|
839 |
if ($annee_redac.'-'.$mois_redac.'-'.$jour_redac != '0000-00-00') {
|
|
|
840 |
$date_affichee = ' : '.majuscules(affdate($date_redac));
|
|
|
841 |
echo "<div style='text-align:center;'><b> <span class='verdana1'>"._T(texte_date_publication_anterieure)."</span> ";
|
|
|
842 |
echo $date_affichee."</b>".aide('artdate_redac')."</div>";
|
|
|
843 |
}
|
|
|
844 |
|
|
|
845 |
fin_cadre_couleur();
|
|
|
846 |
}
|
|
|
847 |
|
|
|
848 |
|
|
|
849 |
|
|
|
850 |
//
|
|
|
851 |
// Liste des auteurs de l'article
|
|
|
852 |
//
|
|
|
853 |
|
|
|
854 |
echo "<a name='auteurs'></a>";
|
|
|
855 |
|
|
|
856 |
if ($flag_editable AND $options == 'avancees') {
|
|
|
857 |
$bouton = bouton_block_invisible("auteursarticle");
|
|
|
858 |
}
|
|
|
859 |
|
|
|
860 |
debut_cadre_enfonce("auteur-24.gif", false, "", $bouton._T('texte_auteurs').aide ("artauteurs"));
|
|
|
861 |
|
|
|
862 |
|
|
|
863 |
|
|
|
864 |
////////////////////////////////////////////////////
|
|
|
865 |
// Gestion des auteurs
|
|
|
866 |
//
|
|
|
867 |
|
|
|
868 |
// Creer un nouvel auteur et l'ajouter
|
|
|
869 |
#spip_log("$creer_auteur AND $connect_statut");
|
|
|
870 |
# ce code n'est jamais execute. A tirer au clair
|
|
|
871 |
if ($creer_auteur AND $connect_statut=='0minirezo'){
|
|
|
872 |
$creer_auteur = addslashes($creer_auteur);
|
|
|
873 |
|
|
|
874 |
$nouv_auteur = spip_abstract_insert('spip_auteurs', "(nom, statut)",
|
|
|
875 |
"(\"$creer_auteur\", '1comite')");
|
|
|
876 |
$ajout_auteur = true;
|
|
|
877 |
}
|
|
|
878 |
|
|
|
879 |
|
|
|
880 |
//
|
|
|
881 |
// Recherche d'auteur
|
|
|
882 |
//
|
|
|
883 |
|
|
|
884 |
if ($cherche_auteur) {
|
|
|
885 |
echo "<P ALIGN='$spip_lang_left'>";
|
|
|
886 |
$query = "SELECT id_auteur, nom FROM spip_auteurs";
|
|
|
887 |
$result = spip_query($query);
|
|
|
888 |
unset($table_auteurs);
|
|
|
889 |
unset($table_ids);
|
|
|
890 |
while ($row = spip_fetch_array($result)) {
|
|
|
891 |
$table_auteurs[] = $row["nom"];
|
|
|
892 |
$table_ids[] = $row["id_auteur"];
|
|
|
893 |
}
|
|
|
894 |
$resultat = mots_ressemblants($cherche_auteur, $table_auteurs, $table_ids);
|
|
|
895 |
debut_boite_info();
|
|
|
896 |
if (!$resultat) {
|
|
|
897 |
echo "<B>"._T('texte_aucun_resultat_auteur', array('cherche_auteur' => $cherche_auteur)).".</B><BR>";
|
|
|
898 |
}
|
|
|
899 |
else if (count($resultat) == 1) {
|
|
|
900 |
$ajout_auteur = 'oui';
|
|
|
901 |
list(, $nouv_auteur) = each($resultat);
|
|
|
902 |
echo "<B>"._T('texte_ajout_auteur')."</B><BR>";
|
|
|
903 |
$query = "SELECT * FROM spip_auteurs WHERE id_auteur=$nouv_auteur";
|
|
|
904 |
$result = spip_query($query);
|
|
|
905 |
echo "<UL>";
|
|
|
906 |
while ($row = spip_fetch_array($result)) {
|
|
|
907 |
$id_auteur = $row['id_auteur'];
|
|
|
908 |
$nom_auteur = $row['nom'];
|
|
|
909 |
$email_auteur = $row['email'];
|
|
|
910 |
$bio_auteur = $row['bio'];
|
|
|
911 |
|
|
|
912 |
echo "<LI><FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=2><B><FONT SIZE=3>".typo($nom_auteur)."</FONT></B>";
|
|
|
913 |
echo "</FONT>\n";
|
|
|
914 |
}
|
|
|
915 |
echo "</UL>";
|
|
|
916 |
}
|
|
|
917 |
else if (count($resultat) < 16) {
|
|
|
918 |
reset($resultat);
|
|
|
919 |
unset($les_auteurs);
|
|
|
920 |
while (list(, $id_auteur) = each($resultat)) $les_auteurs[] = $id_auteur;
|
|
|
921 |
if ($les_auteurs) {
|
|
|
922 |
$les_auteurs = join(',', $les_auteurs);
|
|
|
923 |
echo "<B>"._T('texte_plusieurs_articles', array('cherche_auteur' => $cherche_auteur))."</B><BR>";
|
|
|
924 |
$query = "SELECT * FROM spip_auteurs WHERE id_auteur IN ($les_auteurs) ORDER BY nom";
|
|
|
925 |
$result = spip_query($query);
|
|
|
926 |
echo "<UL class='verdana1'>";
|
|
|
927 |
while ($row = spip_fetch_array($result)) {
|
|
|
928 |
$id_auteur = $row['id_auteur'];
|
|
|
929 |
$nom_auteur = $row['nom'];
|
|
|
930 |
$email_auteur = $row['email'];
|
|
|
931 |
$bio_auteur = $row['bio'];
|
|
|
932 |
|
|
|
933 |
echo "<li><b>".typo($nom_auteur)."</b>";
|
|
|
934 |
|
|
|
935 |
if ($email_auteur) echo " ($email_auteur)";
|
|
|
936 |
echo " | <A HREF=\"articles.php3?id_article=$id_article&ajout_auteur=oui&nouv_auteur=$id_auteur#auteurs\">"._T('lien_ajouter_auteur')."</A>";
|
|
|
937 |
|
|
|
938 |
if (trim($bio_auteur)) {
|
|
|
939 |
echo "<br />".couper(propre($bio_auteur), 100)."\n";
|
|
|
940 |
}
|
|
|
941 |
echo "</li>\n";
|
|
|
942 |
}
|
|
|
943 |
echo "</UL>";
|
|
|
944 |
}
|
|
|
945 |
}
|
|
|
946 |
else {
|
|
|
947 |
echo "<B>"._T('texte_trop_resultats_auteurs', array('cherche_auteur' => $cherche_auteur))."</B><BR>";
|
|
|
948 |
}
|
|
|
949 |
|
|
|
950 |
if ($GLOBALS['connect_statut'] == '0minirezo') {
|
|
|
951 |
echo "<div style='width: 200px;'>";
|
|
|
952 |
$retour = urlencode($GLOBALS['clean_link']->getUrl());
|
|
|
953 |
$titre = urlencode($cherche_auteur);
|
|
|
954 |
icone_horizontale(_T('icone_creer_auteur'), "auteur_infos.php3?new=oui&ajouter_id_article=$id_article&titre=$titre&redirect=$retour", "redacteurs-24.gif", "creer.gif");
|
|
|
955 |
echo "</div> ";
|
|
|
956 |
|
|
|
957 |
// message pour ne pas afficher le second bouton "creer un auteur"
|
|
|
958 |
$supprimer_bouton_creer_auteur = true;
|
|
|
959 |
}
|
|
|
960 |
|
|
|
961 |
fin_boite_info();
|
|
|
962 |
echo "<P>";
|
|
|
963 |
|
|
|
964 |
}
|
|
|
965 |
|
|
|
966 |
|
|
|
967 |
|
|
|
968 |
//
|
|
|
969 |
// Appliquer les modifications sur les auteurs
|
|
|
970 |
//
|
|
|
971 |
|
|
|
972 |
if ($ajout_auteur && $flag_editable) {
|
|
|
973 |
if ($nouv_auteur > 0) {
|
|
|
974 |
$query="DELETE FROM spip_auteurs_articles WHERE id_auteur='$nouv_auteur' AND id_article='$id_article'";
|
|
|
975 |
$result=spip_query($query);
|
|
|
976 |
$query="INSERT INTO spip_auteurs_articles (id_auteur,id_article) VALUES ('$nouv_auteur','$id_article')";
|
|
|
977 |
$result=spip_query($query);
|
|
|
978 |
}
|
|
|
979 |
|
|
|
980 |
if (lire_meta('activer_moteur') == 'oui') {
|
|
|
981 |
include_ecrire ("inc_index.php3");
|
|
|
982 |
marquer_indexer('article', $id_article);
|
|
|
983 |
}
|
|
|
984 |
}
|
|
|
985 |
|
|
|
986 |
if ($supp_auteur && $flag_editable) {
|
|
|
987 |
$query="DELETE FROM spip_auteurs_articles WHERE id_auteur='$supp_auteur' AND id_article='$id_article'";
|
|
|
988 |
$result=spip_query($query);
|
|
|
989 |
if (lire_meta('activer_moteur') == 'oui') {
|
|
|
990 |
include_ecrire ("inc_index.php3");
|
|
|
991 |
marquer_indexer('article', $id_article);
|
|
|
992 |
}
|
|
|
993 |
}
|
|
|
994 |
|
|
|
995 |
|
|
|
996 |
//
|
|
|
997 |
// Afficher les auteurs
|
|
|
998 |
//
|
|
|
999 |
|
|
|
1000 |
unset($les_auteurs);
|
|
|
1001 |
|
|
|
1002 |
$query = "SELECT * FROM spip_auteurs AS auteurs, spip_auteurs_articles AS lien ".
|
|
|
1003 |
"WHERE auteurs.id_auteur=lien.id_auteur AND lien.id_article=$id_article ".
|
|
|
1004 |
"GROUP BY auteurs.id_auteur ORDER BY auteurs.nom";
|
|
|
1005 |
$result = spip_query($query);
|
|
|
1006 |
|
|
|
1007 |
if (spip_num_rows($result)) {
|
|
|
1008 |
echo "<div class='liste'>";
|
|
|
1009 |
echo "<table width='100%' cellpadding='3' cellspacing='0' border='0' background=''>";
|
|
|
1010 |
$table = '';
|
|
|
1011 |
while ($row = spip_fetch_array($result)) {
|
|
|
1012 |
$vals = '';
|
|
|
1013 |
$id_auteur = $row["id_auteur"];
|
|
|
1014 |
$nom_auteur = $row["nom"];
|
|
|
1015 |
$email_auteur = $row["email"];
|
|
|
1016 |
if ($bio_auteur = attribut_html(propre(couper($row["bio"], 100))))
|
|
|
1017 |
$bio_auteur = " TITLE=\"$bio_auteur\"";
|
|
|
1018 |
$url_site_auteur = $row["url_site"];
|
|
|
1019 |
$statut_auteur = $row["statut"];
|
|
|
1020 |
if ($row['messagerie'] == 'non' OR $row['login'] == '') $messagerie = 'non';
|
|
|
1021 |
|
|
|
1022 |
$les_auteurs[] = $id_auteur;
|
|
|
1023 |
|
|
|
1024 |
if ($connect_statut == "0minirezo") $aff_articles = "('prepa', 'prop', 'publie', 'refuse')";
|
|
|
1025 |
else $aff_articles = "('prop', 'publie')";
|
|
|
1026 |
|
|
|
1027 |
$query2 = "SELECT COUNT(articles.id_article) AS compteur ".
|
|
|
1028 |
"FROM spip_auteurs_articles AS lien, spip_articles AS articles ".
|
|
|
1029 |
"WHERE lien.id_auteur=$id_auteur AND articles.id_article=lien.id_article ".
|
|
|
1030 |
"AND articles.statut IN $aff_articles GROUP BY lien.id_auteur";
|
|
|
1031 |
$result2 = spip_query($query2);
|
|
|
1032 |
if ($result2) list($nombre_articles) = spip_fetch_array($result2);
|
|
|
1033 |
else $nombre_articles = 0;
|
|
|
1034 |
|
|
|
1035 |
$url_auteur = "auteurs_edit.php3?id_auteur=$id_auteur";
|
|
|
1036 |
|
|
|
1037 |
$vals[] = bonhomme_statut($row);
|
|
|
1038 |
|
|
|
1039 |
$vals[] = "<A HREF=\"$url_auteur\"$bio_auteur>".typo($nom_auteur)."</A>";
|
|
|
1040 |
|
|
|
1041 |
$vals[] = bouton_imessage($id_auteur);
|
|
|
1042 |
|
|
|
1043 |
|
|
|
1044 |
|
|
|
1045 |
if ($email_auteur) $vals[] = "<A HREF='mailto:$email_auteur'>"._T('email')."</A>";
|
|
|
1046 |
else $vals[] = " ";
|
|
|
1047 |
|
|
|
1048 |
if ($url_site_auteur) $vals[] = "<A HREF='$url_site_auteur'>"._T('info_site_min')."</A>";
|
|
|
1049 |
else $vals[] = " ";
|
|
|
1050 |
|
|
|
1051 |
if ($nombre_articles > 1) $vals[] = $nombre_articles.' '._T('info_article_2');
|
|
|
1052 |
else if ($nombre_articles == 1) $vals[] = _T('info_1_article');
|
|
|
1053 |
else $vals[] = " ";
|
|
|
1054 |
|
|
|
1055 |
if ($flag_editable AND ($connect_id_auteur != $id_auteur OR $connect_statut == '0minirezo') AND $options == 'avancees') {
|
|
|
1056 |
$vals[] = "<A HREF='articles.php3?id_article=$id_article&supp_auteur=$id_auteur#auteurs'>"._T('lien_retirer_auteur')." ". http_img_pack('croix-rouge.gif', "X", "width='7' height='7' border='0' align='middle'") . "</A>";
|
|
|
1057 |
} else {
|
|
|
1058 |
$vals[] = "";
|
|
|
1059 |
}
|
|
|
1060 |
|
|
|
1061 |
$table[] = $vals;
|
|
|
1062 |
}
|
|
|
1063 |
|
|
|
1064 |
|
|
|
1065 |
$largeurs = array('14', '', '', '', '', '', '');
|
|
|
1066 |
$styles = array('arial11', 'arial2', 'arial11', 'arial11', 'arial11', 'arial11', 'arial1');
|
|
|
1067 |
afficher_liste($largeurs, $table, $styles);
|
|
|
1068 |
|
|
|
1069 |
|
|
|
1070 |
echo "</table></div>\n";
|
|
|
1071 |
|
|
|
1072 |
$les_auteurs = join(',', $les_auteurs);
|
|
|
1073 |
}
|
|
|
1074 |
|
|
|
1075 |
|
|
|
1076 |
//
|
|
|
1077 |
// Ajouter un auteur
|
|
|
1078 |
//
|
|
|
1079 |
|
|
|
1080 |
if ($flag_editable AND $options == 'avancees') {
|
|
|
1081 |
echo debut_block_invisible("auteursarticle");
|
|
|
1082 |
|
|
|
1083 |
$query = "SELECT * FROM spip_auteurs WHERE ";
|
|
|
1084 |
if ($les_auteurs) $query .= "id_auteur NOT IN ($les_auteurs) AND ";
|
|
|
1085 |
$query .= "statut!='5poubelle' AND statut!='6forum' AND statut!='nouveau' ORDER BY statut, nom";
|
|
|
1086 |
$result = spip_query($query);
|
|
|
1087 |
|
|
|
1088 |
echo "<table width='100%'>";
|
|
|
1089 |
echo "<tr>";
|
|
|
1090 |
|
|
|
1091 |
if ($connect_statut == '0minirezo'
|
|
|
1092 |
AND acces_rubrique($rubrique_article)
|
|
|
1093 |
AND $options == "avancees"
|
|
|
1094 |
AND !$supprimer_bouton_creer_auteur) {
|
|
|
1095 |
echo "<td width='200'>";
|
|
|
1096 |
$retour = urlencode($clean_link->getUrl());
|
|
|
1097 |
icone_horizontale(_T('icone_creer_auteur'), "auteur_infos.php3?new=oui&ajouter_id_article=$id_article&redirect=$retour", "redacteurs-24.gif", "creer.gif");
|
|
|
1098 |
echo "</td>";
|
|
|
1099 |
echo "<td width='20'> </td>";
|
|
|
1100 |
}
|
|
|
1101 |
|
|
|
1102 |
echo "<td>";
|
|
|
1103 |
|
|
|
1104 |
|
|
|
1105 |
if (spip_num_rows($result) > 0) {
|
|
|
1106 |
echo "<FORM ACTION='articles.php3?id_article=$id_article#auteurs' METHOD='post'>";
|
|
|
1107 |
echo "<span class='verdana1'><B>"._T('titre_cadre_ajouter_auteur')." </B></span>\n";
|
|
|
1108 |
echo "<DIV><INPUT TYPE='Hidden' NAME='id_article' VALUE=\"$id_article\">";
|
|
|
1109 |
|
|
|
1110 |
if (spip_num_rows($result) > 200) {
|
|
|
1111 |
echo "<INPUT TYPE='text' NAME='cherche_auteur' onClick=\"setvisibility('valider_ajouter_auteur','visible');\" CLASS='fondl' VALUE='' SIZE='20'>";
|
|
|
1112 |
echo "<span class='visible_au_chargement' id='valider_ajouter_auteur'>";
|
|
|
1113 |
echo " <INPUT TYPE='submit' NAME='Chercher' VALUE='"._T('bouton_chercher')."' CLASS='fondo'>";
|
|
|
1114 |
echo "</span>";
|
|
|
1115 |
}
|
|
|
1116 |
else {
|
|
|
1117 |
echo "<INPUT TYPE='Hidden' NAME='ajout_auteur' VALUE='oui'>";
|
|
|
1118 |
echo "<SELECT NAME='nouv_auteur' SIZE='1' STYLE='width:150px;' CLASS='fondl' onChange=\"setvisibility('valider_ajouter_auteur','visible');\">";
|
|
|
1119 |
$group = false;
|
|
|
1120 |
$group2 = false;
|
|
|
1121 |
|
|
|
1122 |
while ($row = spip_fetch_array($result)) {
|
|
|
1123 |
$id_auteur = $row["id_auteur"];
|
|
|
1124 |
$nom = $row["nom"];
|
|
|
1125 |
$email = $row["email"];
|
|
|
1126 |
$statut = $row["statut"];
|
|
|
1127 |
|
|
|
1128 |
$statut=str_replace("0minirezo", _T('info_administrateurs'), $statut);
|
|
|
1129 |
$statut=str_replace("1comite", _T('info_redacteurs'), $statut);
|
|
|
1130 |
$statut=str_replace("6visiteur", _T('info_visiteurs'), $statut);
|
|
|
1131 |
|
|
|
1132 |
$premiere = strtoupper(substr(trim($nom), 0, 1));
|
|
|
1133 |
|
|
|
1134 |
if ($connect_statut != '0minirezo')
|
|
|
1135 |
if ($p = strpos($email, '@'))
|
|
|
1136 |
$email = substr($email, 0, $p).'@...';
|
|
|
1137 |
if ($email)
|
|
|
1138 |
$email = " ($email)";
|
|
|
1139 |
|
|
|
1140 |
if ($statut != $statut_old) {
|
|
|
1141 |
echo "\n<OPTION VALUE=\"x\">";
|
|
|
1142 |
echo "\n<OPTION VALUE=\"x\" style='background-color: $couleur_claire;'> $statut";
|
|
|
1143 |
}
|
|
|
1144 |
|
|
|
1145 |
if ($premiere != $premiere_old AND ($statut != _T('info_administrateurs') OR !$premiere_old)) {
|
|
|
1146 |
echo "\n<OPTION VALUE=\"x\">";
|
|
|
1147 |
}
|
|
|
1148 |
|
|
|
1149 |
$texte_option = supprimer_tags(couper(typo("$nom$email"), 40));
|
|
|
1150 |
echo "\n<OPTION VALUE=\"$id_auteur\"> $texte_option";
|
|
|
1151 |
$statut_old = $statut;
|
|
|
1152 |
$premiere_old = $premiere;
|
|
|
1153 |
}
|
|
|
1154 |
|
|
|
1155 |
echo "</SELECT>";
|
|
|
1156 |
echo "<span class='visible_au_chargement' id='valider_ajouter_auteur'>";
|
|
|
1157 |
echo " <INPUT TYPE='submit' NAME='Ajouter' VALUE="._T('bouton_ajouter')." CLASS='fondo'>";
|
|
|
1158 |
echo "</span>";
|
|
|
1159 |
}
|
|
|
1160 |
echo "</div></FORM>";
|
|
|
1161 |
}
|
|
|
1162 |
|
|
|
1163 |
echo "</td></tr></table>";
|
|
|
1164 |
|
|
|
1165 |
|
|
|
1166 |
echo fin_block();
|
|
|
1167 |
}
|
|
|
1168 |
|
|
|
1169 |
fin_cadre_enfonce(false);
|
|
|
1170 |
|
|
|
1171 |
|
|
|
1172 |
//////////////////////////////////////////////////////
|
|
|
1173 |
// Liste des mots-cles de l'article
|
|
|
1174 |
//
|
|
|
1175 |
|
|
|
1176 |
if ($options == 'avancees' AND $articles_mots != 'non') {
|
|
|
1177 |
formulaire_mots('articles', $id_article, $nouv_mot, $supp_mot, $cherche_mot, $flag_editable);
|
|
|
1178 |
}
|
|
|
1179 |
|
|
|
1180 |
|
|
|
1181 |
//
|
|
|
1182 |
// Langue de l'article
|
|
|
1183 |
//
|
|
|
1184 |
if ((lire_meta('multi_articles') == 'oui')
|
|
|
1185 |
OR ((lire_meta('multi_rubriques') == 'oui') AND (lire_meta('gerer_trad') == 'oui'))) {
|
|
|
1186 |
|
|
|
1187 |
$row = spip_fetch_array(spip_query("SELECT lang, langue_choisie FROM spip_articles WHERE id_article=$id_article"));
|
|
|
1188 |
$langue_article = $row['lang'];
|
|
|
1189 |
$langue_choisie_article = $row['langue_choisie'];
|
|
|
1190 |
|
|
|
1191 |
if (lire_meta('gerer_trad') == 'oui')
|
|
|
1192 |
$titre_barre = _T('titre_langue_trad_article');
|
|
|
1193 |
else
|
|
|
1194 |
$titre_barre = _T('titre_langue_article');
|
|
|
1195 |
|
|
|
1196 |
$titre_barre .= " (".traduire_nom_langue($langue_article).")";
|
|
|
1197 |
|
|
|
1198 |
debut_cadre_enfonce('langues-24.gif', false, "", bouton_block_invisible('languesarticle,ne_plus_lier,lier_traductions').$titre_barre);
|
|
|
1199 |
|
|
|
1200 |
|
|
|
1201 |
// Choix langue article
|
|
|
1202 |
if (lire_meta('multi_articles') == 'oui' AND $flag_editable) {
|
|
|
1203 |
echo debut_block_invisible('languesarticle');
|
|
|
1204 |
|
|
|
1205 |
$row = spip_fetch_array(spip_query("SELECT lang FROM spip_rubriques WHERE id_rubrique=$id_rubrique"));
|
|
|
1206 |
$langue_parent = $row['lang'];
|
|
|
1207 |
|
|
|
1208 |
if ($langue_choisie_article == 'oui') $herit = false;
|
|
|
1209 |
else $herit = true;
|
|
|
1210 |
|
|
|
1211 |
debut_cadre_couleur();
|
|
|
1212 |
echo "<div style='text-align: center;'>";
|
|
|
1213 |
echo menu_langues('changer_lang', $langue_article, _T('info_multi_cet_article').' ', $langue_parent);
|
|
|
1214 |
echo "</div>\n";
|
|
|
1215 |
fin_cadre_couleur();
|
|
|
1216 |
|
|
|
1217 |
echo fin_block();
|
|
|
1218 |
}
|
|
|
1219 |
|
|
|
1220 |
|
|
|
1221 |
// Gerer les groupes de traductions
|
|
|
1222 |
if (lire_meta('gerer_trad') == 'oui') {
|
|
|
1223 |
if ($flag_editable AND $supp_trad == 'oui') { // Ne plus lier a un groupe de trad
|
|
|
1224 |
spip_query("UPDATE spip_articles SET id_trad = '0' WHERE id_article = $id_article");
|
|
|
1225 |
|
|
|
1226 |
// Verifier si l'ancien groupe ne comporte plus qu'un seul article. Alors mettre a zero.
|
|
|
1227 |
$result_autres_trad= spip_query("SELECT COUNT(id_article) AS total FROM spip_articles WHERE id_trad = $id_trad");
|
|
|
1228 |
if ($row = spip_fetch_array($result_autres_trad))
|
|
|
1229 |
$nombre_autres_trad = $row["total"];
|
|
|
1230 |
if ($nombre_autres_trad == 1)
|
|
|
1231 |
spip_query("UPDATE spip_articles SET id_trad = '0' WHERE id_trad = $id_trad");
|
|
|
1232 |
|
|
|
1233 |
$id_trad = 0;
|
|
|
1234 |
}
|
|
|
1235 |
|
|
|
1236 |
// Changer article de reference de la trad
|
|
|
1237 |
if ($id_trad_new = intval($id_trad_new)
|
|
|
1238 |
AND $id_trad_old = intval($id_trad_old)
|
|
|
1239 |
AND $connect_statut=='0minirezo'
|
|
|
1240 |
AND $connect_toutes_rubriques) {
|
|
|
1241 |
spip_query("UPDATE spip_articles SET id_trad = $id_trad_new WHERE id_trad = $id_trad_old");
|
|
|
1242 |
$id_trad = $id_trad_new;
|
|
|
1243 |
}
|
|
|
1244 |
|
|
|
1245 |
if ($flag_editable AND $lier_trad > 0) { // Lier a un groupe de trad
|
|
|
1246 |
$query_lier = "SELECT id_trad FROM spip_articles WHERE id_article=$lier_trad";
|
|
|
1247 |
$result_lier = spip_query($query_lier);
|
|
|
1248 |
if ($row = spip_fetch_array($result_lier)) {
|
|
|
1249 |
$id_lier = $row['id_trad'];
|
|
|
1250 |
|
|
|
1251 |
if ($id_lier == 0) { // Si l'article vise n'a pas deja de traduction, creer nouveau id_trad
|
|
|
1252 |
$nouveau_trad = $lier_trad;
|
|
|
1253 |
}
|
|
|
1254 |
else {
|
|
|
1255 |
if ($id_lier == $id_trad) $err = "<div>"._T('trad_deja_traduit')."</div>";
|
|
|
1256 |
$nouveau_trad = $id_lier;
|
|
|
1257 |
}
|
|
|
1258 |
|
|
|
1259 |
spip_query("UPDATE spip_articles SET id_trad = $nouveau_trad WHERE id_article = $lier_trad");
|
|
|
1260 |
if ($id_lier > 0) spip_query("UPDATE spip_articles SET id_trad = $nouveau_trad WHERE id_trad = $id_lier");
|
|
|
1261 |
spip_query("UPDATE spip_articles SET id_trad = $nouveau_trad WHERE id_article = $id_article");
|
|
|
1262 |
if ($id_trad > 0) spip_query("UPDATE spip_articles SET id_trad = $nouveau_trad WHERE id_trad = $id_trad");
|
|
|
1263 |
|
|
|
1264 |
$id_trad = $nouveau_trad;
|
|
|
1265 |
}
|
|
|
1266 |
else
|
|
|
1267 |
$err .= "<div>"._T('trad_article_inexistant')."</div>";
|
|
|
1268 |
|
|
|
1269 |
if ($err) echo "<font color='red' size=2' face='verdana,arial,helvetica,sans-serif'>$err</font>";
|
|
|
1270 |
}
|
|
|
1271 |
|
|
|
1272 |
|
|
|
1273 |
// Afficher la liste des traductions
|
|
|
1274 |
if ($id_trad != 0) {
|
|
|
1275 |
$query_trad = "SELECT id_article, titre, lang, statut FROM spip_articles WHERE id_trad = $id_trad";
|
|
|
1276 |
$result_trad = spip_query($query_trad);
|
|
|
1277 |
|
|
|
1278 |
|
|
|
1279 |
$table='';
|
|
|
1280 |
while ($row = spip_fetch_array($result_trad)) {
|
|
|
1281 |
$vals = '';
|
|
|
1282 |
$id_article_trad = $row["id_article"];
|
|
|
1283 |
$titre_trad = $row["titre"];
|
|
|
1284 |
$lang_trad = $row["lang"];
|
|
|
1285 |
$statut_trad = $row["statut"];
|
|
|
1286 |
|
|
|
1287 |
changer_typo($lang_trad);
|
|
|
1288 |
$titre_trad = "<span $dir_lang>$titre_trad</span>";
|
|
|
1289 |
|
|
|
1290 |
if ($ifond == 1) {
|
|
|
1291 |
$ifond = 0;
|
|
|
1292 |
$bgcolor = "white";
|
|
|
1293 |
} else {
|
|
|
1294 |
$ifond = 1;
|
|
|
1295 |
$bgcolor = $couleur_claire;
|
|
|
1296 |
}
|
|
|
1297 |
|
|
|
1298 |
|
|
|
1299 |
$vals[] = http_img_pack("puce-".puce_statut($statut_trad).'.gif', "", "width='7' height='7' border='0' NAME='statut'");
|
|
|
1300 |
|
|
|
1301 |
if ($id_article_trad == $id_trad) {
|
|
|
1302 |
$vals[] = http_img_pack('langues-12.gif', "", "width='12' height='12' border='0'");
|
|
|
1303 |
$titre_trad = "<b>$titre_trad</b>";
|
|
|
1304 |
} else {
|
|
|
1305 |
if ($connect_statut=='0minirezo'
|
|
|
1306 |
AND $connect_toutes_rubriques)
|
|
|
1307 |
$vals[] = "<a href='articles.php3?id_article=$id_article&id_trad_old=$id_trad&id_trad_new=$id_article_trad'>".
|
|
|
1308 |
http_img_pack('langues-off-12.gif', _T('trad_reference'), "width='12' height='12' border='0'", _T('trad_reference')) . "</a>";
|
|
|
1309 |
else $vals[] = http_img_pack('langues-off-12.gif', "", "width='12' height='12' border='0'");
|
|
|
1310 |
}
|
|
|
1311 |
|
|
|
1312 |
$ret .= "</td>";
|
|
|
1313 |
|
|
|
1314 |
$s = typo($titre_trad);
|
|
|
1315 |
if ($id_article_trad != $id_article)
|
|
|
1316 |
$s = "<a href='articles.php3?id_article=$id_article_trad'>$s</a>";
|
|
|
1317 |
if ($id_article_trad == $id_trad)
|
|
|
1318 |
$s .= " "._T('trad_reference');
|
|
|
1319 |
|
|
|
1320 |
$vals[] = $s;
|
|
|
1321 |
$vals[] = traduire_nom_langue($lang_trad);
|
|
|
1322 |
$table[] = $vals;
|
|
|
1323 |
}
|
|
|
1324 |
|
|
|
1325 |
// changer_typo($spip_lang); (probleme d'affichage rtl?)
|
|
|
1326 |
|
|
|
1327 |
// bloc traductions
|
|
|
1328 |
if (count($vals) > 0) {
|
|
|
1329 |
|
|
|
1330 |
echo "<div class='liste'>";
|
|
|
1331 |
bandeau_titre_boite2(_T('trad_article_traduction'),'');
|
|
|
1332 |
echo "<table width='100%' cellspacing='0' border='0' cellpadding='2'>";
|
|
|
1333 |
//echo "<tr bgcolor='#eeeecc'><td colspan='4' class='serif2'><b>"._T('trad_article_traduction')."</b></td></tr>";
|
|
|
1334 |
|
|
|
1335 |
$largeurs = array(7, 12, '', 100);
|
|
|
1336 |
$styles = array('', '', 'arial2', 'arial2');
|
|
|
1337 |
afficher_liste($largeurs, $table, $styles);
|
|
|
1338 |
|
|
|
1339 |
echo "</table>";
|
|
|
1340 |
echo "</div>";
|
|
|
1341 |
|
|
|
1342 |
}
|
|
|
1343 |
|
|
|
1344 |
changer_typo($langue_article);
|
|
|
1345 |
}
|
|
|
1346 |
|
|
|
1347 |
echo debut_block_invisible('lier_traductions');
|
|
|
1348 |
|
|
|
1349 |
echo "<table width='100%'><tr>";
|
|
|
1350 |
if ($flag_editable AND $options == "avancees" AND !$ret) {
|
|
|
1351 |
// Formulaire pour lier a un article
|
|
|
1352 |
echo "<td class='arial2' width='60%'>";
|
|
|
1353 |
$lien = $GLOBALS['clean_link'];
|
|
|
1354 |
$lien->delVar($nom_select);
|
|
|
1355 |
$lien = $lien->getUrl();
|
|
|
1356 |
|
|
|
1357 |
echo "<form action='$lien' method='post' style='margin:0px; padding:0px;'>";
|
|
|
1358 |
echo _T('trad_lier');
|
|
|
1359 |
echo "<div align='$spip_lang_right'><input type='text' class='fondl' name='lier_trad' size='5'> <INPUT TYPE='submit' NAME='Valider' VALUE='"._T('bouton_valider')."' CLASS='fondl'></div>";
|
|
|
1360 |
echo "</form>";
|
|
|
1361 |
echo "</td>\n";
|
|
|
1362 |
echo "<td background='' width='10'> </td>";
|
|
|
1363 |
echo "<td background='" . _DIR_IMG_PACK . "tirets-separation.gif' width='2'>". http_img_pack('rien.gif', " ", "width='2' height='2'") . "</td>";
|
|
|
1364 |
echo "<td background='' width='10'> </td>";
|
|
|
1365 |
}
|
|
|
1366 |
echo "<td>";
|
|
|
1367 |
icone_horizontale(_T('trad_new'), "articles_edit.php3?new=oui&lier_trad=$id_article&id_rubrique=$id_rubrique", "traductions-24.gif", "creer.gif");
|
|
|
1368 |
echo "</td>";
|
|
|
1369 |
if ($flag_editable AND $options == "avancees" AND $ret) {
|
|
|
1370 |
echo "<td background='' width='10'> </td>";
|
|
|
1371 |
echo "<td background='" . _DIR_IMG_PACK . "tirets-separation.gif' width='2'>". http_img_pack('rien.gif', " ", "width='2' height='2'") . "</td>";
|
|
|
1372 |
echo "<td background='' width='10'> </td>";
|
|
|
1373 |
echo "<td>";
|
|
|
1374 |
icone_horizontale(_T('trad_delier'), "articles.php3?id_article=$id_article&supp_trad=oui", "traductions-24.gif", "supprimer.gif");
|
|
|
1375 |
echo "</td>\n";
|
|
|
1376 |
}
|
|
|
1377 |
|
|
|
1378 |
echo "</tr></table>";
|
|
|
1379 |
|
|
|
1380 |
echo fin_block();
|
|
|
1381 |
}
|
|
|
1382 |
|
|
|
1383 |
fin_cadre_enfonce();
|
|
|
1384 |
}
|
|
|
1385 |
|
|
|
1386 |
|
|
|
1387 |
|
|
|
1388 |
//////////////////////////////////////////////////////
|
|
|
1389 |
// Modifier le statut de l'article
|
|
|
1390 |
//
|
|
|
1391 |
|
|
|
1392 |
|
|
|
1393 |
?>
|
|
|
1394 |
<script type='text/javascript'>
|
|
|
1395 |
<!--
|
|
|
1396 |
function puce_statut(selection){
|
|
|
1397 |
if (selection=="publie"){
|
|
|
1398 |
return "puce-verte.gif";
|
|
|
1399 |
}
|
|
|
1400 |
if (selection=="prepa"){
|
|
|
1401 |
return "puce-blanche.gif";
|
|
|
1402 |
}
|
|
|
1403 |
if (selection=="prop"){
|
|
|
1404 |
return "puce-orange.gif";
|
|
|
1405 |
}
|
|
|
1406 |
if (selection=="refuse"){
|
|
|
1407 |
return "puce-rouge.gif";
|
|
|
1408 |
}
|
|
|
1409 |
if (selection=="poubelle"){
|
|
|
1410 |
return "puce-poubelle.gif";
|
|
|
1411 |
}
|
|
|
1412 |
}
|
|
|
1413 |
// -->
|
|
|
1414 |
</script>
|
|
|
1415 |
<?php
|
|
|
1416 |
|
|
|
1417 |
if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article)) {
|
|
|
1418 |
echo "<FORM ACTION='articles.php3' METHOD='get'>";
|
|
|
1419 |
debut_cadre_relief("racine-site-24.gif");
|
|
|
1420 |
echo "<CENTER>";
|
|
|
1421 |
|
|
|
1422 |
echo "<INPUT TYPE='Hidden' NAME='id_article' VALUE=\"$id_article\">";
|
|
|
1423 |
|
|
|
1424 |
echo "<B>"._T('texte_article_statut')."</B> ";
|
|
|
1425 |
|
|
|
1426 |
// $statut_url_javascript="\"articles.php3?id_article=$id_article&methode=image&alea=\"+Math.random()+\"&statut_nouv=\"+options[selectedIndex].value";
|
|
|
1427 |
$statut_url_javascript="'" . _DIR_IMG_PACK . "' + puce_statut(options[selectedIndex].value);";
|
|
|
1428 |
echo "<SELECT NAME='statut_nouv' SIZE='1' CLASS='fondl' onChange=\"document.statut.src=$statut_url_javascript; setvisibility('valider_statut', 'visible');\">";
|
|
|
1429 |
echo "<OPTION" . mySel("prepa", $statut_article) ." style='background-color: white'>"._T('texte_statut_en_cours_redaction')."\n";
|
|
|
1430 |
echo "<OPTION" . mySel("prop", $statut_article) . " style='background-color: #FFF1C6'>"._T('texte_statut_propose_evaluation')."\n";
|
|
|
1431 |
echo "<OPTION" . mySel("publie", $statut_article) . " style='background-color: #B4E8C5'>"._T('texte_statut_publie')."\n";
|
|
|
1432 |
echo "<OPTION" . mySel("poubelle", $statut_article)
|
|
|
1433 |
. http_style_background('rayures-sup.gif') . '>' ._T('texte_statut_poubelle')."\n";
|
|
|
1434 |
echo "<OPTION" . mySel("refuse", $statut_article) . " style='background-color: #FFA4A4'>"._T('texte_statut_refuse')."\n";
|
|
|
1435 |
echo "</SELECT>";
|
|
|
1436 |
|
|
|
1437 |
echo " ". http_img_pack("puce-".puce_statut($statut_article).'.gif', "", "border='0' NAME='statut'") . " ";
|
|
|
1438 |
|
|
|
1439 |
// echo "<noscript><INPUT TYPE='submit' NAME='Valider' VALUE='"._T('bouton_valider')."' CLASS='fondo'></noscript>";
|
|
|
1440 |
echo "<span class='visible_au_chargement' id='valider_statut'>";
|
|
|
1441 |
echo "<INPUT TYPE='submit' NAME='Valider' VALUE='"._T('bouton_valider')."' CLASS='fondo'>";
|
|
|
1442 |
echo "</span>";
|
|
|
1443 |
echo aide ("artstatut");
|
|
|
1444 |
echo "</CENTER>";
|
|
|
1445 |
fin_cadre_relief();
|
|
|
1446 |
echo "</FORM>";
|
|
|
1447 |
}
|
|
|
1448 |
|
|
|
1449 |
|
|
|
1450 |
|
|
|
1451 |
//////////////////////////////////////////////////////
|
|
|
1452 |
// Corps de l'article
|
|
|
1453 |
//
|
|
|
1454 |
|
|
|
1455 |
echo "\n\n<div align='justify' style='padding: 10px;'>";
|
|
|
1456 |
|
|
|
1457 |
if ($virtuel) {
|
|
|
1458 |
debut_boite_info();
|
|
|
1459 |
echo _T('info_renvoi_article')." ".propre("<center>[->$virtuel]</center>");
|
|
|
1460 |
fin_boite_info();
|
|
|
1461 |
}
|
|
|
1462 |
else {
|
|
|
1463 |
$revision_nbsp = $activer_revision_nbsp;
|
|
|
1464 |
|
|
|
1465 |
if (strlen($chapo) > 0) {
|
|
|
1466 |
echo "<div $dir_lang style='font-size: small;'><b>";
|
|
|
1467 |
echo propre($chapo);
|
|
|
1468 |
echo "</b></div>\n\n";
|
|
|
1469 |
}
|
|
|
1470 |
|
|
|
1471 |
echo "<div $dir_lang style='font-size: small;'>";
|
|
|
1472 |
# echo reduire_image(propre($texte), 500,10000);
|
|
|
1473 |
echo propre($texte);
|
|
|
1474 |
echo "<br clear='both' />";
|
|
|
1475 |
echo "</div>";
|
|
|
1476 |
|
|
|
1477 |
if ($ps) {
|
|
|
1478 |
echo debut_cadre_enfonce();
|
|
|
1479 |
echo "<div $dir_lang><font size=2 face='Verdana,Arial,Sans,sans-serif'>";
|
|
|
1480 |
echo justifier("<b>"._T('info_ps')."</b> ".propre($ps));
|
|
|
1481 |
echo "</font></div>";
|
|
|
1482 |
echo fin_cadre_enfonce();
|
|
|
1483 |
}
|
|
|
1484 |
$revision_nbsp = false;
|
|
|
1485 |
|
|
|
1486 |
if ($les_notes) {
|
|
|
1487 |
echo debut_cadre_relief();
|
|
|
1488 |
echo "<div $dir_lang class='arial11'>";
|
|
|
1489 |
echo justifier("<b>"._T('info_notes')." :</b> ".$les_notes);
|
|
|
1490 |
echo "</div>";
|
|
|
1491 |
echo fin_cadre_relief();
|
|
|
1492 |
}
|
|
|
1493 |
|
|
|
1494 |
if ($champs_extra AND $extra) {
|
|
|
1495 |
include_ecrire("inc_extra.php3");
|
|
|
1496 |
extra_affichage($extra, "articles");
|
|
|
1497 |
}
|
|
|
1498 |
}
|
|
|
1499 |
|
|
|
1500 |
//
|
|
|
1501 |
// Bouton "modifier cet article"
|
|
|
1502 |
//
|
|
|
1503 |
|
|
|
1504 |
if ($flag_editable) {
|
|
|
1505 |
echo "\n\n<div align='$spip_lang_right'><br>";
|
|
|
1506 |
|
|
|
1507 |
if ($date_diff >= 0 AND $date_diff < 60 AND $auteur_modif > 0 AND $auteur_modif != $connect_id_auteur) {
|
|
|
1508 |
$query_auteur = "SELECT * FROM spip_auteurs WHERE id_auteur='$auteur_modif'";
|
|
|
1509 |
$result_auteur = spip_query($query_auteur);
|
|
|
1510 |
while ($row_auteur = spip_fetch_array($result_auteur)) {
|
|
|
1511 |
$nom_auteur_modif = typo($row_auteur["nom"]);
|
|
|
1512 |
}
|
|
|
1513 |
icone(_T('icone_modifier_article'), "articles_edit.php3?id_article=$id_article", "warning-24.gif", "");
|
|
|
1514 |
echo "<font face='arial,helvetica,sans-serif' size=1>"._T('texte_travail_article', array('nom_auteur_modif' => $nom_auteur_modif, 'date_diff' => $date_diff))."</font>";
|
|
|
1515 |
echo aide("artmodif");
|
|
|
1516 |
}
|
|
|
1517 |
else {
|
|
|
1518 |
icone(_T('icone_modifier_article'), "articles_edit.php3?id_article=$id_article", "article-24.gif", "edit.gif");
|
|
|
1519 |
}
|
|
|
1520 |
|
|
|
1521 |
echo "</div>";
|
|
|
1522 |
}
|
|
|
1523 |
|
|
|
1524 |
|
|
|
1525 |
|
|
|
1526 |
|
|
|
1527 |
|
|
|
1528 |
//
|
|
|
1529 |
// Documents associes a l'article
|
|
|
1530 |
//
|
|
|
1531 |
|
|
|
1532 |
if ($spip_display != 4) afficher_documents_non_inclus($id_article, "article", $flag_editable);
|
|
|
1533 |
|
|
|
1534 |
//
|
|
|
1535 |
// "Demander la publication"
|
|
|
1536 |
//
|
|
|
1537 |
|
|
|
1538 |
if ($flag_auteur AND $statut_article == 'prepa') {
|
|
|
1539 |
echo "<P>";
|
|
|
1540 |
debut_cadre_relief();
|
|
|
1541 |
echo "<center>";
|
|
|
1542 |
echo "<B>"._T('texte_proposer_publication')."</B>";
|
|
|
1543 |
echo aide ("artprop");
|
|
|
1544 |
bouton(_T('bouton_demande_publication'), "articles.php3?id_article=$id_article&statut_nouv=prop");
|
|
|
1545 |
echo "</center>";
|
|
|
1546 |
fin_cadre_relief();
|
|
|
1547 |
}
|
|
|
1548 |
|
|
|
1549 |
echo "</div>";
|
|
|
1550 |
|
|
|
1551 |
echo "</div>";
|
|
|
1552 |
fin_cadre_relief();
|
|
|
1553 |
|
|
|
1554 |
//
|
|
|
1555 |
// Forums
|
|
|
1556 |
//
|
|
|
1557 |
|
|
|
1558 |
echo "<BR><BR>";
|
|
|
1559 |
|
|
|
1560 |
$forum_retour = urlencode("articles.php3?id_article=$id_article");
|
|
|
1561 |
|
|
|
1562 |
|
|
|
1563 |
echo "\n<div align='center'>";
|
|
|
1564 |
icone(_T('icone_poster_message'), "forum_envoi.php3?statut=prive&adresse_retour=".$forum_retour."&id_article=$id_article&titre_message=".urlencode($titre), "forum-interne-24.gif", "creer.gif");
|
|
|
1565 |
echo "</div>";
|
|
|
1566 |
|
|
|
1567 |
echo "<P align='$spip_lang_left'>";
|
|
|
1568 |
|
|
|
1569 |
|
|
|
1570 |
$query_forum = "SELECT COUNT(*) AS cnt FROM spip_forum WHERE statut='prive' AND id_article='$id_article' AND id_parent=0";
|
|
|
1571 |
$result_forum = spip_query($query_forum);
|
|
|
1572 |
$total = 0;
|
|
|
1573 |
if ($row = spip_fetch_array($result_forum)) $total = $row["cnt"];
|
|
|
1574 |
|
|
|
1575 |
if (!$debut) $debut = 0;
|
|
|
1576 |
$total_afficher = 8;
|
|
|
1577 |
if ($total > $total_afficher) {
|
|
|
1578 |
echo "<div class='serif2' align='center'>";
|
|
|
1579 |
for ($i = 0; $i < $total; $i = $i + $total_afficher){
|
|
|
1580 |
$y = $i + $total_afficher - 1;
|
|
|
1581 |
if ($i == $debut)
|
|
|
1582 |
echo "<FONT SIZE=3><B>[$i-$y]</B></FONT> ";
|
|
|
1583 |
else
|
|
|
1584 |
echo "[<A HREF='articles.php3?id_article=$id_article&debut=$i'>$i-$y</A>] ";
|
|
|
1585 |
}
|
|
|
1586 |
echo "</div>";
|
|
|
1587 |
}
|
|
|
1588 |
|
|
|
1589 |
|
|
|
1590 |
|
|
|
1591 |
$query_forum = "SELECT * FROM spip_forum WHERE statut='prive' AND id_article='$id_article' AND id_parent=0 ORDER BY date_heure DESC LIMIT $debut,$total_afficher";
|
|
|
1592 |
$result_forum = spip_query($query_forum);
|
|
|
1593 |
afficher_forum($result_forum, $forum_retour);
|
|
|
1594 |
|
|
|
1595 |
|
|
|
1596 |
if (!$debut) $debut = 0;
|
|
|
1597 |
$total_afficher = 8;
|
|
|
1598 |
if ($total > $total_afficher) {
|
|
|
1599 |
echo "<div class='serif2' align='center'>";
|
|
|
1600 |
for ($i = 0; $i < $total; $i = $i + $total_afficher){
|
|
|
1601 |
$y = $i + $total_afficher - 1;
|
|
|
1602 |
if ($i == $debut)
|
|
|
1603 |
echo "<FONT SIZE=3><B>[$i-$y]</B></FONT> ";
|
|
|
1604 |
else
|
|
|
1605 |
echo "[<A HREF='articles.php3?id_article=$id_article&debut=$i'>$i-$y</A>] ";
|
|
|
1606 |
}
|
|
|
1607 |
echo "</div>";
|
|
|
1608 |
}
|
|
|
1609 |
|
|
|
1610 |
|
|
|
1611 |
echo "</div>\n";
|
|
|
1612 |
|
|
|
1613 |
fin_page();
|
|
|
1614 |
|
|
|
1615 |
// Taches lentes
|
|
|
1616 |
if ($ok_nouveau_statut) {
|
|
|
1617 |
@flush();
|
|
|
1618 |
calculer_rubriques();
|
|
|
1619 |
if ($statut_nouv == 'publie' AND $statut_ancien != $statut_nouv) {
|
|
|
1620 |
include_ecrire("inc_mail.php3");
|
|
|
1621 |
envoyer_mail_publication($id_article);
|
|
|
1622 |
}
|
|
|
1623 |
if ($statut_nouv == "prop" AND $statut_ancien != $statut_nouv AND $statut_ancien != 'publie') {
|
|
|
1624 |
include_ecrire("inc_mail.php3");
|
|
|
1625 |
envoyer_mail_proposition($id_article);
|
|
|
1626 |
}
|
|
|
1627 |
}
|
|
|
1628 |
|
|
|
1629 |
?>
|
|
|
1630 |
|