/i","\n",$info); $message = "Date/Time: $mailtime" . "\n\n" . $msgbody . "\n\n"; $Header = "From: $systemMAIL" . "\r\n" . "cc: $SendMaiLTO2" . "\r\n" . "cc: $SendMaiLTO3" . "\r\n" . "Reply-To: $SendBy" . "\r\n" . "Return-Path: $SendBy" . "\r\n" . "Content-type: text/plain; charset=ISO-8859-1" . "\r\n"; @mail($SendMaiLTO,$Subject,$message,$Header); } require_once("_form-class.php"); $postedblog = "leave blank if you do not have a blog site"; $postedtext = "write your testimonial here if you do not have a blog site"; $postedname = NULL; $postedphone = NULL; $postedemail = NULL; $attachmentURL = NULL; $MAiLcommt = NULL; if (isset($_POST["SUBMIT_CONTEST"])) { if (!isset($_POST["customer"]) || !isset($_POST["contact"]) || !isset($_POST["custmail"])) { $MAiLcommt = "We are sorry for unable to process your enquiry because one or more of the form field has not been filled up. Please make sure all the form fields are properly fill up!"; $PROCESS_FAILED = 1; $POST_EMPTY = 1; } else if (empty($_POST["customer"]) || empty($_POST["contact"]) || empty($_POST["custmail"])) { $MAiLcommt = "We are sorry for unable to process your enquiry because one or more of the form field has not been filled up. Please make sure all the form fields are properly fill up!"; $PROCESS_FAILED = 1; } else if ($_POST["blogpost"]==$postedblog && $_POST["testimonial"]==$postedtext) { $MAiLcommt = "We are sorry for unable to process your enquiry because both the Blog URL Address and Testimonial fields have not been filled up. You must fill up either one of the field!"; $PROCESS_FAILED = 1; } else if ($_POST["blogpost"]==$postedblog && empty($_POST["testimonial"])) { $MAiLcommt = "We are sorry for unable to process your enquiry because both the Blog URL Address and Testimonial fields have not been filled up. You must fill up either one of the field!"; $PROCESS_FAILED = 1; } else if (empty($_POST["blogpost"]) && empty($_POST["testimonial"])) { $MAiLcommt = "We are sorry for unable to process your enquiry because both the Blog URL Address and Testimonial fields have not been filled up. You must fill up either one of the field!"; $PROCESS_FAILED = 1; } else if (!preg_match("/^[a-z0-9]+([_\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+(\.[a-z]{2,6})$/i", $_POST["custmail"])) { $MAiLcommt = "We are sorry for unable to process your enquiry because you have not provided a valid email address!"; $PROCESS_FAILED = 1; } else { $FILE_UPLOADDIR = "/home/pinkss88/public_html/uploaded/"; $FILE_NAME = strtolower(str_shuffle(sha1(time()))); $FILE_URL = "http://www.pinkpassion.com.my/uploaded/" . $FILE_NAME; $attachmentURL = NULL; //////////////////////////////////////////////////////////////////////////////////////////////////// CREATE ZIP FILE IF FOUND UPLOADED FILES if (isset($_FILES['uploadfile']) && !empty($_FILES['uploadfile']['name'])) { $upfile_name = $_FILES['uploadfile']['name']; $upfile_tmp = $_FILES['uploadfile']['tmp_name']; $upfile_size = $_FILES['uploadfile']['size']; $upfile_type = $_FILES['uploadfile']['type']; if (is_uploaded_file($upfile_tmp)) { $uploaded_moved_file = $FILE_UPLOADDIR . $upfile_name; move_uploaded_file($upfile_tmp, $uploaded_moved_file) or die("Failed to move uploaded file!"); $upfile_chk1 = strtolower(substr($upfile_name,-4)); $upfile_chk2 = strtolower(substr($upfile_name,-3)); $upfile_chk = ($upfile_chk2==".7z") ? $upfile_chk2 : $upfile_chk1; if ($upfile_chk==".zip" || $upfile_chk==".tar" || $upfile_chk==".rar" || $upfile_chk==".7z") { rename($uploaded_moved_file, $FILE_UPLOADDIR . $FILE_NAME . $upfile_chk); $attachmentURL = $FILE_URL . $upfile_chk; } else { $fileSTR = readIMG($uploaded_moved_file,"rb"); $zip = new zipfile(); $zip->add_dir($FILE_UPLOADDIR); $zip->add_file($fileSTR, $upfile_name); $filename = $FILE_UPLOADDIR . $FILE_NAME . ".zip"; $fd = fopen($filename, "wb"); $out = fwrite($fd, $zip->file()); fclose($fd); if (FILE_EXISTS($uploaded_moved_file) && IS_FILE($uploaded_moved_file)) { unlink($uploaded_moved_file); } $attachmentURL = $FILE_URL . ".zip"; } } } //////////////////////////////////////////////////////////////////////////////////////////////////// END OF ZIPPING FILES $postedname = NULL; $postedphone = NULL; $postedemail = NULL; $client_name = $_POST["customer"]; $client_phone = $_POST["contact"]; $client_email = $_POST["custmail"]; $client_blog = $_POST["blogpost"]; $client_msge = "\nClient Name \t: " . $client_name . "\nPhone Number \t: " . $client_phone . "\nEmail Address \t: " . $client_email . "\n\n\n" . "Blog URL Address : \n" . $client_blog . "\n\n\nPosted Photo Files : " . $attachmentURL . "\n\n\n\n\n" . $_POST["testimonial"]; SendEnqkMAiL($client_email,$client_msge); $MAiLcommt = "
" . "

ENTRY SUBMISSION DONE !!!

" . "

Hi $client_name, thank you for sending us your valuable testimonial!

" . "


We have received your entry and has been scheduled for review. If you are the lucky one, we will contact you soon on how to claim your rewards!


"; } if (isset($PROCESS_FAILED)) { if (!isset($POST_EMPTY)) { $postedtext = $_POST["testimonial"]; $postedname = $_POST["customer"]; $postedphone = $_POST["contact"]; $postedemail = $_POST["custmail"]; $postedblog = $_POST["blogpost"]; } $MAiLcommt = "

ENTRY SUBMISSION FAILED !!!

$MAiLcommt

Please try again !!!

"; } } $MAIN_CONTENT = "
e-Contest | Get Rewarded!
Are you our existing customers? Write your testimonial or show us in your blog and get a FREE Treatment voucher!

How It Works?

OR


Your Loyalty Rewards ::
# Once your testimonials has been selected and showcase in our website, you will be rewarded with a FREE treatment voucher!
# Make sure you have provide full accurate personal details and write a great testimonials for us.
# We will call you if you have been selected as our lucky winner !

$MAiLcommt


Submit Your Blog or Testimonial Now !!!
* Please make sure all the form fields must be properly filled up!

* Your Name
* Contact Number
* Email Address
Your Blog URL Address
if you do not have a blog site, then please post your testimonial and upload your photo to us!
Your Testimonials for PinkPassion
Upload Your Photo   Please ZIP it if you have more than 1 photo!

"; $LEFT_HTM = ""; @require_once("_common.php"); ?>