MMCT TEAM
Server IP : 153.92.220.142  /  Your IP : 216.73.216.148
Web Server : LiteSpeed
System : Linux nl-srv-web513.main-hosting.eu 5.14.0-503.34.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Mar 27 06:00:50 EDT 2025 x86_64
User : u444427800 ( 444427800)
PHP Version : 8.1.32
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u444427800/domains/dronacharyasunayana.com/../yessthetics.com/public_html/admin/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u444427800/domains/dronacharyasunayana.com/../yessthetics.com/public_html/admin/index.php
<?php include 'connect.php';
if(!empty($_SESSION['admin']))
    header("location:dashboard.php");
else
{?>
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Admin Login</title>
        <link href="https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600;1,700;1,800&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,300;1,400;1,500;1,600;1,700&family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,900&display=swap" rel="stylesheet">

        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" />
        <style>
            * {
                margin: 0;
                padding: 0;
                box-sizing: border-box;
                font-family: "poppins";
            }

            .login {
                display: flex;
                justify-content: center;
                align-items: center;
                background-image: url('./Assets/formbg.png');
                background-position: center;
                background-repeat: no-repeat;
                background-size: cover;
                position: relative;
                width: 100%;
                height: 100vh;
            }
            .login img{ width:180px}

            .login::after {
                position: absolute;
                content: "";
                width: 100%;
                height: 100%;
                top: 0;
                left: 0;
                background: #000;
                opacity: 0.5;

            }

            .login form {
                width: 20%;
                background: #fff;
                padding: 20px 25px;
                border-radius: 5px;
                display: block;
                justify-content: center;
                z-index: 1;
                box-shadow: 0px 0px 3px #333333;
                text-align: center;
            }

            .login form h2 {
                text-align: center;
                color: #fff !important;
                font-size: 17px;
                font-weight: 600;
                letter-spacing: 0.5px;
            }

            .login form .form_group {
                position: relative;
            }

            .login form .form_group span {
                position: absolute;
                top: 15px;
                right: 12px;
                color: orangered;
            }

            .login form .form_group .form_control {
                width: 100%;
                padding: 10px;
                font-size: 12px;
                letter-spacing: 0.5px;
                border: 1px solid #929292;
                outline: none;
                border-radius: 3px;
                margin: 7px 0;
            }

            .login form .form_group .button {
                width: 100%;
                padding: 10px;
                font-size: 12px;
                letter-spacing: 0.5px;
                border: 1px solid orangered;
                background: orangered;
                outline: none;
                border-radius: 3px;
                margin: 7px 0;
                transition: all 0.5s ease-in-out;
                color: #fff;
            }

            .login form .form_group .button:hover {
                background: #0C2F6F;
                border: 1px solid #0C2F6F;
                cursor: pointer;
            }
            label.error{    color: red;
    font-size: 11px;
    text-align: left;
    display: block;}
            @media screen and (max-width: 1024px) {}

            @media screen and (max-width: 767px) {
                .login {
                    height: 40vh;
                }

                .login form {
                    width: 100% !important;
                    padding: 10px 15px !important;
                    margin: 5px;
                }
            }
        </style>
    </head>
    <body>
        <div class="login">
            <form method="post" name="admin_login">
                <img src="../Assets/y-logo.webp">
                <div class="form_group">
                    <input type="text" name="username" placeholder="Username" maxlength="100" minlength="3" class="form_control" required>
                    <span><i class="fa-solid fa-user"></i></span>
                </div>
                <div class="form_group">
                    <input type="password" name="password" placeholder="Password" maxlength="100" minlength="3" class="form_control" required>
                    <span><i class="fa-solid fa-lock"></i></span>
                </div>
                <div class="form_group">
                    <button name="login" class="button">Login</button>
                </div>
            </form>
        </div>
    </body>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.20.0/jquery.validate.min.js"></script>
    <script>
        $(document).ready(function(){
            $("form[name=admin_login]").validate();
        });
    </script>
    </html>

    <?php

    if (isset($_POST['login'])) {
        $username = $_POST['username'];
        $password = $_POST['password'];
        if ($username == "" || $password == "") {
            ?>
            <script>
                alert("Please Enter Details")
            </script>
            <?php
        } else {
            // $conn->query
            $result = mysqli_query($conn, "SELECT * FROM `admin` where `email`= '$username' and `password`= '$password'");

            if ((mysqli_num_rows($result) > 0)) {

                $data = mysqli_fetch_assoc($result);

                $_SESSION['admin'] = $data['id'];

                ?>
                <script>
                    alert("login Successfull");
                    location.replace('./dashboard.php')
                </script>
                <?php

            } else {
                ?>
                <script>
                    alert("Invalid Credentials !")
                </script>
                <?php
            }



        }

    }
}?>

MMCT - 2023