-
Notifications
You must be signed in to change notification settings - Fork 1
/
functions.php
40 lines (39 loc) · 957 Bytes
/
functions.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
<?
session_start();
if (isset($_SESSION['start']) && (time() - $_SESSION['start'] > 259200)) {
session_unset();
session_destroy();
}
$_SESSION['start'] = time();
$pages = [
'main' => [
'name' => 'Главная',
'icon' =>'fal fa-home'
],
'contact' => [
'name' => 'Контакты',
'icon' => 'fal fa-address-book'
],
'table' => [
'name' => 'Таблица умножения',
'icon' => 'fas fa-times'
],
'calc' => [
'name' => 'Калькулятор',
'icon' => 'fas fa-calculator-alt'
],
'slide' => [
'name' => 'Слайдер',
'icon' => 'far fa-presentation'
],
'guest' => [
'name' => 'Гостевая книга',
'icon' => 'fal fa-books'
],
'test' => [
'name' => 'Тест',
'icon' => 'fal fa-vial'
]
];
$path = $_GET['route'] ?? '404' ? $_GET['route']: 'main';
?>