"" && $uploadedfile<>"" && $image_name<>""){ move_uploaded_file($uploadedfile, $folder."/".$image_name); } } return $image_name; } function mail_attachment ($from_email, $to, $subject, $message, $attachment){ $fileatt = $attachment; // Path to the file $fileatt_type = "application/octet-stream"; // File Type $start= strrpos($attachment, '/') == -1 ? strrpos($attachment, '//') : strrpos($attachment, '/')+1; $fileatt_name = substr($attachment, $start, strlen($attachment)); // Filename that will be used for the file as the attachment $email_from = $from_email; // Who the email is from $email_subject = $subject; // The Subject of the email $email_txt = $message; // Message that the email has in it $email_to = $to; // Who the email is to $headers = "From: $from_email"; $file = fopen($fileatt,'rb'); $data = fread($file,filesize($fileatt)); fclose($file); $msg_txt=""; $semi_rand = md5(time()); $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x"; $headers .= "\nMIME-Version: 1.0\n" . "Content-Type: multipart/mixed;\n" . " boundary=\"{$mime_boundary}\""; #$email_txt .= $msg_txt; $email_message .= "This is a multi-part message in MIME format.\n\n" . "--{$mime_boundary}\n" . "Content-Type:text/html; charset=\"iso-8859-1\"\n" . "Content-Transfer-Encoding: 7bit\n\n" . $email_txt . "\n\n"; $data = chunk_split(base64_encode($data)); $email_message .= "--{$mime_boundary}\n" . "Content-Type: {$fileatt_type};\n" . " name=\"{$fileatt_name}\"\n" . //"Content-Disposition: attachment;\n" . //" filename=\"{$fileatt_name}\"\n" . "Content-Transfer-Encoding: base64\n\n" . $data . "\n\n" . "--{$mime_boundary}--\n"; $ok = mail($email_to, $email_subject, $email_message, $headers); if($ok) { } else { die("Sorry but the email could not be sent. Please go back and try again!"); } } // File system path if ($_POST[submit]) { @extract($_POST); session_start(); if($_SESSION['security_code'] == $_POST['security_code'] && !empty($_SESSION['security_code'] ) ) { $tmp = dirname(__FILE__); $tmp = str_replace('\\' ,'/',$tmp); $basedir = substr($tmp, 0, strrpos($tmp, '/')); $websiteName="mintageindia.com"; $adminName="Admin"; $adminEmail='sanjaynathsingh,rahulbansal,snathsingh'; $ContactPerson=$firstName; $fromMember="$ContactPerson<$email>"; $eMail=$email; $subject="Thanks for franchise request from $websiteName"; $headers = "From: $ContactPerson<$email> \n"; $headers .= "Reply-To: $eMail \r\n"; $headers .= "X-Mailer: PHP/". phpversion(); $headers .= "X-Priority: 3 \n"; $headers .= "MIME-version: 1.0\n"; $headers .= "Content-Type: text/html; charset=UTF-8\n"; $msgAdmin="Dear $adminName,\n\n

You have received a franchise request at $websiteName. Please find below the details:\n\n

Name : $firstName"; if ($middleName!="") { $msg.=" $middleName"; } if ($firstName!="") { $msg.="\n\n

Name : $firstName $lastName"; } if ($companyName!="") { $msg.="\n\n

Company Name : $companyName"; } if ($gender!="") { $msg.="\n\n

Gender : $gender"; } if ($fhName!="") { $msg.="\n\n

Father /Husband Name : $fhName"; } if ($email!="") { $msg.="\n\n

Email : $email "; } if ($stdCode!="") { $msg.="\n\n

Phone : $stdCode $phoneNo"; } if ($profession!="") { $msg.="\n\n

Profession : $profession"; } if ($address!="") { $msg.="\n\n

Address : $address"; } if ($city!="") { $msg.="\n\n

City : $city"; } if ($pinCode!="") { $msg.="\n\n

Pin Code : $pinCode"; } if ($countryName!="") { $msg.="\n\n

Country : $countryName"; } if ($requirement!="") { $msg.="\n\n

Comments : ".nl2br($requirement); } if($_FILES[resume][name]!="") { $resume_name="document-".date("Y-m-d-H-i-s"); $attach=upload_file($resume_name,"resume","attachment_files"); $attachment="attachment_files/".$attach; mail_attachment ($fromMember, $adminEmail, $subject, $msgAdmin.$msg, $attachment); } else { mail($adminEmail,$subject,$msg,$headers); } $To=$email; $subject="Your Franchise Request at $websiteName"; $headers = "From: $adminEmail \n"; $headers .= "Reply-To: $adminEmail \r\n"; $headers .= "X-Mailer: PHP/". phpversion(); $headers .= "X-Priority: 3 \n"; $headers .= "MIME-version: 1.0\n"; $headers .= "Content-Type: text/html; charset=UTF-8\n"; $msg2="Dear ".$firstName." ". $lastName."

We have received your franchise request and we will get back to you soon

Your submitted details :
"; $msgThx="\n\n

Thanks & Regards

Mintage Admin"; if($_FILES[resume][name]!="") { $resume_name="document-".date("Y-m-d-H-i-s"); $attach=upload_file($resume_name,"resume","attachment_files"); $attachment="attachment_files/".$attach; mail_attachment ($adminEmail, $email, $subject, $msg2.$msg.$msgThx, $attachment); } else { mail($email,$subject,$msg2.$msg.$msgThx,$headers); } $mesg="Your details have been submitted successfully."; $action=""; echo ''; }else{ $message="Invalid security code."; } } if($firstName!='First Name' && $firstName!=''){ $firstName=$firstName; }else{ $firstName='First Name'; } if($lastName!='Last Name' && $lastName!=''){ $lastName=$lastName; }else{ $lastName='Last Name'; } if($stdCode!='STD Code' && $stdCode!='') { $stdCode=$stdCode; }else{ $stdCode='STD Code'; } if($phoneNo!='Phone Number' && $phoneNo!='') { $phoneNo=$phoneNo; }else{ $phoneNo='Phone Number'; } ?> Mintage India - Franchise|Traders of Agro Food Products,Antiques & Historical Items
Live Chat

Please Install Flash Player
Download from here

Please Install Flash Player
Download from here

Franchise

Franchise

'; }else if($_REQUEST['t']){ echo ''; } ?>
(*) are mandatory
'.$message.'
Your request has been sent successfully.
* Name :
Company Name :
Gender : Male Female
* Father /Husband Name :
* Email :
Phone :
*Mobile :
Profession :
Address :
City / State :
Pin Code :
* Country :
* Requirement :
Upload File :
*Security Code :