Загрузка данных


<!DOCTYPE html>
<html lang="ru">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Фитнес-клуб</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <!-- Видео-фон -->
    <video autoplay muted loop playsinline class="video-background">
        <source src="fitness.mp4" type="video/mp4">
    </video>

    <!-- Навигация -->
    <header>
        <nav>
            <ul>
                <li><a href="#services">Услуги</a></li>
                <li><a href="#trainers">Тренеры</a></li>
                <li><a href="#" onclick="toggleScheduleView()">Расписание</a></li>
                <li><a href="#contacts">Контакты</a></li>
                <li><a href="#" onclick="logoutUser()">Выход</a></li>
            </ul>
        </nav>
    </header>

    <!-- Основное содержание -->
    <main>
        <section class="hero-section">
            <h1>Добро пожаловать в наш фитнес-клуб!</h1>
            <p>Начните путь к здоровому образу жизни прямо сейчас.</p>
            <button onclick="openBookingForm()">Записаться</button>
        </section>

        <!-- Формы входа и регистрации -->
        <section id="auth-form" style="display:none;">
            <h2>Авторизация</h2>
            <form onsubmit="login(event)">
                <label for="username">Логин:</label>
                <input type="text" id="username" name="username" required>
                <br>
                <label for="password">Пароль:</label>
                <input type="password" id="password" name="password" required>
                <br>
                <button type="submit">Войти</button>
                <a href="#" onclick="switchToRegister()">Зарегистрироваться</a>
            </form>
        </section>

        <section id="register-form" style="display:none;">
            <h2>Регистрация</h2>
            <form onsubmit="register(event)">
                <label for="reg-name">Ваше имя:</label>
                <input type="text" id="reg-name" name="reg-name" required>
                <br>
                <label for="reg-username">Логин:</label>
                <input type="text" id="reg-username" name="reg-username" required>
                <br>
                <label for="reg-password">Пароль:</label>
                <input type="password" id="reg-password" name="reg-password" required>
                <br>
                <label for="account-type">Тип аккаунта:</label>
                <select id="account-type" name="account-type" required>
                    <option value="client">Клиент</option>
                    <option value="admin">Администратор</option>
                </select>
                <br>
                <button type="submit">Зарегистрироваться</button>
                <a href="#" onclick="switchToLogin()">Уже зарегистрированы?</a>
            </form>
        </section>

        <!-- Блок расписания -->
        <section id="schedule-view" style="display:none;">
            <h2>Расписание занятий</h2>
            <button onclick="changeScheduleView('daily')">По дням</button>
            <button onclick="changeScheduleView('weekly')">По неделям</button>
            <div id="schedule-grid"></div>
        </section>

        <!-- Модальное окно для записи на занятие -->
        <div id="booking-modal" class="modal">
            <div class="modal-content">
                <span class="close" onclick="closeBookingModal()">×</span>
                <h2>Запись на занятие</h2>
                <form onsubmit="bookTraining(event)">
                    <label for="training-date">Дата занятия:</label>
                    <input type="date" id="training-date" name="training-date" required>
                    <br>
                    <label for="training-time">Время занятия:</label>
                    <input type="time" id="training-time" name="training-time" required>
                    <br>
                    <button type="submit">Подтвердить запись</button>
                </form>
            </div>
        </div>
    </main>

    <!-- Подвал -->
    <footer>
        <p>© 2024 Фитнес-клуб Забеев И.</p>
    </footer>

    <!-- Скрипты -->
    <script src="app.js"></script>
</body>
</html>