Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
517
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 12.71 KB | None | 0 0
  1. <?
  2. $nom_ariane ="Contact";
  3. $fil_ariane="";
  4. include("haut.php");
  5. include("ariane.php");
  6. ?>
  7. <?
  8. if($_SESSION['lang'] == 'EN'){
  9.     $membre = "Select a group member";
  10.     $civilite = "Civility";
  11.     $nom = "Last Name";
  12.     $prenom = "First Name";
  13.     $societe = "Company name";
  14.     $cp = "Zip code";
  15.     $ville = "City";
  16.     $pays = "Country";
  17.     $tel = "Phone number";
  18.     $c1 = "Mr.";
  19.     $c2 = "Mrs.";
  20.     $c3 = "Miss";
  21.     $champs = "Compulsory field";
  22.     $btn ="images/bt_send.jpg";
  23.     $interesse = "intereseting by";
  24.     $interesse2 = "Subcontracting";
  25.     $interesse3 = "Other";
  26. }else{
  27.     $membre = "Sélectionner un membre du groupe";
  28.     $civilite = "Civilité";
  29.     $nom = "Nom";
  30.     $prenom = "Prénom";
  31.     $societe = "Société";
  32.     $cp = "Code Postal";
  33.     $ville = "Ville";
  34.     $pays = "Pays";
  35.     $tel = "Téléphone";
  36.     $c1 = "M.";
  37.     $c2 = "Mme.";
  38.     $c3 = "Mlle";
  39.     $champs = "Champs obligatoires";
  40.     $btn ="images/bt_envoyer.jpg";
  41.     $interesse = "Intéressé par";
  42.     $interesse2 = "Sous-traitance";
  43.     $interesse3 = "Autre";
  44. }
  45. ?>
  46. <script>
  47. function changeForm(id_groupe){
  48.    
  49.     if(id_groupe=='laser'){
  50.         document.getElementById('interesse').style.display="";
  51.     }
  52.     else{
  53.         document.getElementById('interesse').style.display="none";
  54.     }
  55.    
  56. }
  57.  
  58.             function verifForm(){
  59.                 testm=false ;
  60.                 for(var j=1;j<(document.mail.mail.value.length);j++){
  61.                     if (document.mail.mail.value.charAt(j)=='@'){
  62.                         if (j<(document.mail.mail.value.length-4)){
  63.                             for (var k=j;k<(document.mail.mail.value.length-2);k++){
  64.                                 if (document.mail.mail.value.charAt(k)=='.')testm=true;
  65.                             }
  66.                         }
  67.                     }
  68.                 }
  69.                 a="0";
  70.                 societe = "Vous n\'avez pas indiqué votre société.";
  71.                 nom = "Vous n\'avez pas indiqué votre nom.";
  72.                 prenom = "Vous n\'avez pas indiqué votre prénom.";
  73.                 ville = "Vous n\'avez pas indiqué votre ville.";
  74.                 tel = "Vous n\'avez pas indiqué votre téléphone.";
  75.                 mail = "Vous n\'avez pas indiqué votre adresse e-mail.";
  76.                 mailko = "Votre adresse e-mail est incorrecte.";
  77.                 message = "Vous n\'avez pas indiqué votre message.";
  78.                 if(document.mail.groupe.value == 'fareast'){
  79.                     societe = "You haven\'t indicate your company name.";
  80.                     nom = "You haven\'t indicate your last name";
  81.                     prenom = "You haven\'t indicate your first name";
  82.                     ville = "You haven\'t indicate your city";
  83.                     tel = "You haven\'t indicate your phone Number";
  84.                     mail = "You haven\'t indicate your mail";
  85.                     mailko = "Your e-mail address is incorrect";
  86.                     message = "You haven\'t indicate your message";
  87.                 }
  88.                 if (document.mail.societe.value.length == 0) {alert(societe); a="1"; document.mail.societe.focus();}
  89.                 else if (document.mail.nom.value.length == 0) {alert(nom); a="1"; document.mail.nom.focus();}
  90.                 else if (document.mail.prenom.value.length == 0) {alert(prenom); a="1"; document.mail.prenom.focus();}
  91.                 else if (document.mail.ville.value.length == 0) {alert(ville); a="1"; document.mail.ville.focus();}
  92.                 else if (document.mail.tel.value.length == 0) {alert(tel); a="1"; document.mail.tel.focus();}
  93.                 else if (document.mail.mail.value.length == 0) {alert(mail); a="1"; document.mail.mail.focus();}
  94.                 else if ((testm==false) && (document.mail.mail.value.length != 0)) {alert(mailko); a="1"; document.mail.mail.focus();}
  95.                 else if (document.mail.message.value.length == 0) {alert(message); a="1"; document.mail.message.focus();}
  96.  
  97.                 if (a == 0) {
  98.                     document.mail.submit();
  99.                 }
  100.             }
  101. </script>
  102.  <tr>
  103.     <td height="325" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  104.       <tr>
  105.         <td style="padding-top:10px" height="377" valign="top"><table width="100%" height="335" border="0" cellpadding="0" cellspacing="0">
  106.           <tr>
  107.             <td width="98%" align="center" valign="top"><div align="center" class="textsimpleblanc">
  108. <h1>CONTACT</h1>
  109. <div style="float:left; width:460px;">
  110. <?
  111. $query = "SELECT * FROM page WHERE id = 1 ";
  112. $exec = mysql_query($query) or die(mysql_error());
  113. $data = mysql_fetch_assoc($exec);
  114. echo stripslashes($data['texte']);
  115. ?>
  116. </div>
  117. <!--
  118. <div style="float:left; width:460px;">
  119.  
  120. <img style="float:left; margin-right:10px;" src="images/logo_paris_implants_c.jpg" /><p class="textsimpleblanc" style="width:380px; margin-left:0px; text-align:justify;">
  121. <strong>Paris Implants</strong><br />
  122. 6 Chemin des plantes<br />
  123. 70150 MARNAY<br />
  124. Tel : 03.84.31.79.21<br />
  125. Fax : 03.84.31.90.46<br />
  126. </p>
  127. <div style="clear:both;"></div>
  128. <br/>
  129. <div  style="width:250px; height:1px; background-color:#666; margin:auto;"></div>
  130. <br/>
  131.  
  132. <img style="float:left; margin-right:10px;" src="images/logo_laser_c.jpg" /><p class="textsimpleblanc" style="width:380px; margin-left:0px; text-align:justify;">
  133. <strong>Laser Cheval</strong><br />
  134. 5 Rue de la Louvri&egrave;re<br />
  135. 25480 PIREY<br />
  136. Tel : + 33 (0)3.81.48.34.60<br />
  137. Fax : + 33 (0)3.81.34.60.34
  138. </p>
  139. <div style="clear:both;"></div>
  140. <br/>
  141. <div  style="width:250px; height:1px; background-color:#666; margin:auto;"></div>
  142. <br/>
  143.  
  144. <img style="float:left; margin-right:10px;" src="images/logo_freres_c.jpg" /><p class="textsimpleblanc" style="width:380px; margin-left:0px; text-align:justify;">
  145. <strong>Cheval Fr&egrave;res</strong><br />
  146. Rue des Bosquets<br />
  147. BP 3004 Ecole Valentin<br />
  148. 25000 BESANCON
  149. </p>
  150. <div style="clear:both;"></div>
  151. <br/>
  152. <div  style="width:250px; height:1px; background-color:#666; margin:auto;"></div>
  153. <br/>
  154.  
  155. <img style="float:left; margin-right:10px;" src="images/logo_hardex_c.jpg" /><p class="textsimpleblanc" style="width:380px; margin-left:0px; text-align:justify;">
  156. <strong>Hardex</strong><br />
  157. 6 Chemin des plantes<br />
  158. 70150 MARNAY<br />
  159. + 33 (0)3.84.31.95.40
  160. </p>
  161. <div style="clear:both;"></div>
  162. <br/>
  163. <div  style="width:250px; height:1px; background-color:#666; margin:auto;"></div>
  164. <br/>
  165.  
  166. <img style="float:left; margin-right:10px;" src="images/logo_imi_c.jpg" /><p class="textsimpleblanc" style="width:380px; margin-left:0px; text-align:justify;">
  167. <strong>IMI Swiss</strong><br />
  168. Adresse : Rue Jambe-Ducommun 6b<br />
  169. CH – 2400 LE LOCLE<br />
  170. Tel : +41.32.925.70.10<br />
  171. Fax : +41.32.925.70.19
  172. </p>
  173. <div style="clear:both;"></div>
  174. <br/>
  175. <div  style="width:250px; height:1px; background-color:#666; margin:auto;"></div>
  176. <br/>
  177.  
  178. <img style="float:left; margin-right:10px;" src="images/logo_east.jpg" /><p class="textsimpleblanc" style="width:380px; margin-left:0px; text-align:justify;">
  179. <strong>Cheval far east ltd</strong><br />
  180. </p>
  181. <div style="clear:both;"></div>
  182. <br/>
  183. <div  style="width:250px; height:1px; background-color:#666; margin:auto;"></div>
  184. <br/>
  185.  
  186. </div>
  187. -->
  188. <div style="width:1px; height:425px; float:left; background-color:#666; margin-left:20px;"></div>
  189.  
  190. <div style="float:right; width:500px;">
  191.    <?
  192. if(isset($_POST["ok"]) && $_POST["ok"] == 1){
  193.     $civilite = "Civilit&eacute;";
  194.     $nom = "Nom";
  195.     $prenom = "Pr&eacute;nom";
  196.     $societe = "Soci&eacute;t&eacute;";
  197.     $cp = "Code Postal";
  198.     $ville = "Ville";
  199.     $pays = "Pays";
  200.     $tel = "T&eacute;l&eacute;phone";
  201.     $sujet = "Message depuis" ;
  202.     $messageok= "Merci, votre demande a bien &eacute;t&eacute; envoy&eacute;e !";
  203.     $messageko = "Votre demande n'a pas pu &ecirc;tre envoy&eacute;e.";
  204.  
  205.     if($_POST["groupe"]=='paris'){
  206.         $mail_site = "contact-site-groupe-paris@groupe-imi.fr";
  207.     }else if($_POST["groupe"]=='laser'){
  208.         $mail_site = "contact-site-groupe-laser@groupe-imi.fr";
  209.     }else if($_POST["groupe"]=='cheval'){
  210.         $mail_site = "t.dibiagio@cheval-freres.fr";
  211.     }else if($_POST["groupe"]=='hardex'){
  212.         $mail_site = "contact-site-groupe-hardex@groupe-imi.fr";
  213.     }else if($_POST["groupe"]=='imis'){
  214.         $mail_site = "contact-site-groupe-imis@groupe-imi.fr";
  215.     }else if($_POST["groupe"]=='fareast'){
  216.         $mail_site = "contact-site-groupe-fareast@groupe-imi.fr";
  217.         $civilite = "Civility";
  218.         $nom = "Last Name";
  219.         $prenom = "First Name";
  220.         $societe = "Company name";
  221.         $cp = "Zip Code";
  222.         $ville = "City";
  223.         $pays = "Country";
  224.         $tel = "phone Number";
  225.         $sujet = "Message from";
  226.         $messageok= "Thanks, your request has been send !";
  227.         $messageko = "Your request hasn't been send";
  228.     }
  229.     if(envoi_mail($_POST["mail"],$mail_site, $sujet." ".$url_site2,
  230.                          
  231. $civilite." : ".htmlentities($_POST["civilite"])."<br>".
  232. $societe." : ".htmlentities($_POST["societe"])."<br>".
  233. $nom." : ".htmlentities($_POST["nom"])."<br>".
  234. $prenom." : ".htmlentities($_POST["prenom"])."<br>".
  235. $cp." : ".htmlentities($_POST["cp"])."<br>".
  236. $ville." : ".htmlentities($_POST["ville"])."<br>".
  237. $pays." : ".htmlentities($_POST["pays"])."<br>".
  238. $tel." : ".htmlentities($_POST["tel"])."<br>
  239. Mail : ".htmlentities($_POST["mail"])."<br><br>
  240. Message : ".nl2br(htmlentities($_POST["message"]))."<br>
  241.  
  242. ")){
  243.         echo "<br><br><div align='center' class='textsimpleblanc'><b>".$messageok."</b></div><br><br>";
  244.     }else{
  245.         echo "<br><br><div align='center' class='textsimpleblanc'><b>".$messageko."</b></div><br><br>";
  246.     }
  247. }else{
  248.  
  249. ?>
  250. <div style="width:374px; background:url(images/bg_contact.jpg) no-repeat;">
  251. <form action="" method="post" name="mail">
  252. <input type="hidden" name="ok" value="1"/>
  253. <table width="100%">
  254.     <tr style="height:10px">
  255.         <td></td>
  256.     </tr>
  257.     <tr >
  258.         <td align="center" colspan="2"><strong><div id="membre"><?=$membre?></div></strong>
  259.             <select name="groupe" onchange="changeForm(this.value)">
  260.                <!-- <option value="imi">IMI</option> -->
  261.                 <option value="paris">Paris Implants</option>
  262.                 <option value="laser">Laser Cheval</option>
  263.                 <option value="cheval">Cheval Fr&egrave;res</option>
  264.                 <option value="hardex">Hardex</option>
  265.                 <option value="imis">IMI Swiss</option>
  266.                 <option value="fareast">Cheval Far East Ltd</option>
  267.             </select>
  268.         </td>
  269.     </tr>
  270.     <tr style="height:10px">
  271.         <td></td>
  272.     </tr>
  273.     <tr>
  274.         <td align="right" width="30%" id="civilite"><strong><?=$civilite?>* : </strong></td>
  275.         <td align="left">
  276.             <select name="civilite">
  277.               <option id="c1" value="M." <?=(isset($civilite) && $civilite=="M." ? "selected" : "")?>><?=$c1?></option>
  278.               <option id="c2" value="Mme" <?=(isset($civilite) && $civilite=="Mme" ? "selected" : "")?>><?=$c2?></option>
  279.               <option id="c3" value="Melle" <?=(isset($civilite) && $civilite=="Melle" ? "selected" : "")?>><?=$c3?></option>
  280.             </select>
  281.         </td>
  282.     </tr>
  283.     <tr>
  284.         <td align="right" id="societe"><strong><?=$societe?>* : </strong></td>
  285.         <td align="left"><input style="width:180px;" type="text" name="societe"/></td>
  286.     </tr>
  287.     <tr>
  288.         <td align="right" id="nom"><strong><?=$nom?>* : </strong></td>
  289.         <td align="left"><input style="width:180px;" type="text" name="nom"/></td>
  290.     </tr>
  291.     <tr>
  292.         <td align="right" id="prenom"><?=$prenom?> : </td>
  293.         <td align="left"><input style="width:180px;" type="text" name="prenom"/></td>
  294.     </tr>
  295.     <tr>
  296.         <td align="right" id="cp"><?=$cp?> : </td>
  297.         <td align="left"><input style="width:180px;" type="text" name="cp"/></td>
  298.     </tr>
  299.     <tr>
  300.         <td align="right" id="ville"><strong><?=$ville?>* : </strong></td>
  301.         <td align="left"><input style="width:180px;" type="text" name="ville"/></td>
  302.     </tr>
  303.     <tr>
  304.         <td align="right" id="pays"><?=$pays?> : </td>
  305.         <td align="left"><input style="width:180px;" type="text" name="pays"/></td>
  306.     </tr>
  307.     <tr>
  308.         <td align="right" id="tel"><strong><?=$tel?>* : </strong></td>
  309.         <td align="left"><input style="width:180px;" type="text" name="tel"/></td>
  310.     </tr>
  311.     <tr>
  312.         <td align="right"><strong>Email* : </strong></td>
  313.         <td align="left"><input style="width:180px;" type="text" name="mail"/></td>
  314.     </tr>
  315.     <tr style="display:none" id="interesse">
  316.         <td align="right" ><strong><?=$interesse?> : </strong></td>
  317.         <td align="left">
  318.             <select name="interesse" style="width:180px;">
  319.                 <option value="machine">Machine</option>
  320.                 <option value="sous-traitance"><?=intresse2?></option>
  321.                 <option value="autre"><?=intresse3?></option>
  322.             </select>
  323.         </td>
  324.     </tr>
  325.     <tr>
  326.         <td colspan="2" align="center" id="message"><strong>Message* </strong></td>
  327.     </tr>
  328.     <tr>
  329.         <td colspan="2" align="center"><textarea rows="10" cols="38" name="message"></textarea></td>
  330.     </tr>
  331.     <tr>
  332.         <td colspan="2" align="center" id="champs">* <?=$champs?></td>
  333.     </tr>
  334.     <tr>
  335.         <td colspan="2" align="center"><a href="javascript:verifForm();"><img src="<?=$btn?>" border="0" id="bouton"/></a></td>
  336.     </tr>
  337. </table>
  338. </form>
  339. <img src="images/foot_contact.jpg" />
  340.  
  341. </div>
  342. <?
  343. }
  344. ?>
  345. </div>
  346.  
  347. </div>
  348.  
  349. <div style="clear:both;"></div>
  350. <br />
  351.             </div></td>
  352. </tr></table></td></tr></table></td></tr>
  353. <? include("bas.php");?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement