]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blame - header.php
Indentate
[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
7 <!-- This will make it so that it "works" on mobile device. Not sure it's a good idea yet though
8<meta name="viewport" content="width=device-width, initial-scale=1">
9<meta name="HandheldFriendly" content="true">
10-->
11
911a6472
BM
12 <!-- Latest compiled and minified CSS -->
13<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css">
14
15<!-- jQuery library -->
16<script src="https://cdn.jsdelivr.net/npm/jquery@3.6.1/dist/jquery.slim.min.js"></script>
17
18<!-- Popper JS -->
19<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
20
21<!-- Latest compiled JavaScript -->
22<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script>
23
bca6dbd2
VP
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
238a4024 27<script src="<?php echo BASE_URL; ?>js/unrealircd-admin.js"></script>
e98b5a51 28<title>UnrealIRCd Panel</title>
27efe895 29<link rel="icon" type="image/x-icon" href="<?php echo BASE_URL; ?>img/favicon.ico">
8cfa32c5 30<link href="<?php echo BASE_URL; ?>css/unrealircd-admin.css" rel="stylesheet">
911a6472
BM
31</head>
32<body role="document">
4896fbb9
VP
33<div class="container-fluid">
34
5cc8ca4a 35 <!-- Fixed navbar -->
ce9cf366 36 <nav class="navbar navbar-expand-sm navbar-dark bg-dark fixed-top z-index padding-top">
5cc8ca4a 37 <ul class="nav navbar-nav">
408491c6 38 <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 39<?php
d1d9caa9 40
4d71d431 41$active_page = NULL;
10102cdc 42
a2712ef5
VP
43foreach ($pages as $name => $page)
44{
45 $script = $_SERVER['SCRIPT_FILENAME'];
7720c0cb 46 $tok = split($script, "/");
15b6679d 47 if (strlen($page) == 0) {
a2712ef5
VP
48 $active_page = "";
49 }
15b6679d
VP
50 else if (str_ends_with($script, BASE_URL . "index.php") && BASE_URL != "/" && !strlen($tok[0]))
51 {
15b6679d
VP
52 $active_page = $tok[0];
53 }
a2712ef5
VP
54 else if (!str_ends_with($page, ".php"))
55 {
56 $script2 = rtrim($script, "/index.php");
57 if (str_ends_with($script2, $page))
58 $active_page = $page;
59 }
60 else if (str_ends_with($script, $page))
61 {
27efe895 62 $active_page = $page;
4d71d431
VP
63 } elseif (!$active_page)
64 $active_page = false;
a2712ef5 65}
1e6ffd06
BM
66foreach($pages as $name=>$page)
67{
96de0b9c 68 $class = "class=\"nav-item\"";
4d71d431 69 if (is_string($active_page) && $page == $active_page)
96de0b9c 70 $class = str_replace("\"nav-item\"", "\"nav-item active\"", $class);
5cc8ca4a 71
27efe895 72 echo " <li $class><a class=\"nav-link\" href=\"".BASE_URL.$page."\">$name</a></li> \n";
1e6ffd06 73}
1e6ffd06 74?>
4896fbb9 75
5cc8ca4a 76 </ul>
d843c1de 77 </nav><br>
e98b5a51 78</div>
911a6472
BM
79
80<div class="container-fluid" role="main">