
<?php 
session_start();
// print_r($_SESSION);
?>
<!doctype html>
<html lang="en">

    <head>
        
        <meta charset="utf-8" />
        <title>Авторизация</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta content="Premium Multipurpose Admin & Dashboard Template" name="description" />
        <meta content="Themesdesign" name="author" />
        <!-- App favicon -->
        <link rel="shortcut icon" href="assets/images/nerufavicon.png">

        <!-- Bootstrap Css -->
        <link href="assets/css/bootstrap.min.css" id="bootstrap-style" rel="stylesheet" type="text/css" />
        <!-- Icons Css -->
        <link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" />
        <!-- App Css-->
        <link href="assets/css/app.min.css" id="app-style" rel="stylesheet" type="text/css" />

    </head>

    <body class="bg-pattern">
        <div class="bg-overlay"></div>
        <div class="account-pages my-5 pt-5">
            <div class="container">
                <div class="row justify-content-center">
                    <div class="col-xl-4 col-lg-6 col-md-8">
                        <div class="card mt-5">
                            <div class="card-body p-4">
                                <div class="">
                                    <div class="text-center">
                                        <a href="index.html" class="">
                                            <img src="assets/images/neru.png" alt="" height="50" class="auth-logo logo-dark mx-auto">
                                            
                                        </a>
                                    </div>
                                    <!-- end row -->
                                    <h4 class="font-size-18 text-muted mt-3 text-center">Авторизация</h4>
                                    <form class="form-horizontal" method="post" action="modules/crud.php?act=auth">
                                        <div class="row">
                                            <div class="col-md-12">
                                                <div class="mb-4">
                                                    <label class="form-label" for="username">Логин</label>
                                                    <input type="text" name="login" class="form-control" id="login" placeholder="">
                                                </div>
                                                <div class="mb-4">
                                                    <label class="form-label" for="userpassword">Пароль</label>
                                                    <input type="password" name="password" class="form-control" id="password" placeholder="">
                                                </div>
                                                <?php 
                                                if(isset($_SESSION['failauth']) and $_SESSION['failauth'] =='1'){ ?>
                                                <div class="d-grid mt-4">
                                                    <div class="alert alert-danger" role="alert">
                                                        Неправильный логин или пароль!
                                                    </div>
                                                </div>
                                                <?php $_SESSION['failauth']=''; }?>
                                                <div class="d-grid mt-4">
                                                    <button class="btn btn-block btn-success waves-effect waves-light" type="submit">Войти</button>
                                                </div>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- end row -->
            </div>
        </div>
        <!-- end Account pages -->

        <!-- JAVASCRIPT -->
        <script src="assets/libs/jquery/jquery.min.js"></script>
        <script src="assets/libs/bootstrap/js/bootstrap.bundle.min.js"></script>
        <script src="assets/libs/metismenu/metisMenu.min.js"></script>
        <script src="assets/libs/simplebar/simplebar.min.js"></script>
        <script src="assets/libs/node-waves/waves.min.js"></script>

        <script src="assets/js/app.js"></script>

    </body>
</html>
