This commit is contained in:
commit
63d6430b4d
9
app.php
9
app.php
@ -14,7 +14,7 @@ if ($_SESSION['loggedin'] != true) {
|
|||||||
require_once __DIR__ . "/pages.php";
|
require_once __DIR__ . "/pages.php";
|
||||||
|
|
||||||
$pageid = "home";
|
$pageid = "home";
|
||||||
if (!is_empty($_GET['page'])) {
|
if (isset($_GET['page']) && !is_empty($_GET['page'])) {
|
||||||
$pg = strtolower($_GET['page']);
|
$pg = strtolower($_GET['page']);
|
||||||
$pg = preg_replace('/[^0-9a-z_]/', "", $pg);
|
$pg = preg_replace('/[^0-9a-z_]/', "", $pg);
|
||||||
if (array_key_exists($pg, PAGES) && file_exists(__DIR__ . "/pages/" . $pg . ".php")) {
|
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/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/material-color/material-color.min.css>; rel=preload; as=style", false);
|
||||||
header("Link: <static/css/app.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
|
<?php
|
||||||
// Alert messages
|
// 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
|
// optional string generation argument
|
||||||
if (is_empty($_GET['arg'])) {
|
if (!isset($_GET['arg']) || is_empty($_GET['arg'])) {
|
||||||
$alertmsg = lang(MESSAGES[$_GET['msg']]['string'], false);
|
$alertmsg = lang(MESSAGES[$_GET['msg']]['string'], false);
|
||||||
} else {
|
} else {
|
||||||
$alertmsg = lang2(MESSAGES[$_GET['msg']]['string'], ["arg" => strip_tags($_GET['arg'])], false);
|
$alertmsg = lang2(MESSAGES[$_GET['msg']]['string'], ["arg" => strip_tags($_GET['arg'])], false);
|
||||||
@ -123,7 +124,7 @@ END;
|
|||||||
<?php
|
<?php
|
||||||
$curpagefound = false;
|
$curpagefound = false;
|
||||||
foreach (PAGES as $id => $pg) {
|
foreach (PAGES as $id => $pg) {
|
||||||
if ($pg['navbar'] === TRUE) {
|
if (isset($pg['navbar']) && $pg['navbar'] === TRUE) {
|
||||||
if ($pageid == $id) {
|
if ($pageid == $id) {
|
||||||
$curpagefound = true;
|
$curpagefound = true;
|
||||||
?>
|
?>
|
||||||
|
@ -77,6 +77,7 @@ if (checkLoginServer()) {
|
|||||||
} else {
|
} else {
|
||||||
$alert = lang("login server unavailable", false);
|
$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/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/material-color/material-color.min.css>; rel=preload; as=style", false);
|
||||||
header("Link: <static/css/index.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