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