diff options
author | RaindropsSys <contact@minteck.org> | 2023-03-16 13:29:26 +0100 |
---|---|---|
committer | RaindropsSys <contact@minteck.org> | 2023-03-16 13:29:26 +0100 |
commit | 7ccc2de87f9e25c715dc09b9aba4eb5c66f80424 (patch) | |
tree | b324a58933219e9ff2b0bbd137773f435df86057 /pages | |
parent | 940defd2939f52480ed5b548189b549457944995 (diff) | |
download | pluralconnect-7ccc2de87f9e25c715dc09b9aba4eb5c66f80424.tar.gz pluralconnect-7ccc2de87f9e25c715dc09b9aba4eb5c66f80424.tar.bz2 pluralconnect-7ccc2de87f9e25c715dc09b9aba4eb5c66f80424.zip |
Updated 6 files (automated)
Diffstat (limited to 'pages')
-rw-r--r-- | pages/api/emergency-real.php | 4 | ||||
-rw-r--r-- | pages/api/emergency.php | 4 | ||||
-rw-r--r-- | pages/profiles.inc | 4 |
3 files changed, 7 insertions, 5 deletions
diff --git a/pages/api/emergency-real.php b/pages/api/emergency-real.php index 05bbaf7..d788ca8 100644 --- a/pages/api/emergency-real.php +++ b/pages/api/emergency-real.php @@ -1,7 +1,7 @@ <?php -require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; -if (!$isLoggedIn) header("Location: /-/login") and die(); +require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $isLowerLoggedIn; +if (!$isLoggedIn && !$isLowerLoggedIn) header("Location: /-/login") and die(); global $_PROFILE; $ntfy = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true)["ntfy"]; diff --git a/pages/api/emergency.php b/pages/api/emergency.php index ff79834..9024197 100644 --- a/pages/api/emergency.php +++ b/pages/api/emergency.php @@ -1,7 +1,7 @@ <?php -require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; -if (!$isLoggedIn) header("Location: /-/login") and die(); +require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $isLowerLoggedIn; +if (!$isLoggedIn && !$isLowerLoggedIn) header("Location: /-/login") and die(); global $_PROFILE; $ntfy = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true)["ntfy"]; diff --git a/pages/profiles.inc b/pages/profiles.inc index 41e5222..8440b5f 100644 --- a/pages/profiles.inc +++ b/pages/profiles.inc @@ -65,7 +65,9 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/util/profiles.inc'; <div style="margin: -10px -10px -10px 10px;background: linear-gradient(90deg, rgba(255, 255, 255, .1) 0%, rgba(255, 255, 255, .1) <?= round($member["_score"]["progress"] * 100) ?>%, transparent <?= round($member["_score"]["progress"] * 100) ?>.000001%);border-top-right-radius: 10px;border-bottom-right-radius: 10px;display: flex;align-items: center;"> <div style="margin-left: 10px; width: 100%;"> - <?php if (count($member["_score"]["actions"]) < 3): ?> + <?php if (count($member["_score"]["actions"]) === 0): ?> + Complete profile + <?php elseif (count($member["_score"]["actions"]) < 3): ?> Add <?= implode(" and ", $member["_score"]["actions"]) ?> to get to 100% <?php else: ?> <?= round($member["_score"]["progress"] * 100) ?>% complete |