]>
Commit | Line | Data |
---|---|---|
1 | <!DOCTYPE html> | |
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 | ||
15 | <script src="js/unrealircd-admin.js"></script> | |
16 | <title>UnrealIRCd Panel</title> | |
17 | <link rel="icon" type="image/x-icon" href="<?php echo BASE_URL; ?>img/favicon.ico"> | |
18 | <link href="<?php echo BASE_URL; ?>css/unrealircd-admin.css" rel="stylesheet"> | |
19 | </head> | |
20 | <body role="document"> | |
21 | <div class="container-fluid"> | |
22 | ||
23 | <!-- Fixed navbar --> | |
24 | <nav class="navbar navbar-expand-sm navbar-dark bg-dark fixed-top"> | |
25 | <ul class="nav navbar-nav"> | |
26 | <a class="navbar-brand" href="index.php"><img src="<?php echo BASE_URL; ?>img/favicon.ico" height="25" width="25"> UnrealIRCd Admin Panel</a> | |
27 | <?php | |
28 | ||
29 | $active_page = false; | |
30 | /* Needs to be a separate step due to multiple matches */ | |
31 | foreach($pages as $name=>$page) | |
32 | if (str_ends_with($_SERVER['SCRIPT_FILENAME'], $page)) | |
33 | $active_page = $page; | |
34 | ||
35 | foreach($pages as $name=>$page) | |
36 | { | |
37 | $class = "class=\"nav-item\""; | |
38 | if ($page == $active_page) | |
39 | $class = str_replace("\"nav-item\"", "\"nav-item active\"", $class); | |
40 | ||
41 | echo " <li $class><a class=\"nav-link\" href=\"".BASE_URL.$page."\">$name</a></li> \n"; | |
42 | } | |
43 | ?> | |
44 | ||
45 | </ul> | |
46 | </nav><br> | |
47 | </div> | |
48 | ||
49 | <div class="container-fluid" role="main"> |