<?php 
    include 'assets/php/connect.php';
    include 'assets/php/order.php';
?>

<!DOCTYPE html>
<html lang="ru">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="assets/css/style.css">
    <script src="assets/js/bootstrap.min.js"></script>
    <link rel="icon" href="assets/img/favicon.ico">
    <title>Водить.РФ</title>
</head>

<body>
    <?php include "assets/includes/header.php" ?>
    <h1>Обучение вождению речного транспорта</h1>

    <div id="carouselExample" class="carousel slide" data-bs-ride="carousel" data-bs-interval="3000">
    <div class="carousel-inner">
        <div class="carousel-item active">
        <img src="assets/img/image06.jpg" class="d-block w-100" alt="...">
        </div>
        <div class="carousel-item">
        <img src="assets/img/image07.jpg" class="d-block w-100" alt="...">
        </div>
        <div class="carousel-item">
        <img src="assets/img/image08.webp" class="d-block w-100" alt="...">
        </div>
        <div class="carousel-item">
        <img src="assets/img/image09.webp" class="d-block w-100" alt="...">
        </div>
    </div>
    <button class="carousel-control-prev" type="button" data-bs-target="#carouselExample" data-bs-slide="prev">
        <span class="carousel-control-prev-icon" aria-hidden="true"></span>
        <span class="visually-hidden">Previous</span>
    </button>
    <button class="carousel-control-next" type="button" data-bs-target="#carouselExample" data-bs-slide="next">
        <span class="carousel-control-next-icon" aria-hidden="true"></span>
        <span class="visually-hidden">Next</span>
    </button>
    </div>
        <form method="post">
        <div class="mb-3">
            <label for="exampleInputEmail1" class="form-label">Транспорт:</label>
            <select class="form-select" aria-label="Default select example">
                <option selected>Выберите вид транспорта</option>
                <?php foreach ($transportsArr as $transport) {
                    echo '<option value="'.$transport['id_transport'].'">'.$transport['name'].'</option>';
                } ?>
            </select>
        </div>
        <div class="mb-3">
            <label for="exampleInputPassword1" class="form-label">Пароль</label>
            <input type="password" class="form-control" id="exampleInputPassword1" name="password_hash" required>
        </div>
        <a href="index.php">Еще не зарегистрированы? Регистрация</a><br><br>
        <?php if(!empty($error)){ ?>
            <div class="alert alert-danger" role="alert">
                <?php echo $error ?>
            </div>
        <?php } ?>
        <button type="submit" class="btn btn-primary" name="newOrder" value="newOrder">Войти</button>

    </form>
    <?php include "assets/includes/footer.php" ?>
</body>

</html>