3 $arr = []; Hook
::run(HOOKTYPE_PRE_HEADER
, $arr);
8 <div
class="media-body">
10 <meta name
="viewport" content
="width=device-width, initial-scale=1">
11 <meta name
="HandheldFriendly" content
="true">
13 <link href
="<?php echo get_config("base_url
"); ?>css/unrealircd-admin.css" rel
="stylesheet">
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 <!-- Font Awesome JS
-->
20 <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
>
21 <script defer src
="https://use.fontawesome.com/releases/v6.2.1/js/fontawesome.js" integrity
="sha384-6OIrr52G08NpOFSZdxxz1xdNSndlD4vdcf/q2myIUVO0VsqaGHJsB0RaBE01VTOY" crossorigin
="anonymous"></script
>
23 <!-- Font Awesome icons
-->
24 <link rel
="stylesheet" href
="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css">
25 <title
>UnrealIRCd Panel
</title
>
26 <link rel
="icon" type
="image/x-icon" href
="<?php echo get_config("base_url
"); ?>img/favicon.ico">
28 <body role
="document">
29 <div aria
-live
="polite" aria
-atomic
="true">
30 <div id
="toaster" style
="right: 0; bottom: 50px; z-index: 5;" class="position-fixed bottom-0 right-0 p-4">
31 <!-- insert your javascript bread in here to make toast
-->
34 <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
>
35 <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
>
36 <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
>
37 <script src
="<?php echo get_config("base_url
"); ?>js/unrealircd-admin.js"></script
>
39 var BASE_URL
= "<?php echo get_config("base_url
"); ?>";
40 function timeoutCheck() {
41 var xhttp
= new XMLHttpRequest();
42 xhttp
.onreadystatechange
= function() {
43 if (this
.readyState
== 4 && this
.status
== 200) {
44 var data
= JSON
.parse(this
.responseText
);
45 if (data
.session
== 'none')
46 window
.location
= BASE_URL +
'login/?timeout=1&redirect=' +
encodeURIComponent(window
.location
.pathname
);
49 xhttp
.open("GET", BASE_URL +
"api/timeout.php", true);
54 StartStreamNotifs(BASE_URL +
"api/notification.php");
55 setInterval(timeoutCheck
, 15000);
57 <link rel
="stylesheet" href
="https://www.w3schools.com/w3css/4/w3.css">
60 transition
: left
0.3s
;
63 transition
: left
0.3s
;
68 transition
: left
0.3s
;
72 transition
: padding
-left
0.3s
;
74 .list-group
-item
-action
{
78 <nav id
="sidebarlol" style
="left: 0" class="w3-sidebar navbar-expand-md bg-dark padding-top me-5 ma-5">
79 <div
class="list-group">
80 <div
class="badge badge-secondary rounded-pill">Main Menu
</div
>
83 function show_page_item($name, $page, $nestlevel)
87 $class = "nav-link nav-item";
88 if (is_string($active_page) && $page == $active_page)
94 $name = " ".$name;
95 $style = "padding-bottom: 1px; padding-top: 1px";
101 $style = "padding-bottom: 0px;";
103 echo "<a href=\"".get_config("base_url").$page."\" style=\"text-decoration: none\">\n";
105 echo "<div class=\"big-page-item d-flex justify-content-between align-items-center $class list-group-item-action\" style=\"$style\">$name
106 <div class=\"text-right padding-top\">
107 <i class=\"fa fa-$icon\"></i>
109 if (!is_array($page))
117 foreach ($page as $subname=>$subpage)
118 show_page_item($subname, $subpage, 1);
122 function show_page_item_mobile($name, $page, $nestlevel)
126 $class = "nav-link nav-item";
127 if (is_string($active_page) && $page == $active_page)
133 $name = " ".$name;
134 $style = "padding-bottom: 1px; padding-top: 1px";
140 $style = "padding-bottom: 0px;";
142 echo "<a href=\"".get_config("base_url").$page."\" >\n";
144 echo "<div class=\"bg-dark lil-page-item d-flex justify-content-between align-items-center $class\" style=\"$style\">$name
145 <div class=\"text-right padding-top\">
146 <i class=\"fa fa-$icon\"></i>
148 if (!is_array($page))
156 foreach ($page as $subname=>$subpage)
157 show_page_item($subname, $subpage, 1);
160 foreach($pages as $name=>$page)
161 show_page_item($name, $page, 0);
166 <div
class="container-fluid">
168 <!-- Fixed navbar
-->
169 <nav
class="topbar navbar navbar-expand-md navbar-dark bg-dark fixed-top z-index padding-top">
170 <button
class="navbar-toggler" type
="button" data
-toggle
="collapse" data
-target
="#collapsibleNavbar" aria
-controls
="collapsibleNavbar" aria
-expanded
="false" aria
-label
="Toggle navigation">
171 <span
class="navbar-toggler-icon"></span
>
173 <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
>
174 <div
class="collapse navbar-collapse" id
="collapsibleNavbar">
175 <ul id
="big-nav-items" class="navbar-nav mr-auto">
179 foreach ($pages as $name => $page)
180 show_page_item($name, $page, 0);
190 <div id
="main_contain" class="container-fluid" style
="padding-left: 180px" role
="main">
193 function nav_resize_check()
195 var width
= window
.innerWidth
;
196 var sidebar
= document
.getElementById('sidebarlol');
197 var top
= document
.getElementById('big-nav-items');
198 var maincontainer
= document
.getElementById('main_contain');
202 sidebar
.style
.display
= 'none';
203 top
.style
.display
= '';
204 maincontainer
.style
.paddingLeft
= "10px";
208 sidebar
.style
.display
= '';
209 top
.style
.display
= 'none';
210 maincontainer
.style
.paddingLeft
= "180px";
214 window
.addEventListener('resize', function() {