1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
---|
2 | <html xmlns="http://www.w3.org/1999/xhtml" lang="#LANG"> |
---|
3 | <head> |
---|
4 | <title><:escal:contact:> - [[(#NOM_SITE_SPIP|textebrut)]] |
---|
5 | </title> |
---|
6 | [<meta name="description" content="(#INTRODUCTION|couper{150}|textebrut)" />] |
---|
7 | <INCLURE {fond=inclusions/inc-head}> |
---|
8 | </head> |
---|
9 | |
---|
10 | <body id="top" onload="setHover('menu')"> |
---|
11 | <div id="ombre-gauche"> |
---|
12 | <div id="ombre-droite"> |
---|
13 | <div id="conteneur"> |
---|
14 | |
---|
15 | <div id="entete"> |
---|
16 | |
---|
17 | <INCLURE {fond=inclusions/inc-bandeau}> |
---|
18 | [(#CONFIG{escal/config/menuH}|non)<INCLURE {fond=inclusions/inc-menu}{env}>] |
---|
19 | [(#CONFIG{escal/config/menuH}|=={oui}|oui)<INCLURE {fond=inclusions/inc-menu}{env}>] |
---|
20 | </div> |
---|
21 | |
---|
22 | [(#REM) mise en place du lien vers le forum, du formulaire recherche et du menu de langues ] |
---|
23 | <div id="espace"> |
---|
24 | <BOUCLE_forum(RUBRIQUES){titre_mot="forum"}> |
---|
25 | <a href="#URL_RUBRIQUE"><img id="boutonForum" src="[(#CHEMIN{images/forum_bouton.png})]" alt="lien vers le forum" /></a> |
---|
26 | </BOUCLE_forum> |
---|
27 | #FORMULAIRE_RECHERCHE |
---|
28 | <INCLURE {fond=inclusions/inc-menu_langues_self}> |
---|
29 | </div> |
---|
30 | |
---|
31 | <div id="page"> |
---|
32 | <div id="contenu"> |
---|
33 | <div id="cadre-rubrique"> |
---|
34 | <div id="titre-rubrique"><:escal:page_contact:> |
---|
35 | </div> |
---|
36 | </div> |
---|
37 | <div id="formulaire-contact"> |
---|
38 | <div id="descriptif-article"> |
---|
39 | <:escal:contact_bienvenue:> |
---|
40 | </div> |
---|
41 | |
---|
42 | |
---|
43 | <!-- Merci a Alain Sichel pour cette page contact --> |
---|
44 | |
---|
45 | <?php |
---|
46 | function formulaire($Nom="",$Prenom="",$Email="",$Sujet="",$Message="") { |
---|
47 | ?> |
---|
48 | <form action="<?php echo $PHP_SELF ?>" method="post"> |
---|
49 | <ul id="item"> |
---|
50 | <li><div class="liste"><:escal:contact_nom:></div> |
---|
51 | <input type="text" name="Nom" size="30" value="<?php echo trim(htmlentities($_POST['Nom'])) ?>" /></li> |
---|
52 | <li><div class="liste"><:escal:contact_prenom:></div> |
---|
53 | <input type="text" name="Prenom" value="<?php echo trim(htmlentities($_POST['Prenom'])) ?>" size="30" /></li> |
---|
54 | |
---|
55 | |
---|
56 | |
---|
57 | [(#CONFIG{escal/config/contactmail}|=={non}|oui) <!-- ] |
---|
58 | <li><div class="liste"><:escal:contact_mail:></div> |
---|
59 | <input type="text" name="Email" value="<?php echo trim(htmlentities($_POST['Email'])) ?>" size="30" /></li> |
---|
60 | [(#CONFIG{escal/config/contactmail}|=={non}|oui) --> ] |
---|
61 | |
---|
62 | |
---|
63 | |
---|
64 | [(#CONFIG{escal/config/radio}|=={non}|oui) <!-- ] |
---|
65 | <li><:escal:contact_motif:></li> |
---|
66 | <ul> |
---|
67 | <li><input type="radio" name="Sujet" value="<:escal:contact_motif1:>" size="30" <?php if ($_POST['Sujet']=='<:escal:contact_motif1:>') { echo 'checked="checked"'; } ?> /><:escal:contact_motif1:></li> |
---|
68 | <li><input type="radio" name="Sujet" value="<:escal:contact_motif2:>" size="30" <?php if ($_POST['Sujet']=='<:escal:contact_motif2:>') { echo 'checked="checked"'; } ?> /><:escal:contact_motif2:></li> |
---|
69 | <li><input type="radio" name="Sujet" value="<:escal:contact_motif3:>" size="30" <?php if ($_POST['Sujet']=='<:escal:contact_motif3:>') { echo 'checked="checked"'; } ?> /><:escal:contact_motif3:></li> |
---|
70 | <li><input type="radio" name="Sujet" value="<:escal:contact_motif4:>" size="30" <?php if ($_POST['Sujet']=='<:escal:contact_motif4:>') { echo 'checked="checked"'; } ?> /><:escal:contact_motif4:></li> |
---|
71 | <li><input type="radio" name="Sujet" value="<:escal:contact_motif5:>" size="30" <?php if ($_POST['Sujet']=='<:escal:contact_motif5:>') { echo 'checked="checked"'; } ?> /><:escal:contact_motif5:></li> |
---|
72 | </ul> |
---|
73 | [(#CONFIG{escal/config/radio}|=={non}|oui) --> ] |
---|
74 | |
---|
75 | |
---|
76 | |
---|
77 | |
---|
78 | <div id="checkbox"> |
---|
79 | <li>[(#CONFIG{escal/config/titrecheckbox}|oui)<br />[(#CONFIG{escal/config/titrecheckbox})]<br /><br /> ] |
---|
80 | |
---|
81 | [(#CONFIG{escal/config/checkboxliste}|=={liste}|oui)<ul><li>] |
---|
82 | |
---|
83 | [(#CONFIG{escal/config/checkbox1}|non) <!-- ] |
---|
84 | <input type="checkbox" name="Niveau[]" value="[(#CONFIG{escal/config/checkbox1})]" <?php if ($_POST['Niveau']=='[(#CONFIG{escal/config/checkbox1})]') { echo 'checked="checked"'; } ?> />[(#CONFIG{escal/config/checkbox1})] |
---|
85 | [(#CONFIG{escal/config/checkbox1}|non) 1 --> ] |
---|
86 | |
---|
87 | [(#CONFIG{escal/config/checkboxliste}|=={liste}|oui)</li><li>] |
---|
88 | |
---|
89 | [(#CONFIG{escal/config/checkbox2}|non) <!-- ] |
---|
90 | <input type="checkbox" name="Niveau[]" value="[(#CONFIG{escal/config/checkbox2})]" <?php if ($_POST['Niveau']=='[(#CONFIG{escal/config/checkbox2})]') { echo 'checked="checked"'; } ?> />[(#CONFIG{escal/config/checkbox2})] |
---|
91 | [(#CONFIG{escal/config/checkbox2}|non) 2 --> ] |
---|
92 | |
---|
93 | [(#CONFIG{escal/config/checkboxliste}|=={liste}|oui)</li><li>] |
---|
94 | |
---|
95 | [(#CONFIG{escal/config/checkbox3}|non) <!-- ] |
---|
96 | <input type="checkbox" name="Niveau[]" value="[(#CONFIG{escal/config/checkbox3})]" <?php if ($_POST['Niveau']=='[(#CONFIG{escal/config/checkbox3})]') { echo 'checked="checked"'; } ?> />[(#CONFIG{escal/config/checkbox3})] |
---|
97 | [(#CONFIG{escal/config/checkbox3}|non) 3 --> ] |
---|
98 | |
---|
99 | [(#CONFIG{escal/config/checkboxliste}|=={liste}|oui)</li><li>] |
---|
100 | |
---|
101 | [(#CONFIG{escal/config/checkbox4}|non) <!-- ] |
---|
102 | <input type="checkbox" name="Niveau[]" value="[(#CONFIG{escal/config/checkbox4})]" <?php if ($_POST['Niveau']=='[(#CONFIG{escal/config/checkbox4})]') { echo 'checked="checked"'; } ?> />[(#CONFIG{escal/config/checkbox4})] |
---|
103 | [(#CONFIG{escal/config/checkbox4}|non) 4 --> ] |
---|
104 | |
---|
105 | [(#CONFIG{escal/config/checkboxliste}|=={liste}|oui)</li><li>] |
---|
106 | |
---|
107 | [(#CONFIG{escal/config/checkbox5}|non) <!-- ] |
---|
108 | <input type="checkbox" name="Niveau[]" value="[(#CONFIG{escal/config/checkbox5})]" <?php if ($_POST['Niveau']=='[(#CONFIG{escal/config/checkbox5})]') { echo 'checked="checked"'; } ?> />[(#CONFIG{escal/config/checkbox5})] |
---|
109 | [(#CONFIG{escal/config/checkbox5}|non) 5 --> ] |
---|
110 | |
---|
111 | [(#CONFIG{escal/config/checkboxliste}|=={liste}|oui)</li></ul>] |
---|
112 | |
---|
113 | </li> |
---|
114 | </div> |
---|
115 | |
---|
116 | |
---|
117 | |
---|
118 | |
---|
119 | <br /><br /> |
---|
120 | <li><:escal:contact_message:></li> <br /> |
---|
121 | <li> |
---|
122 | <textarea name="Message" rows="10" cols="35" style="background-color:#ffffff"><?php if (ereg("[]%~#`$&|}{^[><]",$Message)) { echo "Certains caractères utilisés sont interdits"; |
---|
123 | $erreur=1; } |
---|
124 | else {echo trim($_POST['Message']); } ?></textarea> </li> <li> |
---|
125 | <input id="envoi" type="submit" name="Submit" value="<:escal:contact_envoyer:>" alt="Envoi" title="Envoi de votre message" /> </li> |
---|
126 | </ul> |
---|
127 | <?php |
---|
128 | // |
---|
129 | // on recupere les donnees |
---|
130 | // on verifie si tout est bien rempli, sinon on envoie un message d'alerte |
---|
131 | // si oui on prepare le contenu du mail |
---|
132 | // |
---|
133 | } |
---|
134 | include_spip('inc/filtres'); |
---|
135 | |
---|
136 | $nom_site = entites_html($GLOBALS['meta']["nom_site"]); |
---|
137 | $email_webmaster = entites_html($GLOBALS['meta']["email_webmaster"]); |
---|
138 | if(!isset($_POST["Nom"])) { |
---|
139 | formulaire(); |
---|
140 | } |
---|
141 | else { |
---|
142 | $vNom=trim(utf8_decode($_POST["Nom"])); |
---|
143 | $vPrenom=trim(utf8_decode($_POST["Prenom"])); |
---|
144 | $vMessage=trim(utf8_decode($_POST["Message"])); |
---|
145 | $vEmail=trim(utf8_decode($_POST["Email"])); |
---|
146 | $vSujet=trim(utf8_decode($_POST["Sujet"])); |
---|
147 | $destinataire=$email_webmaster; |
---|
148 | $titre="<:escal:page_contact2|html2unicode|unicode2charset:> $nom_site"; |
---|
149 | $message="<:escal:envoi_mail_provenance:> " . $_SERVER['HTTP_REFERER'] . "\n"; |
---|
150 | $message.="<:escal:envoi_mail_ip:> " . $_SERVER['REMOTE_ADDR'] . "\n"; |
---|
151 | $message.="<:escal:envoi_mail_navigateur:>" . $_SERVER['HTTP_USER_AGENT'] . "\n\n"; |
---|
152 | $message.="<:escal:envoi_mail_nom:> $vNom\n"; |
---|
153 | if (empty($vNom)) { |
---|
154 | echo "<p class='alerte'><:escal:contact_alerte_nom:></p>"; |
---|
155 | $erreur=1; |
---|
156 | } |
---|
157 | $message.="<:escal:envoi_mail_prenom:> $vPrenom\n\n"; |
---|
158 | if (empty($vPrenom)) { |
---|
159 | echo "<p class='alerte'><:escal:contact_alerte_prenom:></p>"; |
---|
160 | $erreur=1; |
---|
161 | } |
---|
162 | $message.="<:escal:envoi_mail_e_mail:> $vEmail\n\n"; |
---|
163 | if (empty($vEmail)) { |
---|
164 | echo "<p class='alerte'><:escal:contact_alerte_mail1:></p>"; |
---|
165 | $erreur=1; |
---|
166 | } |
---|
167 | if (!eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-_.]?[0-9a-z])*\\.[a-z]{2,4}$",$vEmail) && ($erreur<>1)){ |
---|
168 | echo "<p class='alerte'><:escal:contact_alerte_mail2:></p>"; |
---|
169 | $erreur=1; |
---|
170 | } |
---|
171 | $message.="<:escal:envoi_mail_motif:> $vSujet\n\n"; |
---|
172 | if (empty($vSujet)) { |
---|
173 | echo "<p class='alerte'><:escal:contact_alerte_motif:></p>"; |
---|
174 | $erreur=1; |
---|
175 | } |
---|
176 | if (empty($_POST['Niveau'] )) { |
---|
177 | echo "<p class='alerte'><:escal:contact_alerte_checkbox:></p>"; |
---|
178 | $erreur=1; |
---|
179 | } else { |
---|
180 | $message.= "<:escal:envoi_mail_niveau:> "; |
---|
181 | $message.= implode(" - ",$_POST['Niveau']); |
---|
182 | } |
---|
183 | $message.=" \n\n <:escal:envoi_mail_message:> \n $vMessage\n"; |
---|
184 | if (empty($vMessage)) { |
---|
185 | echo "<p class='alerte'><:escal:contact_alerte_message:></p>"; |
---|
186 | $erreur=1; |
---|
187 | } |
---|
188 | |
---|
189 | if ($erreur==1) { |
---|
190 | formulaire($Nom,$Prenom,$Email,$Sujet,$Message); |
---|
191 | } |
---|
192 | else { |
---|
193 | // |
---|
194 | // on prepare les headers et on envoie le mail |
---|
195 | // |
---|
196 | $headers ='From: <'.$vEmail.'>'."\n"; |
---|
197 | $headers .='Content-Type: text/plain; charset="iso-8859-1"'."\n"; |
---|
198 | $headers .='Content-Transfer-Encoding: 8bit'; |
---|
199 | |
---|
200 | mail($destinataire,$titre,$message,$headers) ; |
---|
201 | |
---|
202 | // |
---|
203 | // on renvoie un message de confirmation |
---|
204 | // |
---|
205 | echo '<p class="texte-retour1"> |
---|
206 | <:escal:contact_retour_bonjour:> <span class="valeur1"> '. $vPrenom=utf8_encode(nl2br($vPrenom)) .' '. $vNom=utf8_encode(nl2br($vNom)) .'</span>.<br /> |
---|
207 | <:escal:contact_retour_commentaire:> |
---|
208 | <span class="valeur1"> '. $vEmail .'</span> |
---|
209 | </p>'; |
---|
210 | echo '<p class="texte-retour2"><:escal:contact_motif:></p>'; |
---|
211 | echo '<p class="valeur2">'. $vSujet=utf8_encode(nl2br($vSujet)) .'</p>'; |
---|
212 | echo '<p class="texte-retour2"><:escal:contact_retour_checkbox:></p>'; |
---|
213 | for ($i=0; $i<count($_POST["Niveau"]); $i++) |
---|
214 | echo '<p class="valeur2">'. $_POST["Niveau"][$i].'</p>'; |
---|
215 | echo '<p class="texte-retour2"><:escal:contact_message:></p>'; |
---|
216 | |
---|
217 | echo '<p class="valeur3">'. $vMessage=utf8_encode(nl2br($vMessage)) .'</p>'; |
---|
218 | } |
---|
219 | } |
---|
220 | ?> |
---|
221 | </form> |
---|
222 | </div><!-- fin formulaire-contact --> |
---|
223 | </div><!-- fin contenu --> |
---|
224 | </div><!-- fin page --> |
---|
225 | |
---|
226 | <div id="navigation"> |
---|
227 | <!-- affichage des 2 menus verticaux par defaut ou si selectionnes dans la page de configuration --> |
---|
228 | [(#CONFIG{escal/config/menuV1}|non)<div class="cadre-bleu"><INCLURE {fond=inclusions/inc-menu_vertical}{lang}></div>] |
---|
229 | [(#CONFIG{escal/config/menuV1}|=={oui}|oui)<div class="cadre-bleu"><INCLURE {fond=inclusions/inc-menu_vertical}{lang}></div>] |
---|
230 | |
---|
231 | [(#CONFIG{escal/config/menuV2}|non)<div class="cadre-bleu"><INCLURE {fond=inclusions/inc-menu_vertical_2}{lang}></div>] |
---|
232 | [(#CONFIG{escal/config/menuV2}|=={oui}|oui)<div class="cadre-bleu"><INCLURE {fond=inclusions/inc-menu_vertical_2}{lang}></div>] |
---|
233 | |
---|
234 | <div class="cadre-bleu"> |
---|
235 | <INCLURE {fond=inclusions/inc-acces_direct}{lang}> |
---|
236 | </div> |
---|
237 | </div> |
---|
238 | |
---|
239 | <div id="pied"> |
---|
240 | <INCLURE {fond=inclusions/inc-pied}{skel=#SQUELETTE}{lang}> |
---|
241 | </div> |
---|
242 | |
---|
243 | </div><!-- fin conteneur --> |
---|
244 | </div> |
---|
245 | </div> |
---|
246 | </body> |
---|
247 | </html> |
---|