-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.php
110 lines (102 loc) · 5.25 KB
/
main.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?php
session_start();
if ($_SESSION['user']) {
header('Location: profile.php');
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Авторизация и регистрация</title>
<link rel="stylesheet" href="assets/main.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
</head>
<body>
<header>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<a class="navbar-brand" href="#">Доставка еды</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="index.html">Главная</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
data-bs-toggle="dropdown" aria-expanded="false">
Еда
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><a class="dropdown-item" href="roll.html">Суши и роллы</a></li>
<li>
<hr class="dropdown-divider">
</li>
<li><a class="dropdown-item" href="mainDish.html">Основные блюда</a></li>
<li>
<hr class="dropdown-divider">
</li>
<li><a class="dropdown-item" href="salad.html">Салаты</a></li>
<li>
<hr class="dropdown-divider">
</li>
<li><a class="dropdown-item" href="soup.html">Супы</a></li>
<li>
<hr class="dropdown-divider">
<li><a class="dropdown-item" href="drinks.html">Напитки</a></li>
<li>
<hr class="dropdown-divider">
</li>
<li><a class="dropdown-item" href="dessert.html">Десерты</a></li>
</li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="blog.html">Блог</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="contacts.html">Контакты</a>
</li>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="main.php">Аторизация/Регистрация</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="profile.php">Профиль</a>
</li>
</ul>
<form class="d-flex">
<input class="form-control me-2" type="search" placeholder="Поиск" aria-label="Search">
<button class="btn btn-outline-success" type="submit">Поиск</button>
</form>
</div>
</div>
</nav>
</header>
<!-- Форма авторизации -->
<div class="container">
<form action="vendor/signin.php" method="post">
<label>Логин</label>
<input type="text" name="login" placeholder="Введите свой логин">
<label>Пароль</label>
<input type="password" name="password" placeholder="Введите пароль">
<button type="submit">Войти</button>
<p>
У вас нет аккаунта? - <a href="/register.php">зарегистрируйтесь</a>!
</p>
<?php
if ($_SESSION['message']) {
echo '<p class="msg"> ' . $_SESSION['message'] . ' </p>';
}
unset($_SESSION['message']);
?>
</form>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
</body>
</html>