2 <?php
include "common.php";
6 if ($_POST['username'] && $_POST['password'])
8 /* insert magic hacks here */
9 header('Location: ' . BASE_URL
);
11 $failmsg = "Couldn't log you in: Missing credentials";
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">
19 <!-- jQuery library
-->
20 <script src
="https://cdn.jsdelivr.net/npm/jquery@3.6.1/dist/jquery.slim.min.js"></script
>
23 <script src
="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script
>
25 <!-- Latest compiled JavaScript
-->
26 <script src
="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script
>
28 <!-- Font Awesome icons
-->
29 <link rel
="stylesheet" href
="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css">
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">
41 $
(document
).ready(function(){
42 $
("#loginModal").modal('show');
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
>
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" >
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">
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
>
73 <?php
require_once "footer.php";