-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsend1.php
56 lines (48 loc) · 2.47 KB
/
send1.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
$data = $_POST;
if(isset($data['fio']) and isset($data['email']) and isset($data['text'])){
$fio = $data['fio'];
$email = $data['email'];
$text = $data['text'];
$fio = htmlspecialchars($fio);
$email = htmlspecialchars($email);
$fio = urldecode($fio);
$email = urldecode($email);
$fio = trim($fio);
$email = trim($email);
if (mail("[email protected]", "Заявка с сайта", "ФИО: ".$fio."\nE-mail: ".$email. "\nCообщение: " .$text,"From: [email protected] \r\n")
and mail($email, "Заявка c сайта deepwork.ru", "Ваш запрос: '". $text ."' успешно отправлен. \nМы отработаем его в ближайшее время.","From: [email protected] \r\n")){
echo "<h2 style='color: green;'>Сообщение успешно отправлено</h2>";
} else {
echo "<h2 style='color: red;'>При отправке сообщения возникли ошибки</h2>";
}
} else {
echo "<h2 style='color: red;'>Пожалуйста, заполните все поля!</h2>";
}
?>
<?php header('Refresh: 5; URL=http://deep.work.sxmurxe.ru/account.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="robots" content="index, follow" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Редирект с задержкой и обратным отсчетом времени.</title>
</head>
<body onLoad="tiktak();">
<div>
<script language="JavaScript" type="text/javascript">
// значение начальной секунды
var second=5;
function tiktak()
{
if(second<=9){second="0" + second;}
if(document.getElementById){timer.innerHTML=second;}
if(second==00){return false;}
second--;
setTimeout("tiktak()", 1000);
}
</script>
Вы будете перенаправлены через <span id="timer"></span> секунд на страницу личного кабинета.
</div>
</body>
</html>