]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blame - header.php
Fix CSS for badges and icons on overview
[irc/unrealircd/unrealircd-webpanel.git] / header.php
CommitLineData
b44a2e97 1<?php $arr = []; Hook::run(HOOKTYPE_PRE_HEADER, $arr); ?>
e98b5a51 2<!DOCTYPE html>
911a6472 3<head>
ce9cf366
VP
4<div class="media">
5<div class="media-body">
6
33f512fa
VP
7 <meta name="viewport" content="width=device-width, initial-scale=1">
8 <meta name="HandheldFriendly" content="true">
9
31ef838c
VP
10<link href="<?php echo BASE_URL; ?>css/unrealircd-admin.css" rel="stylesheet">
11
ce9cf366 12
911a6472
BM
13 <!-- Latest compiled and minified CSS -->
14<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css">
15
16<!-- jQuery library -->
17<script src="https://cdn.jsdelivr.net/npm/jquery@3.6.1/dist/jquery.slim.min.js"></script>
18
19<!-- Popper JS -->
20<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
21
22<!-- Latest compiled JavaScript -->
23<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script>
24
bca6dbd2
VP
25<!-- Font Awesome icons -->
26<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css">
27
238a4024 28<script src="<?php echo BASE_URL; ?>js/unrealircd-admin.js"></script>
e98b5a51 29<title>UnrealIRCd Panel</title>
27efe895 30<link rel="icon" type="image/x-icon" href="<?php echo BASE_URL; ?>img/favicon.ico">
911a6472
BM
31</head>
32<body role="document">
4896fbb9
VP
33<div class="container-fluid">
34
5cc8ca4a 35 <!-- Fixed navbar -->
0ce9e377 36 <nav class="navbar navbar-expand-sm navbar-dark bg-dark fixed-top z-index padding-top"><a class="navbar-brand" href="<?php echo BASE_URL; ?>"><img src="<?php echo BASE_URL; ?>img/favicon.ico" height="25" width="25"> UnrealIRCd Admin Panel</a>
33f512fa
VP
37 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
38 <span class="navbar-toggler-icon"></span>
39 </button>
40 <div class="collapse navbar-collapse" id="collapsibleNavbar">
41 <ul class="navbar-nav mr-auto">
0ce9e377 42
1e6ffd06 43<?php
d1d9caa9 44
4d71d431 45$active_page = NULL;
10102cdc 46
a2712ef5
VP
47foreach ($pages as $name => $page)
48{
49 $script = $_SERVER['SCRIPT_FILENAME'];
7720c0cb 50 $tok = split($script, "/");
33f512fa
VP
51 if (is_array($page))
52 continue;
53 if (is_string($page) && strlen($page) == 0) {
a2712ef5
VP
54 $active_page = "";
55 }
15b6679d
VP
56 else if (str_ends_with($script, BASE_URL . "index.php") && BASE_URL != "/" && !strlen($tok[0]))
57 {
15b6679d
VP
58 $active_page = $tok[0];
59 }
a2712ef5
VP
60 else if (!str_ends_with($page, ".php"))
61 {
62 $script2 = rtrim($script, "/index.php");
63 if (str_ends_with($script2, $page))
64 $active_page = $page;
65 }
66 else if (str_ends_with($script, $page))
67 {
27efe895 68 $active_page = $page;
4d71d431
VP
69 } elseif (!$active_page)
70 $active_page = false;
a2712ef5 71}
1e6ffd06
BM
72foreach($pages as $name=>$page)
73{
96de0b9c 74 $class = "class=\"nav-item\"";
4d71d431 75 if (is_string($active_page) && $page == $active_page)
96de0b9c 76 $class = str_replace("\"nav-item\"", "\"nav-item active\"", $class);
5cc8ca4a 77
33f512fa
VP
78 if (is_string($page))
79 echo "<li $class><a class=\"nav-link\" href=\"".BASE_URL.$page."\">$name</a></li>\n";
80
81 elseif (is_array($page))
82 {
83 foreach ($page as $k => $v)
84 {
85 $first_page = $v;
86 break;
87 }
88 ?>
89 <li class="nav-item dropdown">
90 <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
91 <?php echo $name; ?>
92 </a>
93 <div class="dropdown-menu" aria-labelledby="navbarDropdown">
94 <?php foreach($page as $k => $p)
95 {
96 ?>
97 <a class="dropdown-item" href="<?php echo BASE_URL.$p;?>"><?php echo $k; ?></a>
98 <?php
99 } ?>
100 </div>
101 </li>
102 <?php
103
104 }
105
1e6ffd06 106}
1e6ffd06 107?>
4896fbb9 108
9e2a2ac0 109 </ul>
d843c1de 110 </nav><br>
e98b5a51 111</div>
911a6472
BM
112
113<div class="container-fluid" role="main">