0){ $xml_data = substr($xml_data,0,$lastBackslashPos) .substr($xml_data,$lastBackslashPos+1,strlen($xml_data)); $lastBackslashPos = strpos ($xml_data, "\\"); } $fh = fopen($xml_file, "wb"); fwrite($fh, $xml_data); fclose($fh); echo "Data save=== ".$xml_file; //Post $L=$_POST["L"]; $to =$_POST["to"]; $fromName=$_POST["name"]; $fromAddress=$_POST["address"]; $fromEmail=$_POST["email"]; $fromPhone=$_POST["phone"]; $BU=$_POST["BU"]; $NOTE=$_POST["NOTE"]; $sendto=$_POST["SENTO"]; $q1=$_POST["q1"]; $q2=$_POST["q2"]; $q3=$_POST["q3"]; $q4=$_POST["q4"]; $Pnum=$_POST["Pnum"]; $Inum=$_POST["Inum"]; $Mnum=$_POST["Mnum"]; $logoPath=_POST["logoPath"]; $memberPath=_POST["memberPath"]; // Email subject if($L=="1"){$subject ="$fromName"." DESIGN REQUEST";} if($L=="2"){$subject ="$fromName"." DEMANDE DE DESIGN";} // Attachment file $file = $xml_file; /*"files/codexworld.pdf";*/ //header('Content-type: image/png'); //readfile($ImageKitchen); if($L=="1"){ $htmlContent = " image logo
From: $fromName
Address: $fromAddress
Email: $fromEmail
Phone: $fromPhone
Budget: $BU
Door: $Pnum
Island: $Inum
Wall cabinet available: $Mnum
NOTE TO THE DESIGNER:

$NOTE

PLAN 2D ACCESS
Save attachement on your computer, go to 3d soft by the link below and open the file. https://software.ciemetric.com/soft/version/live/?$memberPath
"; } if($L=="2"){ $htmlContent = " image logo
Nom: $fromName
Adresse: $fromAddress
Courriel: $fromEmail
Téléphone: $fromPhone
Propriétaire: $q1
Maison à vendre: $q2
Changer cuisine: $q3
Demande de soumissions: $q4
Budget: $BU
Porte: $Pnum
Ilôt: $Inum
Mur avec armoires: $Mnum
NOTE AU CUISINISTE:

$NOTE

ACCÈS PLAN 2D
Sauvegardez l'attachement, accedez au logiciel Ciemetric depuis le lien et ouvrez le ficher. https://software.ciemetric.com/soft/version/live/?ciemetric_demo
"; } // Header for sender info $headers = "From: $fromName"." <".$fromEmail.">"; // Boundary $semi_rand = md5(time()); $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x"; // Headers for attachment $headers .= "\nMIME-Version: 1.0\n" . "Content-Type: multipart/mixed;\n" . " boundary=\"{$mime_boundary}\""; // Multipart boundary $message = "--{$mime_boundary}\n" . "Content-Type: text/html; charset=\"UTF-8\"\n" . "Content-Transfer-Encoding: 7bit\n\n" . $htmlContent . "\n\n"; // Preparing attachment if(!empty($file) > 0){ if(is_file($file)){ $message .= "--{$mime_boundary}\n"; $fp = @fopen($file,"rb"); $data = @fread($fp,filesize($file)); @fclose($fp); $data = chunk_split(base64_encode($data)); $message .= "Content-Type: application/octet-stream; name=\"".basename($file)."\"\n" . "Content-Description: ".basename($file)."\n" . "Content-Disposition: attachment;\n" . " filename=\"".basename($file)."\"; size=".filesize($file).";\n" . "Content-Transfer-Encoding: base64\n\n" . $data . "\n\n"; } } $message .= "--{$mime_boundary}--"; $returnpath = "-f" . $fromEmail; // Send email $mail = @mail($to, $subject, $message, $headers, $returnpath); //$mail = @mail($sendto, $subject, $message, $headers, $returnpath); // Email sending status echo $mail?"

Email Sent Successfully!

":"

Email sending failed new

"; ?>