2 $arr = []; Hook
::run(HOOKTYPE_PRE_HEADER
, $arr); ?>
5 <?php
if (is_auth_provided() && !str_ends_with($_SERVER['SCRIPT_FILENAME'], "setup.php"))
9 <div
class="media-body">
11 <meta name
="viewport" content
="width=device-width, initial-scale=1">
12 <meta name
="HandheldFriendly" content
="true">
14 <link href
="<?php echo get_config("base_url
"); ?>css/unrealircd-admin.css" rel
="stylesheet">
17 <!-- Latest compiled
and minified CSS
-->
18 <link rel
="stylesheet" href
="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css">
20 <!-- Font Awesome JS
-->
21 <script defer src
="https://use.fontawesome.com/releases/v6.2.1/js/solid.js" integrity
="sha384-tzzSw1/Vo+0N5UhStP3bvwWPq+uvzCMfrN1fEFe+xBmv1C/AtVX5K0uZtmcHitFZ" crossorigin
="anonymous"></script
>
22 <script defer src
="https://use.fontawesome.com/releases/v6.2.1/js/fontawesome.js" integrity
="sha384-6OIrr52G08NpOFSZdxxz1xdNSndlD4vdcf/q2myIUVO0VsqaGHJsB0RaBE01VTOY" crossorigin
="anonymous"></script
>
24 <!-- Font Awesome icons
-->
25 <link rel
="stylesheet" href
="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css">
26 <title
>UnrealIRCd Panel
</title
>
27 <link rel
="icon" type
="image/x-icon" href
="<?php echo get_config("base_url
"); ?>img/favicon.ico">
29 <body role
="document">
30 <div aria
-live
="polite" aria
-atomic
="true">
31 <div id
="toaster" style
="right: 0; bottom: 50px; z-index: 5;" class="position-fixed bottom-0 right-0 p-4">
32 <!-- insert your javascript bread in here to make toast
-->
35 <script src
="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity
="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin
="anonymous"></script
>
36 <script src
="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity
="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin
="anonymous"></script
>
37 <script src
="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.min.js" integrity
="sha384-+sLIOodYLS7CIrQpBjl+C7nPvqq+FbNUBDunl/OZv93DB7Ln/533i8e/mZXLi/P+" crossorigin
="anonymous"></script
>
38 <script src
="<?php echo get_config("base_url
"); ?>js/unrealircd-admin.js"></script
>
40 var BASE_URL
= "<?php echo get_config("base_url
"); ?>";
41 function timeoutCheck() {
42 var xhttp
= new XMLHttpRequest();
43 xhttp
.onreadystatechange
= function() {
44 if (this
.readyState
== 4 && this
.status
== 200) {
45 var data
= JSON
.parse(this
.responseText
);
46 if (data
.session
== 'none')
47 window
.location
= BASE_URL +
'login/?timeout=1&redirect=' +
encodeURIComponent(window
.location
.pathname
);
50 xhttp
.open("GET", BASE_URL +
"api/timeout.php", true);
55 StartStreamNotifs(BASE_URL +
"api/notification.php");
56 setInterval(timeoutCheck
, 15000);
58 <link rel
="stylesheet" href
="https://www.w3schools.com/w3css/4/w3.css">
61 transition
: left
0.3s
;
64 transition
: left
0.3s
;
69 transition
: left
0.3s
;
73 transition
: padding
-left
0.3s
;
75 .list-group
-item
-action
{
79 <nav id
="sidebarlol" style
="left: 0" class="w3-sidebar navbar-expand-sm bg-dark padding-top me-5 ma-5">
80 <div
class="list-group">
81 <div
class="badge badge-secondary rounded-pill">Main Menu
</div
>
84 function show_page_item($name, $page, $nestlevel)
88 $class = "nav-link nav-item";
89 if (is_string($active_page) && $page == $active_page)
95 $name = " ".$name;
96 $style = "padding-bottom: 1px; padding-top: 1px";
102 $style = "padding-bottom: 0px;";
104 echo "<a href=\"".get_config("base_url").$page."\" style=\"text-decoration: none\">\n";
106 echo "<div class=\"big-page-item d-flex justify-content-between align-items-center $class list-group-item-action\" style=\"$style\">$name
107 <div class=\"text-right padding-top\">
108 <i class=\"fa fa-$icon\"></i>
110 if (!is_array($page))
118 foreach ($page as $subname=>$subpage)
119 show_page_item($subname, $subpage, 1);
123 function show_page_item_mobile($name, $page, $nestlevel)
127 $class = "nav-link nav-item";
128 if (is_string($active_page) && $page == $active_page)
134 $name = " ".$name;
135 $style = "padding-bottom: 1px; padding-top: 1px";
141 $style = "padding-bottom: 0px;";
143 echo "<a href=\"".get_config("base_url").$page."\" >\n";
145 echo "<div class=\"bg-dark lil-page-item d-flex justify-content-between align-items-center $class\" style=\"$style\">$name
146 <div class=\"text-right padding-top\">
147 <i class=\"fa fa-$icon\"></i>
149 if (!is_array($page))
157 foreach ($page as $subname=>$subpage)
158 show_page_item($subname, $subpage, 1);
161 foreach($pages as $name=>$page)
162 show_page_item($name, $page, 0);
167 <div
class="container-fluid">
169 <!-- Fixed navbar
-->
170 <nav
class="topbar navbar navbar-expand-sm navbar-dark bg-dark fixed-top z-index padding-top">
171 <a
class="navbar-brand" href
="<?php echo get_config("base_url
"); ?>"><img src
="<?php echo get_config("base_url
"); ?>img/favicon.ico" height
="25" width
="25"> UnrealIRCd Admin Panel
</a
>
172 <button
class="navbar-toggler" type
="button" data
-toggle
="collapse" data
-target
="#collapsibleNavbar" aria
-controls
="collapsibleNavbar" aria
-expanded
="false" aria
-label
="Toggle navigation">
173 <span
class="navbar-toggler-icon"></span
>
175 <div
class="collapse navbar-collapse" id
="collapsibleNavbar">
176 <ul id
="big-nav-items" class="navbar-nav mr-auto">
180 foreach ($pages as $name => $page)
181 show_page_item($name, $page, 0);
191 <div id
="main_contain" class="container-fluid" style
="padding-left: 180px" role
="main">
194 function nav_resize_check()
196 var width
= window
.innerWidth
;
197 var sidebar
= document
.getElementById('sidebarlol');
198 var top
= document
.getElementById('big-nav-items');
202 sidebar
.style
.display
= 'none';
203 top
.style
.display
= '';
207 sidebar
.style
.display
= '';
208 top
.style
.display
= 'none';
212 window
.addEventListener('resize', function() {