<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->


<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta http-equiv="Content-Language" content="en">
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
        <title>Adimjuth</title>
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no" />
        <meta name="description" content="This is an example dashboard created using build-in elements and components.">
        <meta name="msapplication-tap-highlight" content="no">

        <script type="text/javascript" src="../custom_js/jquery.min.js"></script>

        <link href="../admin_panel_css/main.css" rel="stylesheet">

        <!--<script src="../assets/libs/jquery/dist/jquery.min.js"></script>-->
        <!-- Bootstrap tether Core JavaScript -->
        <script src="../assets/libs/popper.js/dist/umd/popper.min.js"></script>
        <script src="../assets/libs/bootstrap/dist/js/bootstrap.min.js"></script>
    </head>

    <body _c_t_common="1">
        <div class="app-container app-theme-white body-tabs-shadow closed-sidebar-mobile closed-sidebar">
            <div class="app-container closed-sidebar-mobile closed-sidebar">
                <div class="h-100 bg-plum-plate bg-animation" style="background-image: url('https://www.transparenttextures.com/patterns/arabesque.png'), linear-gradient(135deg, #3f2b96 0%, #a8c0ff 100%) !important;background-blend-mode: overlay;">
                    <div class="d-flex h-100 justify-content-center align-items-center">
                        <div class="mx-auto app-login-box col-md-8">
                            <div class="app-logo-inverse mx-auto mb-3"></div>
                            <div class="modal-dialog w-100 mx-auto">
                                <div class="modal-content">
                                    <div class="modal-body">
                                        <div class="h5 modal-title text-center">
                                            <h2>
                                                <b><span class="pe-7s-note" style="color:#2794a6;font-size: 25px;">Particularly Vulnerable Tribal Groups </span><span class="fa-pol" style="color: #2794a6;font-size: 26px"> PVTG </span><span style="color: #e95050;font-size: 26px">Dashboard</span></b>
                                            </h2>
                                            <h4 class="mt-2">
                                                <div style="font-size: 18px">Welcome back,</div>
                                                <!--<span>Please sign in to your account below.</span>-->
                                            </h4>
                                        </div>
                                        <form class="">

                                            <div class="position-relative form-group">
                                                <label for="Username" class="">Username</label>
                                                <input name="Username" id="username" placeholder="Username" type="text" class="form-control">
                                                <div class="invalid-feedback" id="msgusername" style="font-size: 14px">
                                                    * Enter Username
                                                </div>
                                            </div>
                                            <div class="position-relative form-group">
                                                <label for="Password" class="">Password</label>
                                                <input name="Password" id="password" placeholder="Password" type="password" class="form-control">
                                                <div class="invalid-feedback" id="msgpassword" style="font-size: 14px">
                                                    * Enter Password 
                                                </div>
                                            </div>
                                            
                                        </form>
                                        <!--<div class="divider"></div>-->
                                        <!--<h6 class="mb-0">No account? <a href="/registration" class="text-primary">Sign up now</a></h6>-->
                                    </div>
                                    <div class="modal-footer clearfix">
                                        <!--                                        <div class="float-left">
                                                                                    <a href="javascript:void(0);" class="btn-lg btn btn-link">Recover Password</a>
                                                                                </div>-->
                                        <div class="">
                                            <button class="btn btn-primary btn-lg" id="btn-login">Login to Dashboard</button>
                                            <!--<button type="button" class="mt-1 mb-2 btn btn-primary" style="float: none" id="btn-login">Login to Dashboard</button>-->
                                            <div id="msg_login"></div>
                                            <div class="invalid-feedback" id="msgsubmit" style="font-size: 16px;text-align: left;">
                                                * Username and password not match !
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="text-center text-white opacity-8 mt-8" style="margin-top: 100px">Copyright © Rudra Infotech 2025</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--<script type="text/javascript" src="./assets/scripts/main.d810cf0ae7f39f28f336.js"></script>-->

    </div></body>
