diff options
Diffstat (limited to 'includes/header.inc')
-rw-r--r-- | includes/header.inc | 40 |
1 files changed, 10 insertions, 30 deletions
diff --git a/includes/header.inc b/includes/header.inc index 4261f1c..02cb190 100644 --- a/includes/header.inc +++ b/includes/header.inc @@ -12,7 +12,7 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/.test")) { $isNormallyLoggedIn = false; -require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.inc"; global $isLoggedIn; global $isUserLoggedIn; +require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.inc"; global $isLoggedIn; global $isUserLoggedIn; global $isLowerLoggedIn; if ($readOnly && $isLoggedIn || $readOnly && $isUserLoggedIn) { $isLoggedIn = false; $isUserLoggedIn = false; @@ -21,12 +21,14 @@ if ($readOnly && $isLoggedIn || $readOnly && $isUserLoggedIn) { $pages = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/pages.json"), true); -function error($errno, $errstr, $file, $line) { - echo(' +if (!function_exists("error")) { + function error($errno, $errstr, $file, $line) { + echo(' <!-- -->"> - <div class="alert alert-danger" style="text-align: left;"> - <b>Error ' . $errno . ':</b> ' . $errstr . ' [' . $file . ':' . $line . '] - </div>'); + <div class="alert alert-danger" style="text-align: left;"> + <b>Error ' . $errno . ':</b> ' . $errstr . ' [' . $file . ':' . $line . '] + </div>'); + } } if (isset($_GET['errors'])) { @@ -54,7 +56,6 @@ require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/bitset.inc"; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/banner.inc"; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/rainbow.inc"; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/functions.inc"; -require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/ical/main.php"; ?> <!doctype html> @@ -65,32 +66,11 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/ical/main.php"; <link href="/assets/logo/custom.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script> - <title><?= $title ? $title . " · " : "" ?>Cold Haze</title> - <?php if (isset($_MemberName) && file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $_MemberName . ".png")): ?> - <link rel="shortcut icon" href="/assets/uploads/pt-<?= $_MemberName ?>.png" type="image/png"> - <?php else: ?> - <?php if (isset($_MemberPage) && file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/icons/favicon/" . $_MemberPage . ".png")): ?> - <link rel="shortcut icon" href="/assets/icons/favicon/<?= $_MemberPage ?>.png" type="image/png"> - <?php else: ?> - <?php if (isset($toplevel) && file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/icons/favicon/" . $toplevel . ".png")): ?> - <link rel="shortcut icon" href="/assets/icons/favicon/<?= $toplevel ?>.png" type="image/png"> - <?php else: ?> - <?php if (isset($_SystemPage) && file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/icons/favicon/" . $_SystemPage . ".png")): ?> - <link rel="shortcut icon" href="/assets/icons/favicon/<?= $_SystemPage ?>.png" type="image/png"> - <?php else: ?> - <?php if (isset($_SystemName) && file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/" . $_SystemName . ".png") && (!isset($_MemberName) || $_MemberName !== "fusion")): ?> - <link rel="shortcut icon" href="/assets/uploads/<?= $_SystemName ?>.png" type="image/png"> - <?php else: ?> - <link rel="shortcut icon" href="/assets/logo/newlogo.png" type="image/png"> - <?php endif; ?> - <?php endif; ?> - <?php endif; ?> - <?php endif; ?> - <?php endif; ?> + <title><?= $title && $title !== "-" ? $title . " · " : "" ?>Cold Haze</title> + <link rel="shortcut icon" href="/assets/logo/newlogo<?= $isLoggedIn || $isLowerLoggedIn ? "3" : "" ?>.png" type="image/png"> </head> <body<?php if ($page["rail"] && $isLoggedIn && !$useNewUI): ?> id="admin-page"<?php endif; ?>> <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/navigation.inc"; global $navigation; ?> - <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/navbar.inc"; ?> <?php if (!$useNewUI): ?> <div style="margin-top: 60px;" id="top-of-page"></div> |