]>
Commit | Line | Data |
---|---|---|
1 | ||
2 | <?php include "common.php"; | |
3 | ||
4 | if (!empty($_POST)) | |
5 | { | |
6 | if ($_POST['username'] && $_POST['password']) | |
7 | { | |
8 | /* insert magic hacks here */ | |
9 | header('Location: ' . BASE_URL); | |
10 | } else | |
11 | $failmsg = "Couldn't log you in: Missing credentials"; | |
12 | } | |
13 | ||
14 | ?><!DOCTYPE html> | |
15 | <head> | |
16 | <!-- Latest compiled and minified CSS --> | |
17 | <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css"> | |
18 | ||
19 | <!-- jQuery library --> | |
20 | <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.1/dist/jquery.slim.min.js"></script> | |
21 | ||
22 | <!-- Popper JS --> | |
23 | <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script> | |
24 | ||
25 | <!-- Latest compiled JavaScript --> | |
26 | <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script> | |
27 | ||
28 | <!-- Font Awesome icons --> | |
29 | <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css"> | |
30 | ||
31 | <script src="<?php echo BASE_URL; ?>js/unrealircd-admin.js"></script> | |
32 | <title>UnrealIRCd Panel</title> | |
33 | <link rel="icon" type="image/x-icon" href="<?php echo BASE_URL; ?>img/favicon.ico"> | |
34 | <link href="<?php echo BASE_URL; ?>css/unrealircd-admin.css" rel="stylesheet"> | |
35 | </head><div class="text-center"> | |
36 | <a href="<?php echo BASE_URL; ?>login.php"><button type="button" style="margin:0; top:50%; position: absolute;" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#loginModaltitle"> | |
37 | Login to continue | |
38 | </button></a> | |
39 | </div> | |
40 | <script> | |
41 | $(document).ready(function(){ | |
42 | $("#loginModal").modal('show'); | |
43 | }); | |
44 | </script> | |
45 | <body role="document"> | |
46 | <div class="container-fluid"> | |
47 | <form method="post" action="login.php"> | |
48 | <div class="modal" id="loginModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="loginModal" aria-hidden="true"> | |
49 | <div class="modal-dialog modal-dialog-centered"> | |
50 | <div class="modal-content"> | |
51 | <div class="modal-header" style="margin: 0 auto;"> | |
52 | <h3 class="modal-title" id="loginModaltitle"><img src="<?php echo BASE_URL; ?>img/favicon.ico"> Log in to use Admin Panel</h3> | |
53 | </div> | |
54 | <div class="modal-body"> | |
55 | <div class="form-group"> | |
56 | <?php if (isset($failmsg)) Message::Fail($failmsg); ?> | |
57 | <label for="username">Username / Nick:</label> | |
58 | <input style="width:90%;" type="text" class="form-control" name="username" id="username" > | |
59 | </div> | |
60 | <div class="form-group"> | |
61 | <label for="password">Password:</label> | |
62 | <input style="width:90%;" type="password" class="form-control" name="password" id="password"> | |
63 | </div> | |
64 | </div> | |
65 | <div class="modal-footer"> | |
66 | <a class="btn btn-secondary" href="/">Cancel</a> | |
67 | <button type="submit" class="btn btn-primary">Log-In</button> | |
68 | </div> | |
69 | </div> | |
70 | </div> | |
71 | </div> | |
72 | </form> | |
73 | <?php require_once "footer.php"; |