<div>
Рассчитаем стоимость обслуживания за 15 минут
</div>
div {
width: 250px;
height: 70px;
border-radius: 3px;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
text-transform: uppercase;
font-size: 12px;
font-family: sans-serif;
padding: 5px 40px;
color: #fff;
background: #EBA146 no-repeat;
background-image:
radial-gradient(circle at center, #fff 0, #fff 46%, transparent 50%, transparent),
radial-gradient(circle at center, #fff 0, #fff 46%, transparent 50%, transparent),
radial-gradient(circle at center, #fff 0, #fff 46%, transparent 50%, transparent),
radial-gradient(circle at center, #fff 0, #fff 46%, transparent 50%, transparent),
linear-gradient(to right, #EBA146, #E17233);
background-position:
5px 5px,
calc(100% - 5px) 5px,
5px calc(100% - 5px),
calc(100% - 5px) calc(100% - 5px),
0 0;
background-size:
12px 12px,
12px 12px,
12px 12px,
12px 12px,
100% 100%;
}
var timeout;
function send() {
var xhr = new XMLHttpRequest();
xhr.open('GET', diceLink);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4){
clearTimeout(timeout);
r = xhr.responseText;
}
};
xhr.send();
// ждем 10 сек... не лучшее решение, но как ещё — хз.
timeout = setTimeout(function(){
xhr.abort(); // Останавливаем
send(); // Запрашиваем снова
}, 10000);
}
send();
$recepient = "index@mail.ru";
$sitename = "Butik";
$email= trim($_POST["email"]);
$message = "Телефон: $email";
$pagetitle = "Новая заявка с сайта \"$sitename\"";
mail($recepient, $pagetitle, $message, "Content-type: text/plain; charset=\"utf-8\"\n From: $recepient");
if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
mail(
$email,
'Thank you!',
'Thank you! \r\n We will call you back now! Wait.', // ваш шаблон письма
"Content-type: text/plain; charset=\"utf-8\"\n From: $recepient"
);
}
.flash { background-color: red; }
$('input').addClass('flash');
setTimeout(function(){
$('input').removeClass('flash');
}, 500);
'лалала001' => 'лалала', '001' // разбить на две части
length = '001'.lentgh // запомнить длину второй строки
'001' => 1, // привести вторую строку к чсилу
1++ => 2 // инкрементировать число
2 => '2' // привести к строке
'2'.padStart(length, '0') => '002' // дополнить слева нулями
'лалала' + '002' => 'лалала002' // соединить строки