Skylar Ittner 1 year ago
parent
commit
bb5db2bcee
3 changed files with 7 additions and 5 deletions
  1. 5
    4
      app.php
  2. 1
    0
      index.php
  3. 1
    1
      static/css/bootstrap.min.css

+ 5
- 4
app.php View File

@@ -14,7 +14,7 @@ if ($_SESSION['loggedin'] != true) {
14 14
 require_once __DIR__ . "/pages.php";
15 15
 
16 16
 $pageid = "home";
17
-if (!is_empty($_GET['page'])) {
17
+if (isset($_GET['page']) && !is_empty($_GET['page'])) {
18 18
     $pg = strtolower($_GET['page']);
19 19
     $pg = preg_replace('/[^0-9a-z_]/', "", $pg);
20 20
     if (array_key_exists($pg, PAGES) && file_exists(__DIR__ . "/pages/" . $pg . ".php")) {
@@ -24,6 +24,7 @@ if (!is_empty($_GET['page'])) {
24 24
     }
25 25
 }
26 26
 
27
+header("Link: <static/fonts/Roboto.css>; rel=preload; as=style", false);
27 28
 header("Link: <static/css/bootstrap.min.css>; rel=preload; as=style", false);
28 29
 header("Link: <static/css/material-color/material-color.min.css>; rel=preload; as=style", false);
29 30
 header("Link: <static/css/app.css>; rel=preload; as=style", false);
@@ -65,9 +66,9 @@ header("Link: <static/js/bootstrap.min.js>; rel=preload; as=script", false);
65 66
 
66 67
         <?php
67 68
 // Alert messages
68
-        if (!is_empty($_GET['msg']) && array_key_exists($_GET['msg'], MESSAGES)) {
69
+        if (isset($_GET['msg']) && !is_empty($_GET['msg']) && array_key_exists($_GET['msg'], MESSAGES)) {
69 70
             // optional string generation argument
70
-            if (is_empty($_GET['arg'])) {
71
+            if (!isset($_GET['arg']) || is_empty($_GET['arg'])) {
71 72
                 $alertmsg = lang(MESSAGES[$_GET['msg']]['string'], false);
72 73
             } else {
73 74
                 $alertmsg = lang2(MESSAGES[$_GET['msg']]['string'], ["arg" => strip_tags($_GET['arg'])], false);
@@ -123,7 +124,7 @@ END;
123 124
                     <?php
124 125
                     $curpagefound = false;
125 126
                     foreach (PAGES as $id => $pg) {
126
-                        if ($pg['navbar'] === TRUE) {
127
+                        if (isset($pg['navbar']) && $pg['navbar'] === TRUE) {
127 128
                             if ($pageid == $id) {
128 129
                                 $curpagefound = true;
129 130
                                 ?>

+ 1
- 0
index.php View File

@@ -77,6 +77,7 @@ if (checkLoginServer()) {
77 77
 } else {
78 78
     $alert = lang("login server unavailable", false);
79 79
 }
80
+header("Link: <static/fonts/Roboto.css>; rel=preload; as=style", false);
80 81
 header("Link: <static/css/bootstrap.min.css>; rel=preload; as=style", false);
81 82
 header("Link: <static/css/material-color/material-color.min.css>; rel=preload; as=style", false);
82 83
 header("Link: <static/css/index.css>; rel=preload; as=style", false);

+ 1
- 1
static/css/bootstrap.min.css
File diff suppressed because it is too large
View File


Loading…
Cancel
Save