<script>

    $(document).ready(function () {

        $('#password').on("keypress", function (e) {
            if (e.keyCode == 13) {
                var username = $('#username').val();
                var password = $('#password').val();
                if (username == '')
                {
                    $('#msgusername').fadeIn(500);
                    $('#msgusername').fadeOut(5000);
                    $('#msgusername').focus();
                } else if (password == '')
                {
                    $('#msgpassword').fadeIn(500);
                    $('#msgpassword').fadeOut(5000);
                    $('#msgpassword').focus();
                } else
                {
//                        alert('btn success ');
                    var data = {};
                    data.username = username;
                    data.password = password;
                    $.ajax({
                        cache: false,
                        type: 'POST',
                        async: false,
                        data: JSON.stringify(data),
                        contentType: 'application/json',
                        url: '/adminpanel/check_login',
                        success: function (data) {
                            debugger;
//                                alert('data ' + data);
                            if (data == 'LOGIN')
                            {
//                                    alert('if Login ');
                                $('#msgsubmit').fadeIn(500);
                                $('#msgsubmit').html(' * Login Successfully ');
                                $('#msgsubmit').css({'color': 'green'});
                                $('#msgsubmit').fadeOut(5000);
                                setTimeout(function () {
//                                        window.location.reload();
                                    window.location.href = "dashboard";
                                }, 1000);
                            } else if (data == 'NOT_LOGIN')
                            {
//                                    alert('else Not Login ');
                                $('#msgsubmit').fadeIn(500);
                                $('#msgsubmit').html(' * Username and Password not match !');
                                $('#msgsubmit').css({'color': 'red'});
                                $('#msgsubmit').fadeOut(5000);
                                $('#msgusername').focus();
                            }
                        }, error: function (xhr, err) {
                            alert('Error ' + err.message);
                        }
                    });
                }
            }
        });


        $(document.body).on('click', '#btn-login', function (e) {
            e.stopImmediatePropagation();
            debugger;
            var username = $('#username').val();
            var password = $('#password').val();
            if (username == '')
            {
                $('#msgusername').fadeIn(500);
                $('#msgusername').fadeOut(5000);
                $('#msgusername').focus();
            } else if (password == '')
            {
                $('#msgpassword').fadeIn(500);
                $('#msgpassword').fadeOut(5000);
                $('#msgpassword').focus();
            } else
            {
//                        alert('btn success ');
                var data = {};
                data.username = username;
                data.password = password;
                $.ajax({
                    cache: false,
                    type: 'POST',
                    async: false,
                    data: JSON.stringify(data),
                    contentType: 'application/json',
                    url: '/adminpanel/check_login',
                    success: function (data) {
                        debugger;
//                                alert('data ' + data);
                        if (data == 'LOGIN')
                        {
//                                    alert('if Login ');
                            $('#msgsubmit').fadeIn(500);
                            $('#msgsubmit').html(' * Login Successfully ');
                            $('#msgsubmit').css({'color': 'green'});
                            $('#msgsubmit').fadeOut(5000);
                            setTimeout(function () {
//                                        window.location.reload();
                                window.location.href = "dashboard";
                            }, 1000);
                        } else if (data == 'NOT_LOGIN')
                        {
//                                    alert('else Not Login ');
                            $('#msgsubmit').fadeIn(500);
                            $('#msgsubmit').html(' * Username and Password not match !');
                            $('#msgsubmit').css({'color': 'red'});
                            $('#msgsubmit').fadeOut(5000);
                            $('#msgusername').focus();
                        }
                    }, error: function (xhr, err) {
                        alert('Error ' + err.message);
                    }
                });
            }
        })
    })
</script>
</html>




<!--<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <title>Adimjuth Dashboard - Tribal Login</title>
  <link href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;600&display=swap" rel="stylesheet">
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: 'Manrope', sans-serif;
    }

    body {
      background: url('https://i.imgur.com/JPj8Hzs.png') repeat;
      background-color: #f4ede1;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }

    .login-box {
      background-color: #fff;
      padding: 40px;
      border-radius: 16px;
      width: 100%;
      max-width: 400px;
      box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
      border: 5px double #5e3b23;
      position: relative;
    }

    .login-box::before {
      content: '';
      position: absolute;
      top: -30px;
      left: calc(50% - 30px);
      width: 60px;
      height: 60px;
      background: url('https://i.imgur.com/zXNuvZi.png') no-repeat center/contain;
    }

    .login-box h2 {
      text-align: center;
      margin-bottom: 20px;
      color: #4a3820;
    }

    .input-group {
      margin-bottom: 16px;
    }

    .input-group label {
      font-weight: 600;
      color: #5e3b23;
      display: block;
      margin-bottom: 5px;
    }

    .input-group input {
      width: 100%;
      padding: 10px;
      border: 1px solid #a58d74;
      border-radius: 8px;
      font-size: 16px;
    }

    .login-btn {
      width: 100%;
      padding: 12px;
      background: #7a5230;
      color: #fff;
      font-size: 16px;
      font-weight: bold;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      transition: background 0.3s ease;
    }

    .login-btn:hover {
      background: #5a3a1e;
    }

    .footer {
      margin-top: 20px;
      text-align: center;
      font-size: 14px;
      color: #777;
    }
  </style>
</head>
<body>

  <div class="login-box">
    <h2>Adimjuth Dashboard</h2>
    <form action="/adminpanel/login" method="POST">
      <div class="input-group">
        <label for="username">Username</label>
        <input type="text" id="username" name="username" required />
      </div>
      <div class="input-group">
        <label for="password">Password</label>
        <input type="password" id="password" name="password" required />
      </div>
      <button type="submit" class="login-btn">Login</button>
    </form>
    <div class="footer">
      &copy; 2025 Adimjuth Tribal Portal
    </div>
  </div>

</body>
</html>-->


