<?php
/**
* The template for displaying pages
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages and that
* other "pages" on your WordPress site will use a different template.
*
* @package WordPress
* @subpackage Twenty_Fifteen
* @since Twenty Fifteen 1.0
*/
get_header(); ?>
123
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php
// Start the loop.
while ( have_posts() ) : the_post();
// Include the page content template.
get_template_part( 'content', 'page' );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
// End the loop.
endwhile;
?>
</main><!-- .site-main -->
</div><!-- .content-area -->
<?php get_footer(); ?>
<?php
$date = date('d.m.Y');
$time = date('H:i');
$name = $_POST['name'];
$phone = $_POST['phone'];
$formid = $_POST['formid'];
$site = "Site";
$to = "";
$subject = "Новая заявка ($phone)";
$headers = "MIME-Version: 1.0\nContent-type: text/html; charset=utf-8\nFrom: $site\n";
$message = "
<!DOCTYPE html>
<html lang='en'>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<style>
h5, p {
font: 400 17px/1.4 Calibri;
padding: 0 0 7px;
margin: 0 0 6px;
border-bottom: 1px solid #ddd;
max-width: 705px;
}
h5 {
font-size: 21px;
font-weight: 600;
}
p span {
color:#999;
}
div {
padding: 10px 0 0;
}
</style>
</head>
<body>
<div>
<h5>$date ($time)</h5>
<p>
<span>Имя:</span> $name<br>
<span>Телефон:</span> $phone<br>
<span>Форма:</span> $formid
</p>
</div>
</body>
</html>
";
mail($to, $subject, $message, $headers);
?>