This commit is contained in:
commit
c346f752ef
9
app.php
9
app.php
@ -14,7 +14,7 @@ if ($_SESSION['loggedin'] != true) {
|
||||
require_once __DIR__ . "/pages.php";
|
||||
|
||||
$pageid = "home";
|
||||
if (!is_empty($_GET['page'])) {
|
||||
if (isset($_GET['page']) && !is_empty($_GET['page'])) {
|
||||
$pg = strtolower($_GET['page']);
|
||||
$pg = preg_replace('/[^0-9a-z_]/', "", $pg);
|
||||
if (array_key_exists($pg, PAGES) && file_exists(__DIR__ . "/pages/" . $pg . ".php")) {
|
||||
@ -24,6 +24,7 @@ if (!is_empty($_GET['page'])) {
|
||||
}
|
||||
}
|
||||
|
||||
header("Link: <static/fonts/Roboto.css>; rel=preload; as=style", false);
|
||||
header("Link: <static/css/bootstrap.min.css>; rel=preload; as=style", false);
|
||||
header("Link: <static/css/material-color/material-color.min.css>; rel=preload; as=style", false);
|
||||
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);
|
||||
|
||||
<?php
|
||||
// Alert messages
|
||||
if (!is_empty($_GET['msg']) && array_key_exists($_GET['msg'], MESSAGES)) {
|
||||
if (isset($_GET['msg']) && !is_empty($_GET['msg']) && array_key_exists($_GET['msg'], MESSAGES)) {
|
||||
// optional string generation argument
|
||||
if (is_empty($_GET['arg'])) {
|
||||
if (!isset($_GET['arg']) || is_empty($_GET['arg'])) {
|
||||
$alertmsg = lang(MESSAGES[$_GET['msg']]['string'], false);
|
||||
} else {
|
||||
$alertmsg = lang2(MESSAGES[$_GET['msg']]['string'], ["arg" => strip_tags($_GET['arg'])], false);
|
||||
@ -123,7 +124,7 @@ END;
|
||||
<?php
|
||||
$curpagefound = false;
|
||||
foreach (PAGES as $id => $pg) {
|
||||
if ($pg['navbar'] === TRUE) {
|
||||
if (isset($pg['navbar']) && $pg['navbar'] === TRUE) {
|
||||
if ($pageid == $id) {
|
||||
$curpagefound = true;
|
||||
?>
|
||||
|
@ -77,6 +77,7 @@ if (checkLoginServer()) {
|
||||
} else {
|
||||
$alert = lang("login server unavailable", false);
|
||||
}
|
||||
header("Link: <static/fonts/Roboto.css>; rel=preload; as=style", false);
|
||||
header("Link: <static/css/bootstrap.min.css>; rel=preload; as=style", false);
|
||||
header("Link: <static/css/material-color/material-color.min.css>; rel=preload; as=style", false);
|
||||
header("Link: <static/css/index.css>; rel=preload; as=style", false);
|
||||
|
2
static/css/bootstrap.min.css
vendored
2
static/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user