|
@@ -0,0 +1,32 @@
|
|
|
+ <!DOCTYPE html>
|
|
|
+ <html>
|
|
|
+ <head>
|
|
|
+ <title>Login</title>
|
|
|
+ <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">
|
|
|
+ </script>
|
|
|
+ </head>
|
|
|
+ <body>
|
|
|
+ <h1>Admin Login</h1>
|
|
|
+ <p>Please enter your password here</p>
|
|
|
+ <input id="password" type="password">
|
|
|
+
|
|
|
+ <button onclick="handleLogin()">Login</button>
|
|
|
+
|
|
|
+ <script>
|
|
|
+ function handleLogin() {
|
|
|
+ var password = $("#password").val();
|
|
|
+ $.ajax({
|
|
|
+ url: "/login",
|
|
|
+ data: {password: password},
|
|
|
+ success: function(value){
|
|
|
+ if (value == true){
|
|
|
+ alert("You have logged in");
|
|
|
+ }else{
|
|
|
+ alert("Incorrect Password");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+ </body>
|
|
|
+ </html>
|