Custom login.html not working after last update

jwn

Verified User
Joined
Jul 11, 2019
Messages
18
Hi,

Previously i creating login page with the code below, but after last update when click login not redirected to or like verification not processed since we put any text on login form not see invalid login notif

PHP:
|?FAILEDLOGIN=<div class="alert alert-danger" role="alert"><h4><i class="fas fa-exclamation-circle size-4x"></i> The login is invalid.</h4></div>|
<html>
  <head>


        <link rel="shortcut icon" href="/images/favicon.png" type="image/x-icon" />
        <meta name="robots" content="noindex,nofollow" />
        
  <link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.8/css/all.css">
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->


  
        
<title>Hosting Control Panel</title>
  </head>
  
<body id="LoginForm">

<div class="container">



<div class="login-form">
<div class="main-div">

|FAILEDLOGIN|
    <div class="panel">
   <h2>Control Panel Login</h2>
   <p>Please enter your Username and password</p> 
   </div>
   
<script>
        $(document).ready(function() {
            $("#login_form").submit(function(e) {
                e.preventDefault();
                e.stopImmediatePropagation();
                $('.ajax_response').html();
 
                var url = $(this).attr('action');
                $('.ajax_response').html('');
                $('#submit').html('Logging in...');
                $.ajax({
                        cache: false,
                        type: "POST",
                        url: url,
                        data: $(this).serialize(), // serializes the form's elements.
                        success: function(response)
                        {
                            var json = jQuery.parseJSON(response);
                            if ( json.status == 'success' ) {
                                //$('.ajax_response').html(json.message);
                                window.location.href = json.location;
                            }
                            else {
                                $('.ajax_response').html(json.message);
                                $('#submit').html('Login');
                            }
                        }
                });
            });
        });
    </script>
    <div class="ajax_response"></div>   
                     
                    <form action="/CMD_LOGIN" method="POST" id="login_form">
                    <label for="exampleInputUsername">Username</label>
                    <div class="input-group">
                    
                                <div class="input-group-prepend">
                                    <span class="input-group-text"><i class="fa fa-user"></i></span>
                                </div>
                                <input type=hidden name=referer value="|REFERER|">
                                <input type="text" name="username" class="form-control" placeholder="Username"/>
                    </div><br />
         
                    <label for="exampleInputPassword">Password</label>
                    <div class="input-group">
                                <div class="input-group-prepend">
                                    <span class="input-group-text"><i class="fa fa-key icon"></i></span>
                                </div>
                                <input type="password" name="password" class="form-control" placeholder="Password"/>
                    </div><br />
<br />
              <button type="submit" class="btn btn-primary" id="submit">Log in</button>
</form>

|*if LOST_PASSWORD="yes"|
<a href="/CMD_LOST_PASSWORD">Forgot your password?</a>
|*endif|


    
    </div>
    
<p class="bottom-text"> <img src="/images/favicon.png"/> <br><br> Copyright 2019  Hosting Control Panel</p>
</div>
</div>
</div>


</body>
</html>
 
Back
Top