]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blame - header.php
Update README about authentication plugin
[irc/unrealircd/unrealircd-webpanel.git] / header.php
CommitLineData
b44a2e97 1<?php $arr = []; Hook::run(HOOKTYPE_PRE_HEADER, $arr); ?>
e98b5a51 2<!DOCTYPE html>
911a6472
BM
3<head>
4 <!-- Latest compiled and minified CSS -->
5<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css">
6
7<!-- jQuery library -->
8<script src="https://cdn.jsdelivr.net/npm/jquery@3.6.1/dist/jquery.slim.min.js"></script>
9
10<!-- Popper JS -->
11<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
12
13<!-- Latest compiled JavaScript -->
14<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script>
15
bca6dbd2
VP
16<!-- Font Awesome icons -->
17<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css">
18
238a4024 19<script src="<?php echo BASE_URL; ?>js/unrealircd-admin.js"></script>
e98b5a51 20<title>UnrealIRCd Panel</title>
27efe895 21<link rel="icon" type="image/x-icon" href="<?php echo BASE_URL; ?>img/favicon.ico">
8cfa32c5 22<link href="<?php echo BASE_URL; ?>css/unrealircd-admin.css" rel="stylesheet">
911a6472
BM
23</head>
24<body role="document">
4896fbb9
VP
25<div class="container-fluid">
26
5cc8ca4a
VP
27 <!-- Fixed navbar -->
28 <nav class="navbar navbar-expand-sm navbar-dark bg-dark fixed-top">
29 <ul class="nav navbar-nav">
408491c6 30 <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>
1e6ffd06 31<?php
d1d9caa9 32
4d71d431 33$active_page = NULL;
10102cdc 34
a2712ef5
VP
35foreach ($pages as $name => $page)
36{
37 $script = $_SERVER['SCRIPT_FILENAME'];
7720c0cb 38 $tok = split($script, "/");
15b6679d 39 if (strlen($page) == 0) {
a2712ef5
VP
40 $active_page = "";
41 }
15b6679d
VP
42 else if (str_ends_with($script, BASE_URL . "index.php") && BASE_URL != "/" && !strlen($tok[0]))
43 {
15b6679d
VP
44 $active_page = $tok[0];
45 }
a2712ef5
VP
46 else if (!str_ends_with($page, ".php"))
47 {
48 $script2 = rtrim($script, "/index.php");
49 if (str_ends_with($script2, $page))
50 $active_page = $page;
51 }
52 else if (str_ends_with($script, $page))
53 {
27efe895 54 $active_page = $page;
4d71d431
VP
55 } elseif (!$active_page)
56 $active_page = false;
a2712ef5 57}
1e6ffd06
BM
58foreach($pages as $name=>$page)
59{
96de0b9c 60 $class = "class=\"nav-item\"";
4d71d431 61 if (is_string($active_page) && $page == $active_page)
96de0b9c 62 $class = str_replace("\"nav-item\"", "\"nav-item active\"", $class);
5cc8ca4a 63
27efe895 64 echo " <li $class><a class=\"nav-link\" href=\"".BASE_URL.$page."\">$name</a></li> \n";
1e6ffd06 65}
1e6ffd06 66?>
4896fbb9 67
5cc8ca4a 68 </ul>
d843c1de 69 </nav><br>
e98b5a51 70</div>
911a6472
BM
71
72<div class="container-fluid" role="main">