[SPIP] +2.1.12
[velocampus/web/www.git] / www / ecrire / configuration / annonces.php
1 <?php
2
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
5 * *
6 * Copyright (c) 2001-2011 *
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 if (!defined('_ECRIRE_INC_VERSION')) return;
14
15 include_spip('inc/presentation');
16 include_spip('inc/config');
17
18 function configuration_annonces_dist()
19 {
20 global $spip_lang_left;
21
22 $res = "<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">"
23 . "\n<tr><td class='verdana2'>"
24 . "<blockquote><p><i>"._T('info_hebergeur_desactiver_envoi_email')."</i></p></blockquote>"
25 . "</td></tr></table>";
26
27 //
28 // Suivi editorial (articles proposes & publies)
29 //
30
31 $suivi_edito=$GLOBALS['meta']["suivi_edito"];
32 $adresse_suivi=$GLOBALS['meta']["adresse_suivi"];
33 $adresse_suivi_inscription=$GLOBALS['meta']["adresse_suivi_inscription"];
34
35 $res .= "<br />\n"
36 . debut_cadre_relief("", true, "", _T('info_suivi_activite'))
37 . "<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">";
38
39 $res .= "\n<tr><td class='verdana2'>"
40 . _T('info_facilite_suivi_activite')
41 . "</td></tr></table>";
42
43
44 $res .= "<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">"
45 . "\n<tr><td style='text-align: $spip_lang_left' class='verdana2'>";
46
47 $res .= bouton_radio("suivi_edito", "oui", _T('bouton_radio_envoi_annonces_adresse'), $suivi_edito == "oui", "changeVisible(this.checked, 'config-edito', 'block', 'none');");
48
49
50 if ($suivi_edito == "oui") $style = "display: block;";
51 else $style = "display: none;";
52
53 $res .= "<div id='config-edito' style='$style'>"
54 . "\n<div style='text-align: center;'><input type='text' name='adresse_suivi' id='adresse_suivi' value='$adresse_suivi' size='30' /></div>"
55 . "\n<blockquote class='spip'><p>";
56
57 if (!$adresse_suivi) $adresse_suivi = "mailing@monsite.net";
58
59 $res .= "<label for='adresse_suivi_inscription'>"._T('info_config_suivi', array('adresse_suivi' => $adresse_suivi))."</label>"
60 . "<br />\n<input type='text' name='adresse_suivi_inscription' id='adresse_suivi_inscription' value='$adresse_suivi_inscription' size='50' />"
61 . "</p></blockquote>"
62 . "</div>"
63 . "<br />\n"
64 . bouton_radio("suivi_edito", "non", _T('bouton_radio_non_envoi_annonces_editoriales'), $suivi_edito == "non", "changeVisible(this.checked, 'config-edito', 'none', 'block');")
65 . "</td></tr></table>\n"
66 . fin_cadre_relief(true);
67
68 //
69 // Annonce des nouveautes
70 //
71 $quoi_de_neuf=$GLOBALS['meta']["quoi_de_neuf"];
72 $adresse_neuf=$GLOBALS['meta']["adresse_neuf"];
73 $jours_neuf=$GLOBALS['meta']["jours_neuf"];
74
75 $res .= "<br />\n"
76 . debut_cadre_relief("", true, "", _T('info_annonce_nouveautes'))
77 . "<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">"
78 . "\n<tr><td class='verdana2'>"
79 . _T('info_non_envoi_annonce_dernieres_nouveautes')
80 . "</td></tr>"
81 . "\n<tr><td style='text-align: $spip_lang_left' class='verdana2'>"
82 . bouton_radio("quoi_de_neuf", "oui", _T('bouton_radio_envoi_liste_nouveautes'), $quoi_de_neuf == "oui", "changeVisible(this.checked, 'config-neuf', 'block', 'none');");
83
84 if ($quoi_de_neuf == "oui") $style = "display: block;";
85 else $style = "display: none;";
86
87 $res .= "<div id='config-neuf' style='$style'>"
88 . "<ul>"
89 . "<li><label for='adresse_neuf'>"._T('info_adresse')."</label>"
90 . "\n<input type='text' name='adresse_neuf' id='adresse_neuf' value='$adresse_neuf' size='30' />"
91 . "</li><li><label for='jours_neuf'>"._T('info_tous_les')."</label>"
92 . "\n<input type='text' name='jours_neuf' id='jours_neuf' value='$jours_neuf' size='4' />\n"
93 . _T('info_jours')
94 . " &nbsp; &nbsp; &nbsp;\n<input type='submit' name='envoi_now' id='envoi_now' value='"
95 . _T('info_envoyer_maintenant')
96 . "' onclick='AjaxNamedSubmit(this)' />"
97 . "</li></ul>"
98 . "</div>";
99
100 $res .= "<br />\n"
101 . bouton_radio("quoi_de_neuf", "non", _T('info_non_envoi_liste_nouveautes'), $quoi_de_neuf == "non", "changeVisible(this.checked, 'config-neuf', 'none', 'block');");
102
103 $res .= "</td></tr></table>\n"
104 . fin_cadre_relief(true);
105
106 $email_envoi = entites_html($GLOBALS['meta']["email_envoi"]);
107 $titre = _T('info_email_envoi');
108 if ($email_envoi) $titre .= "&nbsp;:&nbsp;" . $email_envoi;
109 $res .= "<br />\n"
110 . debut_cadre_relief("", true, "", $titre)
111 . "<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">"
112 . "\n<tr><td class='verdana2'>"
113 . "<label for='email_envoi'>"._T('info_email_envoi_txt')."</label>"
114 . " <input type='text' name='email_envoi' id='email_envoi' value=\"$email_envoi\" size='20' />"
115 . "</td></tr>"
116 . "\n<tr><td>&nbsp;</td></tr></table>"
117 . fin_cadre_relief(true);
118
119 $res = debut_cadre_trait_couleur("mail-auto-24.gif", true, "", _T('info_envoi_email_automatique').aide ("confmails"))
120 . ajax_action_post('configurer', 'annonces', 'config_contenu','',$res)
121 . fin_cadre_trait_couleur(true);
122
123 return ajax_action_greffe('configurer-annonces', '', $res);
124 }
125 ?>