$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'] == 'accordion1')
{
$mailto = 'sales@carvedimpressions.com';
$mailfrom = isset($_POST['email']) ? $_POST['email'] : $mailto;
$subject = 'Question about 24x30 Key Single Upright-Grand';
$message = '';
$success_url = './../Info/formsuccess.html';
$error_url = './../Info/formerror.html';
$autoresponder_from = 'sales@carvedimpressions.com';
$autoresponder_name = 'Sales Manager';
$autoresponder_to = isset($_POST['email']) ? $_POST['email'] : $mailfrom;
$autoresponder_subject = 'Thank you for your question';
$autoresponder_message = 'We sincerely appreciate your question concerning our products and will make every attempt to answer your question within the next 24-48 hours. However, due to unforseen circumstances, we sometimes are not able to answer all of our inbound messages all at once. Please be patient with us and we will try and get to your message as soon as we are able. Thank you very much! ';
$eol = "\n";
$error = '';
$internalfields = array ("submit", "reset", "send", "filesize", "formid", "captcha_code", "recaptcha_challenge_field", "recaptcha_response_field", "g-recaptcha-response");
$mail = new PHPMailer(true);
try
{
$mail->Subject = stripslashes($subject);
$mail->From = $mailfrom;
$mail->FromName = $mailfrom;
$mailto_array = explode(",", $mailto);
for ($i = 0; $i < count($mailto_array); $i++)
{
if(trim($mailto_array[$i]) != "")
{
$mail->AddAddress($mailto_array[$i], "");
}
}
if (!ValidateEmail($mailfrom))
{
$error .= "The specified email address (" . $mailfrom . ") is invalid!\n
";
throw new Exception($error);
}
$mail->AddReplyTo($mailfrom);
$message .= $eol;
$message .= "IP Address : ";
$message .= $_SERVER['REMOTE_ADDR'];
$message .= $eol;
foreach ($_POST as $key => $value)
{
if (!in_array(strtolower($key), $internalfields))
{
if (is_array($value))
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol;
}
else
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol;
}
}
}
$mail->CharSet = 'ISO-8859-1';
if (!empty($_FILES))
{
foreach ($_FILES as $key => $value)
{
if ($_FILES[$key]['error'] == 0)
{
if (is_array($_FILES[$key]['name']))
{
$count = count($_FILES[$key]['name']);
for ($file = 0; $file < $count; $file++)
{
$mail->AddAttachment($_FILES[$key]['tmp_name'][$file], $_FILES[$key]['name'][$file]);
}
}
else
{
$mail->AddAttachment($_FILES[$key]['tmp_name'], $_FILES[$key]['name']);
}
}
}
}
$mail->WordWrap = 80;
$mail->Body = $message;
$mail->Send();
if (!ValidateEmail($autoresponder_from))
{
$error .= "The specified autoresponder email address (" . $autoresponder_from . ") is invalid!\n
";
throw new Exception($error);
}
$mail->ClearAddresses();
$mail->ClearAttachments();
$autoresponder_subject = ReplaceVariables($autoresponder_subject);
$mail->Subject = stripslashes($autoresponder_subject);
$mail->From = $autoresponder_from;
$mail->FromName = $autoresponder_name;
$mail->AddAddress($autoresponder_to, "");
$mail->AddReplyTo($autoresponder_from);
$autoresponder_message = ReplaceVariables($autoresponder_message);
$autoresponder_message = stripslashes($autoresponder_message);
$mail->MsgHTML($autoresponder_message);
$mail->IsHTML(true);
$mail->Send();
header('Location: '.$success_url);
}
catch (Exception $e)
{
$errorcode = file_get_contents($error_url);
$replace = "##error##";
$errorcode = str_replace($replace, $e->getMessage(), $errorcode);
echo $errorcode;
}
exit;
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['formid']) && $_POST['formid'] == 'accordion2')
{
$mailto = 'sales@carvedimpressions.com';
$mailfrom = isset($_POST['email']) ? $_POST['email'] : $mailto;
$subject = 'Question about 30x60 Frankin Upright-Grand';
$message = '';
$success_url = './../Info/formsuccess.html';
$error_url = './../Info/formerror.html';
$autoresponder_from = 'sales@carvedimpressions.com';
$autoresponder_name = 'Sales Manager';
$autoresponder_to = isset($_POST['email']) ? $_POST['email'] : $mailfrom;
$autoresponder_subject = 'Thank you for your question';
$autoresponder_message = 'We sincerely appreciate your question concerning our products and will make every attempt to answer your question within the next 24-48 hours. However, due to unforseen circumstances, we sometimes are not able to answer all of our inbound messages all at once. Please be patient with us and we will try and get to your message as soon as we are able. Thank you very much! ';
$eol = "\n";
$error = '';
$internalfields = array ("submit", "reset", "send", "filesize", "formid", "captcha_code", "recaptcha_challenge_field", "recaptcha_response_field", "g-recaptcha-response");
$mail = new PHPMailer(true);
try
{
$mail->Subject = stripslashes($subject);
$mail->From = $mailfrom;
$mail->FromName = $mailfrom;
$mailto_array = explode(",", $mailto);
for ($i = 0; $i < count($mailto_array); $i++)
{
if(trim($mailto_array[$i]) != "")
{
$mail->AddAddress($mailto_array[$i], "");
}
}
if (!ValidateEmail($mailfrom))
{
$error .= "The specified email address (" . $mailfrom . ") is invalid!\n
";
throw new Exception($error);
}
$mail->AddReplyTo($mailfrom);
$message .= $eol;
$message .= "IP Address : ";
$message .= $_SERVER['REMOTE_ADDR'];
$message .= $eol;
foreach ($_POST as $key => $value)
{
if (!in_array(strtolower($key), $internalfields))
{
if (is_array($value))
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol;
}
else
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol;
}
}
}
$mail->CharSet = 'ISO-8859-1';
if (!empty($_FILES))
{
foreach ($_FILES as $key => $value)
{
if ($_FILES[$key]['error'] == 0)
{
if (is_array($_FILES[$key]['name']))
{
$count = count($_FILES[$key]['name']);
for ($file = 0; $file < $count; $file++)
{
$mail->AddAttachment($_FILES[$key]['tmp_name'][$file], $_FILES[$key]['name'][$file]);
}
}
else
{
$mail->AddAttachment($_FILES[$key]['tmp_name'], $_FILES[$key]['name']);
}
}
}
}
$mail->WordWrap = 80;
$mail->Body = $message;
$mail->Send();
if (!ValidateEmail($autoresponder_from))
{
$error .= "The specified autoresponder email address (" . $autoresponder_from . ") is invalid!\n
";
throw new Exception($error);
}
$mail->ClearAddresses();
$mail->ClearAttachments();
$autoresponder_subject = ReplaceVariables($autoresponder_subject);
$mail->Subject = stripslashes($autoresponder_subject);
$mail->From = $autoresponder_from;
$mail->FromName = $autoresponder_name;
$mail->AddAddress($autoresponder_to, "");
$mail->AddReplyTo($autoresponder_from);
$autoresponder_message = ReplaceVariables($autoresponder_message);
$autoresponder_message = stripslashes($autoresponder_message);
$mail->MsgHTML($autoresponder_message);
$mail->IsHTML(true);
$mail->Send();
header('Location: '.$success_url);
}
catch (Exception $e)
{
$errorcode = file_get_contents($error_url);
$replace = "##error##";
$errorcode = str_replace($replace, $e->getMessage(), $errorcode);
echo $errorcode;
}
exit;
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['formid']) && $_POST['formid'] == 'accordion3')
{
$mailto = 'sales@carvedimpressions.com';
$mailfrom = isset($_POST['email']) ? $_POST['email'] : $mailto;
$subject = 'Question about 26x36 Teardrop Upright-Grand';
$message = '';
$success_url = './../Info/formsuccess.html';
$error_url = './../Info/formerror.html';
$autoresponder_from = 'sales@carvedimpressions.com';
$autoresponder_name = 'Sales Manager';
$autoresponder_to = isset($_POST['email']) ? $_POST['email'] : $mailfrom;
$autoresponder_subject = 'Thank you for your question';
$autoresponder_message = 'We sincerely appreciate your question concerning our products and will make every attempt to answer your question within the next 24-48 hours. However, due to unforseen circumstances, we sometimes are not able to answer all of our inbound messages all at once. Please be patient with us and we will try and get to your message as soon as we are able. Thank you very much! ';
$eol = "\n";
$error = '';
$internalfields = array ("submit", "reset", "send", "filesize", "formid", "captcha_code", "recaptcha_challenge_field", "recaptcha_response_field", "g-recaptcha-response");
$mail = new PHPMailer(true);
try
{
$mail->Subject = stripslashes($subject);
$mail->From = $mailfrom;
$mail->FromName = $mailfrom;
$mailto_array = explode(",", $mailto);
for ($i = 0; $i < count($mailto_array); $i++)
{
if(trim($mailto_array[$i]) != "")
{
$mail->AddAddress($mailto_array[$i], "");
}
}
if (!ValidateEmail($mailfrom))
{
$error .= "The specified email address (" . $mailfrom . ") is invalid!\n
";
throw new Exception($error);
}
$mail->AddReplyTo($mailfrom);
$message .= $eol;
$message .= "IP Address : ";
$message .= $_SERVER['REMOTE_ADDR'];
$message .= $eol;
foreach ($_POST as $key => $value)
{
if (!in_array(strtolower($key), $internalfields))
{
if (is_array($value))
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol;
}
else
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol;
}
}
}
$mail->CharSet = 'ISO-8859-1';
if (!empty($_FILES))
{
foreach ($_FILES as $key => $value)
{
if ($_FILES[$key]['error'] == 0)
{
if (is_array($_FILES[$key]['name']))
{
$count = count($_FILES[$key]['name']);
for ($file = 0; $file < $count; $file++)
{
$mail->AddAttachment($_FILES[$key]['tmp_name'][$file], $_FILES[$key]['name'][$file]);
}
}
else
{
$mail->AddAttachment($_FILES[$key]['tmp_name'], $_FILES[$key]['name']);
}
}
}
}
$mail->WordWrap = 80;
$mail->Body = $message;
$mail->Send();
if (!ValidateEmail($autoresponder_from))
{
$error .= "The specified autoresponder email address (" . $autoresponder_from . ") is invalid!\n
";
throw new Exception($error);
}
$mail->ClearAddresses();
$mail->ClearAttachments();
$autoresponder_subject = ReplaceVariables($autoresponder_subject);
$mail->Subject = stripslashes($autoresponder_subject);
$mail->From = $autoresponder_from;
$mail->FromName = $autoresponder_name;
$mail->AddAddress($autoresponder_to, "");
$mail->AddReplyTo($autoresponder_from);
$autoresponder_message = ReplaceVariables($autoresponder_message);
$autoresponder_message = stripslashes($autoresponder_message);
$mail->MsgHTML($autoresponder_message);
$mail->IsHTML(true);
$mail->Send();
header('Location: '.$success_url);
}
catch (Exception $e)
{
$errorcode = file_get_contents($error_url);
$replace = "##error##";
$errorcode = str_replace($replace, $e->getMessage(), $errorcode);
echo $errorcode;
}
exit;
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['formid']) && $_POST['formid'] == 'accordion4')
{
$mailto = 'sales@carvedimpressions.com';
$mailfrom = isset($_POST['email']) ? $_POST['email'] : $mailto;
$subject = 'Question about 30x26 French Curve Single Upright-Grand';
$message = '';
$success_url = './../Info/formsuccess.html';
$error_url = './../Info/formerror.html';
$autoresponder_from = 'sales@carvedimpressions.com';
$autoresponder_name = 'Sales Manager';
$autoresponder_to = isset($_POST['email']) ? $_POST['email'] : $mailfrom;
$autoresponder_subject = 'Thank you for your question';
$autoresponder_message = 'We sincerely appreciate your question concerning our products and will make every attempt to answer your question within the next 24-48 hours. However, due to unforseen circumstances, we sometimes are not able to answer all of our inbound messages all at once. Please be patient with us and we will try and get to your message as soon as we are able. Thank you very much! ';
$eol = "\n";
$error = '';
$internalfields = array ("submit", "reset", "send", "filesize", "formid", "captcha_code", "recaptcha_challenge_field", "recaptcha_response_field", "g-recaptcha-response");
$mail = new PHPMailer(true);
try
{
$mail->Subject = stripslashes($subject);
$mail->From = $mailfrom;
$mail->FromName = $mailfrom;
$mailto_array = explode(",", $mailto);
for ($i = 0; $i < count($mailto_array); $i++)
{
if(trim($mailto_array[$i]) != "")
{
$mail->AddAddress($mailto_array[$i], "");
}
}
if (!ValidateEmail($mailfrom))
{
$error .= "The specified email address (" . $mailfrom . ") is invalid!\n
";
throw new Exception($error);
}
$mail->AddReplyTo($mailfrom);
$message .= $eol;
$message .= "IP Address : ";
$message .= $_SERVER['REMOTE_ADDR'];
$message .= $eol;
foreach ($_POST as $key => $value)
{
if (!in_array(strtolower($key), $internalfields))
{
if (is_array($value))
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol;
}
else
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol;
}
}
}
$mail->CharSet = 'ISO-8859-1';
if (!empty($_FILES))
{
foreach ($_FILES as $key => $value)
{
if ($_FILES[$key]['error'] == 0)
{
if (is_array($_FILES[$key]['name']))
{
$count = count($_FILES[$key]['name']);
for ($file = 0; $file < $count; $file++)
{
$mail->AddAttachment($_FILES[$key]['tmp_name'][$file], $_FILES[$key]['name'][$file]);
}
}
else
{
$mail->AddAttachment($_FILES[$key]['tmp_name'], $_FILES[$key]['name']);
}
}
}
}
$mail->WordWrap = 80;
$mail->Body = $message;
$mail->Send();
if (!ValidateEmail($autoresponder_from))
{
$error .= "The specified autoresponder email address (" . $autoresponder_from . ") is invalid!\n
";
throw new Exception($error);
}
$mail->ClearAddresses();
$mail->ClearAttachments();
$autoresponder_subject = ReplaceVariables($autoresponder_subject);
$mail->Subject = stripslashes($autoresponder_subject);
$mail->From = $autoresponder_from;
$mail->FromName = $autoresponder_name;
$mail->AddAddress($autoresponder_to, "");
$mail->AddReplyTo($autoresponder_from);
$autoresponder_message = ReplaceVariables($autoresponder_message);
$autoresponder_message = stripslashes($autoresponder_message);
$mail->MsgHTML($autoresponder_message);
$mail->IsHTML(true);
$mail->Send();
header('Location: '.$success_url);
}
catch (Exception $e)
{
$errorcode = file_get_contents($error_url);
$replace = "##error##";
$errorcode = str_replace($replace, $e->getMessage(), $errorcode);
echo $errorcode;
}
exit;
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['formid']) && $_POST['formid'] == 'accordion6')
{
$mailto = 'sales@carvedimpressions.com';
$mailfrom = isset($_POST['email']) ? $_POST['email'] : $mailto;
$subject = 'Question about 24x28 Block 'O' Upright-Grand';
$message = '';
$success_url = './../Info/formsuccess.html';
$error_url = './../Info/formerror.html';
$autoresponder_from = 'sales@carvedimpressions.com';
$autoresponder_name = 'Sales Manager';
$autoresponder_to = isset($_POST['email']) ? $_POST['email'] : $mailfrom;
$autoresponder_subject = 'Thank you for your question';
$autoresponder_message = 'We sincerely appreciate your question concerning our products and will make every attempt to answer your question within the next 24-48 hours. However, due to unforseen circumstances, we sometimes are not able to answer all of our inbound messages all at once. Please be patient with us and we will try and get to your message as soon as we are able. Thank you very much! ';
$eol = "\n";
$error = '';
$internalfields = array ("submit", "reset", "send", "filesize", "formid", "captcha_code", "recaptcha_challenge_field", "recaptcha_response_field", "g-recaptcha-response");
$mail = new PHPMailer(true);
try
{
$mail->Subject = stripslashes($subject);
$mail->From = $mailfrom;
$mail->FromName = $mailfrom;
$mailto_array = explode(",", $mailto);
for ($i = 0; $i < count($mailto_array); $i++)
{
if(trim($mailto_array[$i]) != "")
{
$mail->AddAddress($mailto_array[$i], "");
}
}
if (!ValidateEmail($mailfrom))
{
$error .= "The specified email address (" . $mailfrom . ") is invalid!\n
";
throw new Exception($error);
}
$mail->AddReplyTo($mailfrom);
$message .= $eol;
$message .= "IP Address : ";
$message .= $_SERVER['REMOTE_ADDR'];
$message .= $eol;
foreach ($_POST as $key => $value)
{
if (!in_array(strtolower($key), $internalfields))
{
if (is_array($value))
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol;
}
else
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol;
}
}
}
$mail->CharSet = 'ISO-8859-1';
if (!empty($_FILES))
{
foreach ($_FILES as $key => $value)
{
if ($_FILES[$key]['error'] == 0)
{
if (is_array($_FILES[$key]['name']))
{
$count = count($_FILES[$key]['name']);
for ($file = 0; $file < $count; $file++)
{
$mail->AddAttachment($_FILES[$key]['tmp_name'][$file], $_FILES[$key]['name'][$file]);
}
}
else
{
$mail->AddAttachment($_FILES[$key]['tmp_name'], $_FILES[$key]['name']);
}
}
}
}
$mail->WordWrap = 80;
$mail->Body = $message;
$mail->Send();
if (!ValidateEmail($autoresponder_from))
{
$error .= "The specified autoresponder email address (" . $autoresponder_from . ") is invalid!\n
";
throw new Exception($error);
}
$mail->ClearAddresses();
$mail->ClearAttachments();
$autoresponder_subject = ReplaceVariables($autoresponder_subject);
$mail->Subject = stripslashes($autoresponder_subject);
$mail->From = $autoresponder_from;
$mail->FromName = $autoresponder_name;
$mail->AddAddress($autoresponder_to, "");
$mail->AddReplyTo($autoresponder_from);
$autoresponder_message = ReplaceVariables($autoresponder_message);
$autoresponder_message = stripslashes($autoresponder_message);
$mail->MsgHTML($autoresponder_message);
$mail->IsHTML(true);
$mail->Send();
header('Location: '.$success_url);
}
catch (Exception $e)
{
$errorcode = file_get_contents($error_url);
$replace = "##error##";
$errorcode = str_replace($replace, $e->getMessage(), $errorcode);
echo $errorcode;
}
exit;
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['formid']) && $_POST['formid'] == 'accordion5')
{
$mailto = 'sales@carvedimpressions.com';
$mailfrom = isset($_POST['email']) ? $_POST['email'] : $mailto;
$subject = 'Question about 24x26 Single Heart Upright-Grand';
$message = '';
$success_url = './../Info/formsuccess.html';
$error_url = './../Info/formerror.html';
$autoresponder_from = 'sales@carvedimpressions.com';
$autoresponder_name = 'Sales Manager';
$autoresponder_to = isset($_POST['email']) ? $_POST['email'] : $mailfrom;
$autoresponder_subject = 'Thank you for your question';
$autoresponder_message = 'We sincerely appreciate your question concerning our products and will make every attempt to answer your question within the next 24-48 hours. However, due to unforseen circumstances, we sometimes are not able to answer all of our inbound messages all at once. Please be patient with us and we will try and get to your message as soon as we are able. Thank you very much! ';
$eol = "\n";
$error = '';
$internalfields = array ("submit", "reset", "send", "filesize", "formid", "captcha_code", "recaptcha_challenge_field", "recaptcha_response_field", "g-recaptcha-response");
$mail = new PHPMailer(true);
try
{
$mail->Subject = stripslashes($subject);
$mail->From = $mailfrom;
$mail->FromName = $mailfrom;
$mailto_array = explode(",", $mailto);
for ($i = 0; $i < count($mailto_array); $i++)
{
if(trim($mailto_array[$i]) != "")
{
$mail->AddAddress($mailto_array[$i], "");
}
}
if (!ValidateEmail($mailfrom))
{
$error .= "The specified email address (" . $mailfrom . ") is invalid!\n
";
throw new Exception($error);
}
$mail->AddReplyTo($mailfrom);
$message .= $eol;
$message .= "IP Address : ";
$message .= $_SERVER['REMOTE_ADDR'];
$message .= $eol;
foreach ($_POST as $key => $value)
{
if (!in_array(strtolower($key), $internalfields))
{
if (is_array($value))
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol;
}
else
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol;
}
}
}
$mail->CharSet = 'ISO-8859-1';
if (!empty($_FILES))
{
foreach ($_FILES as $key => $value)
{
if ($_FILES[$key]['error'] == 0)
{
if (is_array($_FILES[$key]['name']))
{
$count = count($_FILES[$key]['name']);
for ($file = 0; $file < $count; $file++)
{
$mail->AddAttachment($_FILES[$key]['tmp_name'][$file], $_FILES[$key]['name'][$file]);
}
}
else
{
$mail->AddAttachment($_FILES[$key]['tmp_name'], $_FILES[$key]['name']);
}
}
}
}
$mail->WordWrap = 80;
$mail->Body = $message;
$mail->Send();
if (!ValidateEmail($autoresponder_from))
{
$error .= "The specified autoresponder email address (" . $autoresponder_from . ") is invalid!\n
";
throw new Exception($error);
}
$mail->ClearAddresses();
$mail->ClearAttachments();
$autoresponder_subject = ReplaceVariables($autoresponder_subject);
$mail->Subject = stripslashes($autoresponder_subject);
$mail->From = $autoresponder_from;
$mail->FromName = $autoresponder_name;
$mail->AddAddress($autoresponder_to, "");
$mail->AddReplyTo($autoresponder_from);
$autoresponder_message = ReplaceVariables($autoresponder_message);
$autoresponder_message = stripslashes($autoresponder_message);
$mail->MsgHTML($autoresponder_message);
$mail->IsHTML(true);
$mail->Send();
header('Location: '.$success_url);
}
catch (Exception $e)
{
$errorcode = file_get_contents($error_url);
$replace = "##error##";
$errorcode = str_replace($replace, $e->getMessage(), $errorcode);
echo $errorcode;
}
exit;
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['formid']) && $_POST['formid'] == 'accordion7')
{
$mailto = 'sales@carvedimpressions.com';
$mailfrom = isset($_POST['email']) ? $_POST['email'] : $mailto;
$subject = '20x20 Polished Upright-Grand';
$message = '';
$success_url = './../Info/formsuccess.html';
$error_url = './../Info/formerror.html';
$autoresponder_from = 'sales@carvedimpressions.com';
$autoresponder_name = 'Sales Manager';
$autoresponder_to = isset($_POST['email']) ? $_POST['email'] : $mailfrom;
$autoresponder_subject = 'Thank you for your question';
$autoresponder_message = 'We sincerely appreciate your question concerning our products and will make every attempt to answer your question within the next 24-48 hours. However, due to unforseen circumstances, we sometimes are not able to answer all of our inbound messages all at once. Please be patient with us and we will try and get to your message as soon as we are able. Thank you very much! ';
$eol = "\n";
$error = '';
$internalfields = array ("submit", "reset", "send", "filesize", "formid", "captcha_code", "recaptcha_challenge_field", "recaptcha_response_field", "g-recaptcha-response");
$mail = new PHPMailer(true);
try
{
$mail->Subject = stripslashes($subject);
$mail->From = $mailfrom;
$mail->FromName = $mailfrom;
$mailto_array = explode(",", $mailto);
for ($i = 0; $i < count($mailto_array); $i++)
{
if(trim($mailto_array[$i]) != "")
{
$mail->AddAddress($mailto_array[$i], "");
}
}
if (!ValidateEmail($mailfrom))
{
$error .= "The specified email address (" . $mailfrom . ") is invalid!\n
";
throw new Exception($error);
}
$mail->AddReplyTo($mailfrom);
$message .= $eol;
$message .= "IP Address : ";
$message .= $_SERVER['REMOTE_ADDR'];
$message .= $eol;
foreach ($_POST as $key => $value)
{
if (!in_array(strtolower($key), $internalfields))
{
if (is_array($value))
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol;
}
else
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol;
}
}
}
$mail->CharSet = 'ISO-8859-1';
if (!empty($_FILES))
{
foreach ($_FILES as $key => $value)
{
if ($_FILES[$key]['error'] == 0)
{
if (is_array($_FILES[$key]['name']))
{
$count = count($_FILES[$key]['name']);
for ($file = 0; $file < $count; $file++)
{
$mail->AddAttachment($_FILES[$key]['tmp_name'][$file], $_FILES[$key]['name'][$file]);
}
}
else
{
$mail->AddAttachment($_FILES[$key]['tmp_name'], $_FILES[$key]['name']);
}
}
}
}
$mail->WordWrap = 80;
$mail->Body = $message;
$mail->Send();
if (!ValidateEmail($autoresponder_from))
{
$error .= "The specified autoresponder email address (" . $autoresponder_from . ") is invalid!\n
";
throw new Exception($error);
}
$mail->ClearAddresses();
$mail->ClearAttachments();
$autoresponder_subject = ReplaceVariables($autoresponder_subject);
$mail->Subject = stripslashes($autoresponder_subject);
$mail->From = $autoresponder_from;
$mail->FromName = $autoresponder_name;
$mail->AddAddress($autoresponder_to, "");
$mail->AddReplyTo($autoresponder_from);
$autoresponder_message = ReplaceVariables($autoresponder_message);
$autoresponder_message = stripslashes($autoresponder_message);
$mail->MsgHTML($autoresponder_message);
$mail->IsHTML(true);
$mail->Send();
header('Location: '.$success_url);
}
catch (Exception $e)
{
$errorcode = file_get_contents($error_url);
$replace = "##error##";
$errorcode = str_replace($replace, $e->getMessage(), $errorcode);
echo $errorcode;
}
exit;
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['formid']) && $_POST['formid'] == 'accordion8')
{
$mailto = 'sales@carvedimpressions.com';
$mailfrom = isset($_POST['email']) ? $_POST['email'] : $mailto;
$subject = 'Question about 24x24 Polished Upright-Grand';
$message = '';
$success_url = './../Info/formsuccess.html';
$error_url = './../Info/formerror.html';
$autoresponder_from = 'sales@carvedimpressions.com';
$autoresponder_name = 'Sales Manager';
$autoresponder_to = isset($_POST['email']) ? $_POST['email'] : $mailfrom;
$autoresponder_subject = 'Thank you for your question';
$autoresponder_message = 'We sincerely appreciate your question concerning our products and will make every attempt to answer your question within the next 24-48 hours. However, due to unforseen circumstances, we sometimes are not able to answer all of our inbound messages all at once. Please be patient with us and we will try and get to your message as soon as we are able. Thank you very much! ';
$eol = "\n";
$error = '';
$internalfields = array ("submit", "reset", "send", "filesize", "formid", "captcha_code", "recaptcha_challenge_field", "recaptcha_response_field", "g-recaptcha-response");
$mail = new PHPMailer(true);
try
{
$mail->Subject = stripslashes($subject);
$mail->From = $mailfrom;
$mail->FromName = $mailfrom;
$mailto_array = explode(",", $mailto);
for ($i = 0; $i < count($mailto_array); $i++)
{
if(trim($mailto_array[$i]) != "")
{
$mail->AddAddress($mailto_array[$i], "");
}
}
if (!ValidateEmail($mailfrom))
{
$error .= "The specified email address (" . $mailfrom . ") is invalid!\n
";
throw new Exception($error);
}
$mail->AddReplyTo($mailfrom);
$message .= $eol;
$message .= "IP Address : ";
$message .= $_SERVER['REMOTE_ADDR'];
$message .= $eol;
foreach ($_POST as $key => $value)
{
if (!in_array(strtolower($key), $internalfields))
{
if (is_array($value))
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol;
}
else
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol;
}
}
}
$mail->CharSet = 'ISO-8859-1';
if (!empty($_FILES))
{
foreach ($_FILES as $key => $value)
{
if ($_FILES[$key]['error'] == 0)
{
if (is_array($_FILES[$key]['name']))
{
$count = count($_FILES[$key]['name']);
for ($file = 0; $file < $count; $file++)
{
$mail->AddAttachment($_FILES[$key]['tmp_name'][$file], $_FILES[$key]['name'][$file]);
}
}
else
{
$mail->AddAttachment($_FILES[$key]['tmp_name'], $_FILES[$key]['name']);
}
}
}
}
$mail->WordWrap = 80;
$mail->Body = $message;
$mail->Send();
if (!ValidateEmail($autoresponder_from))
{
$error .= "The specified autoresponder email address (" . $autoresponder_from . ") is invalid!\n
";
throw new Exception($error);
}
$mail->ClearAddresses();
$mail->ClearAttachments();
$autoresponder_subject = ReplaceVariables($autoresponder_subject);
$mail->Subject = stripslashes($autoresponder_subject);
$mail->From = $autoresponder_from;
$mail->FromName = $autoresponder_name;
$mail->AddAddress($autoresponder_to, "");
$mail->AddReplyTo($autoresponder_from);
$autoresponder_message = ReplaceVariables($autoresponder_message);
$autoresponder_message = stripslashes($autoresponder_message);
$mail->MsgHTML($autoresponder_message);
$mail->IsHTML(true);
$mail->Send();
header('Location: '.$success_url);
}
catch (Exception $e)
{
$errorcode = file_get_contents($error_url);
$replace = "##error##";
$errorcode = str_replace($replace, $e->getMessage(), $errorcode);
echo $errorcode;
}
exit;
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['formid']) && $_POST['formid'] == 'accordion10')
{
$mailto = 'sales@carvedimpressions.com';
$mailfrom = isset($_POST['email']) ? $_POST['email'] : $mailto;
$subject = 'Question about 18x20 Polished Upright-Grand';
$message = '';
$success_url = './../Info/formsuccess.html';
$error_url = './../Info/formerror.html';
$autoresponder_from = 'sales@carvedimpressions.com';
$autoresponder_name = 'Sales Manager';
$autoresponder_to = isset($_POST['email']) ? $_POST['email'] : $mailfrom;
$autoresponder_subject = 'Thank you for your question';
$autoresponder_message = 'We sincerely appreciate your question concerning our products and will make every attempt to answer your question within the next 24-48 hours. However, due to unforseen circumstances, we sometimes are not able to answer all of our inbound messages all at once. Please be patient with us and we will try and get to your message as soon as we are able. Thank you very much! ';
$eol = "\n";
$error = '';
$internalfields = array ("submit", "reset", "send", "filesize", "formid", "captcha_code", "recaptcha_challenge_field", "recaptcha_response_field", "g-recaptcha-response");
$mail = new PHPMailer(true);
try
{
$mail->Subject = stripslashes($subject);
$mail->From = $mailfrom;
$mail->FromName = $mailfrom;
$mailto_array = explode(",", $mailto);
for ($i = 0; $i < count($mailto_array); $i++)
{
if(trim($mailto_array[$i]) != "")
{
$mail->AddAddress($mailto_array[$i], "");
}
}
if (!ValidateEmail($mailfrom))
{
$error .= "The specified email address (" . $mailfrom . ") is invalid!\n
";
throw new Exception($error);
}
$mail->AddReplyTo($mailfrom);
$message .= $eol;
$message .= "IP Address : ";
$message .= $_SERVER['REMOTE_ADDR'];
$message .= $eol;
foreach ($_POST as $key => $value)
{
if (!in_array(strtolower($key), $internalfields))
{
if (is_array($value))
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol;
}
else
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol;
}
}
}
$mail->CharSet = 'ISO-8859-1';
if (!empty($_FILES))
{
foreach ($_FILES as $key => $value)
{
if ($_FILES[$key]['error'] == 0)
{
if (is_array($_FILES[$key]['name']))
{
$count = count($_FILES[$key]['name']);
for ($file = 0; $file < $count; $file++)
{
$mail->AddAttachment($_FILES[$key]['tmp_name'][$file], $_FILES[$key]['name'][$file]);
}
}
else
{
$mail->AddAttachment($_FILES[$key]['tmp_name'], $_FILES[$key]['name']);
}
}
}
}
$mail->WordWrap = 80;
$mail->Body = $message;
$mail->Send();
if (!ValidateEmail($autoresponder_from))
{
$error .= "The specified autoresponder email address (" . $autoresponder_from . ") is invalid!\n
";
throw new Exception($error);
}
$mail->ClearAddresses();
$mail->ClearAttachments();
$autoresponder_subject = ReplaceVariables($autoresponder_subject);
$mail->Subject = stripslashes($autoresponder_subject);
$mail->From = $autoresponder_from;
$mail->FromName = $autoresponder_name;
$mail->AddAddress($autoresponder_to, "");
$mail->AddReplyTo($autoresponder_from);
$autoresponder_message = ReplaceVariables($autoresponder_message);
$autoresponder_message = stripslashes($autoresponder_message);
$mail->MsgHTML($autoresponder_message);
$mail->IsHTML(true);
$mail->Send();
header('Location: '.$success_url);
}
catch (Exception $e)
{
$errorcode = file_get_contents($error_url);
$replace = "##error##";
$errorcode = str_replace($replace, $e->getMessage(), $errorcode);
echo $errorcode;
}
exit;
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['formid']) && $_POST['formid'] == 'accordion9')
{
$mailto = 'sales@carvedimpressions.com';
$mailfrom = isset($_POST['email']) ? $_POST['email'] : $mailto;
$subject = 'Question about 22x36 Deacon Upright-Grand';
$message = '';
$success_url = './../Info/formsuccess.html';
$error_url = './../Info/formerror.html';
$autoresponder_from = 'sales@carvedimpressions.com';
$autoresponder_name = 'Sales Manager';
$autoresponder_to = isset($_POST['email']) ? $_POST['email'] : $mailfrom;
$autoresponder_subject = 'Thank you for your question';
$autoresponder_message = 'We sincerely appreciate your question concerning our products and will make every attempt to answer your question within the next 24-48 hours. However, due to unforseen circumstances, we sometimes are not able to answer all of our inbound messages all at once. Please be patient with us and we will try and get to your message as soon as we are able. Thank you very much! ';
$eol = "\n";
$error = '';
$internalfields = array ("submit", "reset", "send", "filesize", "formid", "captcha_code", "recaptcha_challenge_field", "recaptcha_response_field", "g-recaptcha-response");
$mail = new PHPMailer(true);
try
{
$mail->Subject = stripslashes($subject);
$mail->From = $mailfrom;
$mail->FromName = $mailfrom;
$mailto_array = explode(",", $mailto);
for ($i = 0; $i < count($mailto_array); $i++)
{
if(trim($mailto_array[$i]) != "")
{
$mail->AddAddress($mailto_array[$i], "");
}
}
if (!ValidateEmail($mailfrom))
{
$error .= "The specified email address (" . $mailfrom . ") is invalid!\n
";
throw new Exception($error);
}
$mail->AddReplyTo($mailfrom);
$message .= $eol;
$message .= "IP Address : ";
$message .= $_SERVER['REMOTE_ADDR'];
$message .= $eol;
foreach ($_POST as $key => $value)
{
if (!in_array(strtolower($key), $internalfields))
{
if (is_array($value))
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol;
}
else
{
$message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol;
}
}
}
$mail->CharSet = 'ISO-8859-1';
if (!empty($_FILES))
{
foreach ($_FILES as $key => $value)
{
if ($_FILES[$key]['error'] == 0)
{
if (is_array($_FILES[$key]['name']))
{
$count = count($_FILES[$key]['name']);
for ($file = 0; $file < $count; $file++)
{
$mail->AddAttachment($_FILES[$key]['tmp_name'][$file], $_FILES[$key]['name'][$file]);
}
}
else
{
$mail->AddAttachment($_FILES[$key]['tmp_name'], $_FILES[$key]['name']);
}
}
}
}
$mail->WordWrap = 80;
$mail->Body = $message;
$mail->Send();
if (!ValidateEmail($autoresponder_from))
{
$error .= "The specified autoresponder email address (" . $autoresponder_from . ") is invalid!\n
";
throw new Exception($error);
}
$mail->ClearAddresses();
$mail->ClearAttachments();
$autoresponder_subject = ReplaceVariables($autoresponder_subject);
$mail->Subject = stripslashes($autoresponder_subject);
$mail->From = $autoresponder_from;
$mail->FromName = $autoresponder_name;
$mail->AddAddress($autoresponder_to, "");
$mail->AddReplyTo($autoresponder_from);
$autoresponder_message = ReplaceVariables($autoresponder_message);
$autoresponder_message = stripslashes($autoresponder_message);
$mail->MsgHTML($autoresponder_message);
$mail->IsHTML(true);
$mail->Send();
header('Location: '.$success_url);
}
catch (Exception $e)
{
$errorcode = file_get_contents($error_url);
$replace = "##error##";
$errorcode = str_replace($replace, $e->getMessage(), $errorcode);
echo $errorcode;
}
exit;
}
?>