<?php
function getMenu()
{
$mainMenu = [
[
'title' => 'Главная',
'path' => '/',
'sort' => 1,
],
[
'title' => 'Каталог',
'path' => '/templates/catalog/',
'sort' => 2,
],
[
'title' => 'Сидки',
'path' => '/templates/discounts/',
'sort' => 3,
],
[
'title' => 'О нас',
'path' => '/templates/about/',
'sort' => 4,
],
];
return $mainMenu;
}
<?php
function isAuth() {
$sessionName = $_SESSION['user_email'];
if ($sessionName) {
return true;
}
return false;
}