login.php

File Type: php File Location: monofiles/ File name: login.php
<?php
    $loginpage 
true;
    include_once 
'data_connect.php'
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Login</title>
<link rel="stylesheet" type="text/css" href="cmstyle.css">
</head>
<body>
    
<script type="text/javascript">
        function formsubmit() {
        document.getElementById("usernameinp").setAttribute('readonly','true');
        document.getElementById("passwordinp").setAttribute('readonly','true');
        }
</script>
    
    <form name="login" action="" method="post" onsubmit="submit.disabled=true; formsubmit(); return true;">
    
    
        <div class="login-wrapper">
            <h2 style="text-align:center;font-size:20px;margin-top:55px">MonoCMS</h2>
             <h3 style="text-align:center">login</h3>
        
            <div id="login-container">
            <?php 
            
                
if (isset($_SESSION['MONfailedlogin'])) {
                    
                    print 
'<div class="loginf">Incorrect username or password</div>';
                    unset(
$_SESSION['MONfailedlogin']);
                }
                
            
?>
            
                <!-- Username -->
                <div class="login-box">
                    <input class="login-input" id="usernameinp" name="username" value="" placeholder="Username" type="text" style="background-image:url('images/user.png')">
                    <label style="background:url('images/user.png') no-repeat"></label>
                </div>
                
                
                <!-- Password -->
                <div class="login-box" style="animation-delay:.2s">
                    <input class="login-input" id="passwordinp" name="password" value="" placeholder="Password" type="password" style="background-image:url('images/pass.png')">
                    <label style="background:url('images/pass.png') no-repeat"></label>
                </div>

                
                <!-- Submit -->
                <div style="overflow:hidden;height:68px;width:100%;margin:15px auto -25px auto">
                    <span class="spintro">LOGIN</span>
                    <div class="logcover"></div>
                    <input id="login-button" class="stylish-button" type="submit" id="submitbut" name="submit" value="LOGIN">
                </div><br>
            </div>
        </div>
    </form>
    
</body>
</html>