$options["hosting"] = array(
1 => "50Mb - 40$",
"100Mb - 50$",
"500Mb - 60$",
"1Gb - 70$",
"3Gb - 120$",
"7Gb - 300$");
$options["domen"] = array(
1 => ".com - $15",
".net - $15",
".org - $15",
".biz - $15",
".info - $15",
".com.ua - $15",
".net.ua - $15",
".org.ua - $15",
".biz.ua - $15",
".in.ua - $15",
".gov.ua - $15",
".region.ua - $15",
".ua - $45",
".ru - $25",
".eu - $30");
$options["design"] = array(1 => "Да","Нет");
$options["template"] = array(1 => "Да","Нет");
$__name = strip_tags($_POST["name"]);
$__phone = strip_tags($_POST["phone"]);
$__mail = strtolower(strip_tags($_POST["mail"]));
$__organization = strip_tags($_POST["organization"]);
$__country = strip_tags($_POST["country"]);
$__city = strip_tags($_POST["city"]);
$__hosting = intval($_POST["hosting"]);
$__domen = intval($_POST["domen"]);
$__design = intval($_POST["design"]);
$__template = intval($_POST["template"]);
$__other = strip_tags($_POST["other"]);
if ($_POST["go"] == "ok")
{
$OK = true;
if (!strlen($__name))
{
$OK = false;
$errorMsg = "Имя не может быть пустым.";
}
if ($OK && !strlen($__phone))
{
$OK = false;
$errorMsg = "Вы не указали телефон.";
}
if ($OK && !strlen($__mail))
{
$OK = false;
$errorMsg = "Вы не указали e-mail.";
}
if ($OK && !array_key_exists($__hosting,$options["hosting"]))
{
$OK = false;
$errorMsg = "Вы не указали тип хостинга.";
}
if ($OK && !array_key_exists($__domen,$options["domen"]))
{
$OK = false;
$errorMsg = "Вы не указали домен.";
}
if ($OK && !array_key_exists($__design,$options["design"]))
{
$OK = false;
$errorMsg = "Вы не указали тип дизайна.";
}
if ($OK && !array_key_exists($__template,$options["template"]))
{
$OK = false;
$errorMsg = "Вы не указали тип шаблона.";
}
if ($OK)
{
if (!eregi("^[._a-z0-9-]+@[.a-z0-9-]+.[a-z]{2,6}$", $__mail))
{
$OK = false;
$errorMsg = "Не верный E-mail.";
}
else
{
list($Username, $Domain) = split("@",$__mail);
if (!getmxrr($Domain, $MXHost))
{
$OK = false;
$errorMsg = "Не верный E-mail.";
}
}
}
if ($OK)
{
$capt = "Заявка";
$subj = '=?UTF-8?B?'.base64_encode($capt).'?=';
$header="From: ".$__mail."\r\nContent-type: text/html; charset=utf-8 \r\n";
$text="От: ".$__name."
Организация: ".$__organization."
Телефон: ".$__phone."
E-mail: ".$__mail."
Страна: ".$__country."
Город: ".$__city."
Хостинг: ".$options["hosting"][$__hosting]."
Домен: ".$options["domen"][$__domen]."
Дизайн: ".$options["design"][$__design]."
Шаблон: ".$options["template"][$__template]."
".nl2br($__other)."
";
if(mail("webmaster@jeksun.com",$subj,$text,$header))
{
$OKMsg = "Ваш запрос успешно обработан.";
$__name = "";
$__phone = "";
$__mail = "";
$__organization = "";
$__country = "";
$__city = "";
$__design = 0;
$__hosting = 0;
$__template = 0;
$__domen = 0;
$__other = "";
}
else
{
$OK = false;
$errorMsg = "Ошибка при обработке запроса.";
}
}
}
?>
![]() JekSun Studio |
На это странице Вы можете =$OKMsg?>=$errorMsg?> |
eng|рус |