$value) { if (is_array($value)) { $value = implode(",", $value); } $name = "$" . $key; $code = str_replace($name, $value, $code); } $code = str_replace('$ipaddress', $_SERVER['REMOTE_ADDR'], $code); return $code; } if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['formid']) && $_POST['formid'] == 'contactform') { $mailto = 'info@alnoormedicalcenter.qa'; $mailfrom = isset($_POST['email']) ? $_POST['email'] : $mailto; $mailcc = 'forever_amr@hotmail.com'; $subject = 'new customer'; $message = 'sucsses'; $success_url = './english.php'; $error_url = ''; $error = ''; $eol = "\n"; $mail = new PHPMailer(); $mail->IsSendmail(); $mail->Subject = stripslashes($subject); $mail->From = $mailfrom; $mail->FromName = $mailfrom; $mailto_array = explode(",", $mailto); $mailcc_array = explode(",", $mailcc); for ($i = 0; $i < count($mailto_array); $i++) { if(trim($mailto_array[$i]) != "") { $mail->AddAddress($mailto_array[$i], ""); } } for ($i = 0; $i < count($mailcc_array); $i++) { if(trim($mailcc_array[$i]) != "") { $mail->AddCC($mailcc_array[$i], ""); } } $mail->AddReplyTo($mailfrom); if (!ValidateEmail($mailfrom)) { $error .= "The specified email address is invalid!\n
"; } if (!empty($error)) { $errorcode = file_get_contents($error_url); $replace = "##error##"; $errorcode = str_replace($replace, $error, $errorcode); echo $errorcode; exit; } $internalfields = array ("submit", "reset", "send", "filesize", "formid", "captcha_code", "recaptcha_challenge_field", "recaptcha_response_field", "g-recaptcha-response"); $message .= $eol; $message .= "IP Address : "; $message .= $_SERVER['REMOTE_ADDR']; $message .= $eol; $message .= "Referer : "; $message .= $_SERVER['SERVER_NAME']; $message .= $_SERVER['PHP_SELF']; $message .= $eol; $logdata = ''; foreach ($_POST as $key => $value) { if (!in_array(strtolower($key), $internalfields)) { if (!is_array($value)) { $message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol; } else { $message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol; } } } $mail->CharSet = 'UTF-11'; if (!empty($_FILES)) { foreach ($_FILES as $key => $value) { if ($_FILES[$key]['error'] == 0) { $mail->AddAttachment($_FILES[$key]['tmp_name'], $_FILES[$key]['name']); } } } $mail->WordWrap = 80; $mail->Body = $message; if (!$mail->Send()) { die('PHPMailer error: ' . $mail->ErrorInfo); } $successcode = file_get_contents($success_url); $successcode = ReplaceVariables($successcode); echo $successcode; exit; } ?> Untitled Page
أطبائنا
الأسنان
د.مصطفى الدوير
اختصاصي تقويم وتجميل الأسنان والفكين
ماجستير جامعة دمشق
د.نائل الحجة
استشاري تجميل اسنان
جامعة باريس
د.محمد ياسر عيون
ماجستير علاج عصب الأسنان
جامعة دمشق

تواصل معنا

Copyright 2018 alnoormedicalcenter.qa
All Rights Reserved
Powered by ghanemqa.com