File size: 1,176 Bytes
628740b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Login</title>
  <link rel="stylesheet" href="style.css">
  <script>
    // Disable right click & inspect
    document.addEventListener("contextmenu", e => e.preventDefault());
    document.onkeydown = function(e) {
      if (e.ctrlKey && (e.key === 'u' || e.key === 'U')) return false;
      if (e.ctrlKey && e.shiftKey && (e.key === 'I' || e.key === 'i')) return false;
      if (e.key === "F12") return false;
    };
  </script>
</head>
<body>
  <form action="login.php" method="POST" id="login-form">
    <h2>Login</h2>
    <?php 
      session_start();
      if (!empty($_SESSION['error'])) {
          echo "<p class='error'>" . $_SESSION['error'] . "</p>";
          unset($_SESSION['error']);
      }
    ?>
    <div class="form-group">
      <label for="username">Username / Email / Phone</label>
      <input type="text" id="username" name="username" required>
    </div>
    <div class="form-group">
      <label for="password">Password</label>
      <input type="password" id="password" name="password" required>
    </div>
    <button type="submit">Login</button>
  </form>
</body>
</html>