<?php if ($categories) { ?>
<div class="container">
<a class="toggleMenu" href="#">Menu</a>
<ul class="nav_menu">
<?php foreach ($categories as $category) { ?>
<li><?php if ($category['children']) { ?><?php } ?>
<a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
<?php if ($category['children']) { ?>
<?php for ($i = 0; $i < count($category['children']); $i++) { ?>
<ul>
<?php $j = $i + ceil(count($category['children']) / $category['column']); ?>
<?php for ($i=0; $i < $j; $i++) { ?>
<?php if (isset($category['children'][$i])) { ?>
<li>
<a href="<?php echo $category['children'][$i]['href']; ?>">
<?php echo $category['children'][$i]['name']; ?></a>
</li>
<?php } ?>
<?php } //for i < $j ?>
<?php } //for ($i = 0; $i < count ?>
</ul>
<?php } // if ($category['children']) #8 ?>
</li>
<?php } // foreach ($categories as $category) ?>
</ul>
<div>
<?php } ?>
$recepient = "....";
$sitename = "....";
$name = trim($_GET["name"]);
$phone = trim($_GET["phone"]);
$email = trim($_GET["email"]);
if ( isset($_GET["inspection"]) ) {
$action = 'Проводить осмотр корреных вкладышей';
} else {
$action = 'Не проводить осмотр';
}
$pagetitle = "Новая заявка с сайта \"$sitename\"";
$message = "Имя: $name \nТелефон: $phone \nЕ-майл: $email \nПотребность в ремонте: $action";
mail($recepient, $pagetitle, $message, "Content-type: text/plain; charset=\"utf-8\"\n From: $recepient");