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 |
include_ecrire ("inc_config.php3");
|
|
|
17 |
|
|
|
18 |
if ($connect_statut != '0minirezo' OR !$connect_toutes_rubriques) {
|
|
|
19 |
echo _T('avis_non_acces_page');
|
|
|
20 |
fin_page();
|
|
|
21 |
exit;
|
|
|
22 |
}
|
|
|
23 |
|
|
|
24 |
init_config();
|
|
|
25 |
if ($changer_config == 'oui') {
|
|
|
26 |
appliquer_modifs_config();
|
|
|
27 |
}
|
|
|
28 |
|
|
|
29 |
lire_metas();
|
|
|
30 |
|
|
|
31 |
debut_page(_T('titre_page_config_contenu'), "administration", "configuration");
|
|
|
32 |
|
|
|
33 |
echo "<br><br><br>";
|
|
|
34 |
gros_titre(_T('titre_page_config_contenu'));
|
|
|
35 |
barre_onglets("configuration", "interactivite");
|
|
|
36 |
|
|
|
37 |
|
|
|
38 |
debut_gauche();
|
|
|
39 |
|
|
|
40 |
debut_droite();
|
|
|
41 |
|
|
|
42 |
echo "<form action='config-contenu.php3' method='post'>";
|
|
|
43 |
echo "<input type='hidden' name='changer_config' value='oui'>";
|
|
|
44 |
|
|
|
45 |
|
|
|
46 |
|
|
|
47 |
//
|
|
|
48 |
// Mode de fonctionnement des forums publics
|
|
|
49 |
//
|
|
|
50 |
debut_cadre_trait_couleur("forum-interne-24.gif", false, "", _T('info_mode_fonctionnement_defaut_forum_public').aide ("confforums"));
|
|
|
51 |
|
|
|
52 |
$forums_publics=lire_meta("forums_publics");
|
|
|
53 |
|
|
|
54 |
echo "<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3 WIDTH=\"100%\">";
|
|
|
55 |
echo "<TR><TD BACKGROUND='" . _DIR_IMG_PACK . "rien.gif' ALIGN='$spip_lang_left' class='verdana2'>";
|
|
|
56 |
|
|
|
57 |
|
|
|
58 |
if ($forums_publics == "non") $block = "'none', 'block'";
|
|
|
59 |
else $block= "'block', 'none'";
|
|
|
60 |
echo bouton_radio("forums_publics", "non", _T('info_desactiver_forum_public'), $forums_publics == "non", "changeVisible(this.checked, 'config-options', $block);");
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
echo "</TD></TR>";
|
|
|
64 |
|
|
|
65 |
echo "<TR><TD BACKGROUND='" . _DIR_IMG_PACK . "rien.gif' class='verdana2'>";
|
|
|
66 |
echo _T('info_activer_forum_public');
|
|
|
67 |
echo "</TD></TR>";
|
|
|
68 |
|
|
|
69 |
echo "<TR><TD BACKGROUND='" . _DIR_IMG_PACK . "rien.gif' ALIGN='$spip_lang_left' class='verdana2'>";
|
|
|
70 |
|
|
|
71 |
|
|
|
72 |
if ($forums_publics == "posteriori") $block = "'none', 'block'";
|
|
|
73 |
else $block= "'block', 'none'";
|
|
|
74 |
echo bouton_radio("forums_publics", "posteriori", _T('bouton_radio_publication_immediate'), $forums_publics == "posteriori", "changeVisible(this.checked, 'config-options', $block);");
|
|
|
75 |
echo "<br />";
|
|
|
76 |
if ($forums_publics == "priori") $block = "'none', 'block'";
|
|
|
77 |
else $block= "'block', 'none'";
|
|
|
78 |
echo bouton_radio("forums_publics", "priori", _T('bouton_radio_moderation_priori'), $forums_publics == "priori", "changeVisible(this.checked, 'config-options', $block);");
|
|
|
79 |
|
|
|
80 |
if (tester_mail()) {
|
|
|
81 |
echo "<br />";
|
|
|
82 |
if ($forums_publics == "abo") $block = "'none', 'block'";
|
|
|
83 |
else $block= "'block', 'none'";
|
|
|
84 |
echo bouton_radio("forums_publics", "abo", _T('bouton_radio_enregistrement_obligatoire'), $forums_publics == "abo", "changeVisible(this.checked, 'config-options', $block);");
|
|
|
85 |
}
|
|
|
86 |
|
|
|
87 |
echo "</TD></TR>\n";
|
|
|
88 |
|
|
|
89 |
echo "<TR><TD BACKGROUND='" . _DIR_IMG_PACK . "rien.gif' ALIGN='$spip_lang_left' class='verdana2'>";
|
|
|
90 |
|
|
|
91 |
if ($options == 'avancees') {
|
|
|
92 |
echo "<div id='config-options' class='display_au_chargement'>";
|
|
|
93 |
echo "<ul>";
|
|
|
94 |
|
|
|
95 |
debut_cadre_relief("", false, "", _T('info_options_avancees'));
|
|
|
96 |
|
|
|
97 |
echo "<table width='100%' cellpadding='2' border='0' class='hauteur'>\n";
|
|
|
98 |
echo "<tr><td class='verdana2'>";
|
|
|
99 |
echo _T('info_appliquer_choix_moderation')."<br>";
|
|
|
100 |
|
|
|
101 |
echo "<INPUT TYPE='radio' CHECKED NAME='forums_publics_appliquer' VALUE='futur' id='forums_appliquer_futur'>";
|
|
|
102 |
echo " <b><label for='forums_appliquer_futur'>"._T('bouton_radio_articles_futurs')."</label></b><br>";
|
|
|
103 |
echo "<INPUT TYPE='radio' NAME='forums_publics_appliquer' VALUE='saufnon' id='forums_appliquer_saufnon'>";
|
|
|
104 |
echo " <label for='forums_appliquer_saufnon'>"._T('bouton_radio_articles_tous_sauf_forum_desactive')."</label><br>";
|
|
|
105 |
echo "<INPUT TYPE='radio' NAME='forums_publics_appliquer' VALUE='tous' id='forums_appliquer_tous'>";
|
|
|
106 |
echo " <label for='forums_appliquer_tous'>"._T('bouton_radio_articles_tous')."</label><br>";
|
|
|
107 |
echo "</TD></TR></table>";
|
|
|
108 |
fin_cadre_relief();
|
|
|
109 |
echo "</ul>\n";
|
|
|
110 |
|
|
|
111 |
echo "</div>";
|
|
|
112 |
}
|
|
|
113 |
else {
|
|
|
114 |
echo "<input type='hidden' name='forums_publics_appliquer' value='tous'>";
|
|
|
115 |
}
|
|
|
116 |
|
|
|
117 |
|
|
|
118 |
echo "<TR><td style='text-align:$spip_lang_right;'>";
|
|
|
119 |
echo "<INPUT TYPE='submit' NAME='Valider' VALUE='"._T('bouton_valider')."' CLASS='fondo'>";
|
|
|
120 |
echo "</TD></TR>";
|
|
|
121 |
echo "</TABLE>\n";
|
|
|
122 |
|
|
|
123 |
fin_cadre_trait_couleur();
|
|
|
124 |
|
|
|
125 |
echo "<p>";
|
|
|
126 |
|
|
|
127 |
|
|
|
128 |
|
|
|
129 |
//
|
|
|
130 |
// Accepter les inscriptions de redacteurs depuis le site public
|
|
|
131 |
//
|
|
|
132 |
|
|
|
133 |
if ($options == "avancees") {
|
|
|
134 |
debut_cadre_trait_couleur("redacteurs-24.gif", false, "", _T('info_inscription_automatique'));
|
|
|
135 |
|
|
|
136 |
$accepter_inscriptions=lire_meta("accepter_inscriptions");
|
|
|
137 |
echo "<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3 WIDTH=\"100%\">";
|
|
|
138 |
|
|
|
139 |
echo "<TR><TD BACKGROUND='" . _DIR_IMG_PACK . "rien.gif' class='verdana2'>";
|
|
|
140 |
echo _T('info_question_inscription_nouveaux_redacteurs')."</i></blockquote>";
|
|
|
141 |
echo "</TD></TR>";
|
|
|
142 |
|
|
|
143 |
|
|
|
144 |
echo "<TR><TD BACKGROUND='" . _DIR_IMG_PACK . "rien.gif' ALIGN='center' class='verdana2'>";
|
|
|
145 |
afficher_choix('accepter_inscriptions', $accepter_inscriptions,
|
|
|
146 |
array('oui' => _T('item_accepter_inscriptions'),
|
|
|
147 |
'non' => _T('item_non_accepter_inscriptions')), " ");
|
|
|
148 |
|
|
|
149 |
// Cas tres specifique : si on n'accepte pas les inscriptions,
|
|
|
150 |
// ET si on n'a pas de forums sur abonnement, on peut vouloir
|
|
|
151 |
// tout de meme ouvrir les inscriptions aux *visiteurs*
|
|
|
152 |
if ($accepter_inscriptions == 'non') {
|
|
|
153 |
$accepter_visiteurs = lire_meta('accepter_visiteurs');
|
|
|
154 |
echo "<br /><br />\n";
|
|
|
155 |
debut_cadre_relief("", false, "",
|
|
|
156 |
bouton_block_invisible("accepter_visiteurs") . ' ' .
|
|
|
157 |
_T('info_visiteurs'));
|
|
|
158 |
echo debut_block_invisible("accepter_visiteurs");
|
|
|
159 |
echo "<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3 WIDTH=\"100%\">";
|
|
|
160 |
echo "<TR><TD BACKGROUND='" . _DIR_IMG_PACK . "rien.gif' class='verdana2'>";
|
|
|
161 |
|
|
|
162 |
if ($forums_publics<>'abo'
|
|
|
163 |
AND !spip_num_rows(spip_query("SELECT id_article
|
|
|
164 |
FROM spip_articles WHERE accepter_forum='abo'"))) {
|
|
|
165 |
echo _T('info_question_accepter_visiteurs');
|
|
|
166 |
echo "</TD></TR>";
|
|
|
167 |
echo "<TR><TD BACKGROUND='" . _DIR_IMG_PACK . "rien.gif' ALIGN='$spip_lang_left' class='verdana2'>";
|
|
|
168 |
afficher_choix('accepter_visiteurs', $accepter_visiteurs,
|
|
|
169 |
array('oui' => _T('info_option_accepter_visiteurs'),
|
|
|
170 |
'non' => _T('info_option_ne_pas_accepter_visiteurs')));
|
|
|
171 |
} else {
|
|
|
172 |
echo _T('info_forums_abo_invites');
|
|
|
173 |
}
|
|
|
174 |
|
|
|
175 |
echo "</TD></TR></table>\n";
|
|
|
176 |
echo fin_block();
|
|
|
177 |
fin_cadre_relief();
|
|
|
178 |
} else {
|
|
|
179 |
|
|
|
180 |
}
|
|
|
181 |
|
|
|
182 |
echo "</TD></TR>\n";
|
|
|
183 |
echo "<TR><td style='text-align:$spip_lang_right;'>";
|
|
|
184 |
echo "<INPUT TYPE='submit' NAME='Valider' VALUE='"._T('bouton_valider')."' CLASS='fondo'>";
|
|
|
185 |
echo "</TD></TR>";
|
|
|
186 |
echo "</TABLE>\n";
|
|
|
187 |
|
|
|
188 |
fin_cadre_trait_couleur();
|
|
|
189 |
echo "<p>";
|
|
|
190 |
}
|
|
|
191 |
|
|
|
192 |
|
|
|
193 |
//
|
|
|
194 |
// Activer/desactiver mails automatiques
|
|
|
195 |
//
|
|
|
196 |
if (tester_mail()) {
|
|
|
197 |
debut_cadre_trait_couleur("", false, "", _T('info_envoi_email_automatique').aide ("confmails"));
|
|
|
198 |
|
|
|
199 |
$prevenir_auteurs=lire_meta("prevenir_auteurs");
|
|
|
200 |
|
|
|
201 |
|
|
|
202 |
echo "<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3 WIDTH=\"100%\">";
|
|
|
203 |
echo "<TR><TD BACKGROUND='" . _DIR_IMG_PACK . "rien.gif' class='verdana2'>";
|
|
|
204 |
echo "<blockquote><i>"._T('info_hebergeur_desactiver_envoi_email')."</i></blockquote>";
|
|
|
205 |
echo "</TD></TR></table>";
|
|
|
206 |
|
|
|
207 |
debut_cadre_relief("", false, "", _T('info_envoi_forum'));
|
|
|
208 |
echo "<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3 WIDTH=\"100%\">";
|
|
|
209 |
echo "<TR><TD BACKGROUND='" . _DIR_IMG_PACK . "rien.gif' class='verdana2'>";
|
|
|
210 |
echo _T('info_option_email');
|
|
|
211 |
echo "</TD></TR>";
|
|
|
212 |
|
|
|
213 |
echo "<TR><TD BACKGROUND='" . _DIR_IMG_PACK . "rien.gif' ALIGN='$spip_lang_left' class='verdana2'>";
|
|
|
214 |
afficher_choix('prevenir_auteurs', $prevenir_auteurs,
|
|
|
215 |
array('oui' => _T('info_option_faire_suivre'),
|
|
|
216 |
'non' => _T('info_option_ne_pas_faire_suivre')));
|
|
|
217 |
echo "</TD></TR></table>\n";
|
|
|
218 |
fin_cadre_relief();
|
|
|
219 |
|
|
|
220 |
//
|
|
|
221 |
// Suivi editorial (articles proposes & publies)
|
|
|
222 |
//
|
|
|
223 |
|
|
|
224 |
$suivi_edito=lire_meta("suivi_edito");
|
|
|
225 |
$adresse_suivi=lire_meta("adresse_suivi");
|
|
|
226 |
$adresse_suivi_inscription=lire_meta("adresse_suivi_inscription");
|
|
|
227 |
|
|
|
228 |
echo "<p />";
|
|
|
229 |
debut_cadre_relief("", false, "", _T('info_suivi_activite'));
|
|
|
230 |
echo "<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3 WIDTH=\"100%\">";
|
|
|
231 |
|
|
|
232 |
echo "<TR><TD BACKGROUND='" . _DIR_IMG_PACK . "rien.gif' class='verdana2'>";
|
|
|
233 |
echo _T('info_facilite_suivi_activite')."</FONT>";
|
|
|
234 |
echo "</TD></TR></table>";
|
|
|
235 |
|
|
|
236 |
|
|
|
237 |
echo "<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3 WIDTH=\"100%\">";
|
|
|
238 |
echo "<TR><TD BACKGROUND='" . _DIR_IMG_PACK . "rien.gif' ALIGN='$spip_lang_left' class='verdana2'>";
|
|
|
239 |
|
|
|
240 |
echo bouton_radio("suivi_edito", "oui", _T('bouton_radio_envoi_annonces_adresse'), $suivi_edito == "oui", "changeVisible(this.checked, 'config-edito', 'block', 'none');");
|
|
|
241 |
|
|
|
242 |
|
|
|
243 |
if ($suivi_edito == "oui") $style = "display: block;";
|
|
|
244 |
else $style = "display: none;";
|
|
|
245 |
echo "<div id='config-edito' style='$style'>";
|
|
|
246 |
echo "<div style='text-align: center;'><input type='text' name='adresse_suivi' value='$adresse_suivi' size='30' CLASS='fondl'></div>";
|
|
|
247 |
echo "<blockquote class='spip'>";
|
|
|
248 |
if (!$adresse_suivi) $adresse_suivi = "mailing@monsite.net";
|
|
|
249 |
echo _T('info_config_suivi', array('adresse_suivi' => $adresse_suivi));
|
|
|
250 |
echo "<br><input type='text' name='adresse_suivi_inscription' value='$adresse_suivi_inscription' size='50' CLASS='fondl'>";
|
|
|
251 |
echo "</blockquote>";
|
|
|
252 |
echo "</div>";
|
|
|
253 |
|
|
|
254 |
echo "<br />";
|
|
|
255 |
echo bouton_radio("suivi_edito", "non", _T('bouton_radio_non_envoi_annonces_editoriales'), $suivi_edito == "non", "changeVisible(this.checked, 'config-edito', 'none', 'block');");
|
|
|
256 |
|
|
|
257 |
echo "</TD></TR></table>\n";
|
|
|
258 |
fin_cadre_relief();
|
|
|
259 |
|
|
|
260 |
//
|
|
|
261 |
// Annonce des nouveautes
|
|
|
262 |
//
|
|
|
263 |
$quoi_de_neuf=lire_meta("quoi_de_neuf");
|
|
|
264 |
$adresse_neuf=lire_meta("adresse_neuf");
|
|
|
265 |
$jours_neuf=lire_meta("jours_neuf");
|
|
|
266 |
|
|
|
267 |
// provoquer l'envoi des nouveautes en supprimant le fichier lock
|
|
|
268 |
if ($envoi_now)
|
|
|
269 |
@unlink(_DIR_SESSIONS . 'mail.lock');
|
|
|
270 |
|
|
|
271 |
echo "<p />";
|
|
|
272 |
debut_cadre_relief("", false, "", _T('info_annonce_nouveautes'));
|
|
|
273 |
echo "<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3 WIDTH=\"100%\">";
|
|
|
274 |
|
|
|
275 |
echo "<TR><TD BACKGROUND='" . _DIR_IMG_PACK . "rien.gif' class='verdana2'>";
|
|
|
276 |
echo _T('info_non_envoi_annonce_dernieres_nouveautes');
|
|
|
277 |
echo "</TD></TR>";
|
|
|
278 |
|
|
|
279 |
echo "<TR><TD BACKGROUND='" . _DIR_IMG_PACK . "rien.gif' ALIGN='$spip_lang_left' class='verdana2'>";
|
|
|
280 |
|
|
|
281 |
echo bouton_radio("quoi_de_neuf", "oui", _T('bouton_radio_envoi_liste_nouveautes'), $quoi_de_neuf == "oui", "changeVisible(this.checked, 'config-neuf', 'block', 'none');");
|
|
|
282 |
// echo "<INPUT TYPE='radio' NAME='quoi_de_neuf' VALUE='oui' id='quoi_de_neuf_on' CHECKED>";
|
|
|
283 |
// echo " <B><label for='quoi_de_neuf_on'>"._T('bouton_radio_envoi_liste_nouveautes')."</label></B> ";
|
|
|
284 |
|
|
|
285 |
if ($quoi_de_neuf == "oui") $style = "display: block;";
|
|
|
286 |
else $style = "display: none;";
|
|
|
287 |
echo "<div id='config-neuf' style='$style'>";
|
|
|
288 |
echo "<UL>";
|
|
|
289 |
echo "<LI>"._T('info_adresse')." <input type='text' name='adresse_neuf' value='$adresse_neuf' size='30' CLASS='fondl'>";
|
|
|
290 |
echo "<LI>"._T('info_tous_les')." <input type='text' name='jours_neuf' value='$jours_neuf' size='4' CLASS='fondl'> "._T('info_jours');
|
|
|
291 |
echo " <INPUT TYPE='submit' NAME='envoi_now' VALUE='"._T('info_envoyer_maintenant')."' CLASS='fondl'>";
|
|
|
292 |
echo "</UL>";
|
|
|
293 |
echo "</div>";
|
|
|
294 |
|
|
|
295 |
echo "<br />";
|
|
|
296 |
echo bouton_radio("quoi_de_neuf", "non", _T('info_non_envoi_liste_nouveautes'), $quoi_de_neuf == "non", "changeVisible(this.checked, 'config-neuf', 'none', 'block');");
|
|
|
297 |
//echo "<BR><INPUT TYPE='radio' NAME='quoi_de_neuf' VALUE='non' id='quoi_de_neuf_off'>";
|
|
|
298 |
//echo " <label for='quoi_de_neuf_off'>"._T('info_non_envoi_liste_nouveautes')."</label> ";
|
|
|
299 |
|
|
|
300 |
|
|
|
301 |
|
|
|
302 |
echo "</TD></TR></table>\n";
|
|
|
303 |
fin_cadre_relief();
|
|
|
304 |
|
|
|
305 |
if($options == "avancees") {
|
|
|
306 |
$email_envoi = entites_html(lire_meta("email_envoi"));
|
|
|
307 |
echo "<p />";
|
|
|
308 |
debut_cadre_relief("", false, "", _T('info_email_envoi'));
|
|
|
309 |
echo "<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3 WIDTH=\"100%\">";
|
|
|
310 |
echo "<TR><TD BACKGROUND='" . _DIR_IMG_PACK . "rien.gif' class='verdana2'>";
|
|
|
311 |
echo _T('info_email_envoi_txt');
|
|
|
312 |
echo " <input type='text' name='email_envoi' value=\"$email_envoi\" size='20' CLASS='fondl'>";
|
|
|
313 |
echo "</TD></TR>";
|
|
|
314 |
echo "<TR><TD> </TD></TR></table>";
|
|
|
315 |
fin_cadre_relief();
|
|
|
316 |
}
|
|
|
317 |
|
|
|
318 |
echo "<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3 WIDTH=\"100%\">";
|
|
|
319 |
echo "<TR><td style='text-align:$spip_lang_right;'>";
|
|
|
320 |
echo "<INPUT TYPE='submit' NAME='Valider' VALUE='"._T('bouton_valider')."' CLASS='fondo'>";
|
|
|
321 |
echo "</TD></TR>";
|
|
|
322 |
echo "</TABLE>\n";
|
|
|
323 |
|
|
|
324 |
fin_cadre_trait_couleur();
|
|
|
325 |
echo "<p />";
|
|
|
326 |
}
|
|
|
327 |
|
|
|
328 |
// Activer forum admins
|
|
|
329 |
|
|
|
330 |
if ($options == "avancees") {
|
|
|
331 |
|
|
|
332 |
debut_cadre_trait_couleur("forum-admin-24.gif", false, "", _T('titre_cadre_forum_administrateur'));
|
|
|
333 |
|
|
|
334 |
echo "<div class='verdana2'>";
|
|
|
335 |
|
|
|
336 |
echo _T('info_forum_ouvert');
|
|
|
337 |
echo "<br />";
|
|
|
338 |
afficher_choix('forum_prive_admin', lire_meta('forum_prive_admin'),
|
|
|
339 |
array('oui' => _T('item_activer_forum_administrateur'),
|
|
|
340 |
'non' => _T('item_desactiver_forum_administrateur')));
|
|
|
341 |
|
|
|
342 |
echo "</div>";
|
|
|
343 |
echo "<div style='text-align:$spip_lang_right'><INPUT TYPE='submit' NAME='Valider' VALUE='"._T('bouton_valider')."' CLASS='fondo'></div>";
|
|
|
344 |
|
|
|
345 |
fin_cadre_trait_couleur();
|
|
|
346 |
echo "<p />";
|
|
|
347 |
|
|
|
348 |
}
|
|
|
349 |
|
|
|
350 |
|
|
|
351 |
echo "</form>";
|
|
|
352 |
|
|
|
353 |
fin_page();
|
|
|
354 |
|
|
|
355 |
?>
|