";
$part2 = null;
$part3 = null;
if (isset($pages[$name])) {
if (($name === "docs" || $name === "toys" || $name === "actions") && isset($parts[2])) {
$part3 = "Dashboard";
$part2 = "" . $pages[$name]['name'] . "";
if ($name === "docs") {
$actionsProfile = "docs-item";
$part1 = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/docs/" . $parts[2] . ".json"), true)["name"];
} else {
$actionsProfile = "$name-item";
$list = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($name === "toys" ? "toys/toys" : "actions/actions") . ".json"), true);
$part1 = array_values(array_filter($list, function ($i) use ($parts) {
return $i["id"] === $parts[2];
}))[0]["name"];
}
} else {
if ($pages[$name]["admin"]) {
$part1 = $pages[$name]['name'];
$part2 = "Dashboard";
} else {
$part1 = $pages[$name]['name'];
}
}
} elseif ($name === "cloudburst") {
if (isset($parts[2])) {
$part2 = "Cloudburst System";
if ($parts[2] === "subsystem") {
$actionsProfile = "subsystem";
$part1 = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/subsystems/ynmuc-$parts[3].json"), true)["name"];
} else {
$part1 = $pages["s:" . $parts[2]]['name'] ?? $parts[2];
}
} else {
$actionsProfile = "system";
$part1 = "Cloudburst System";
}
} elseif ($name === "raindrops") {
if (isset($parts[2])) {
$part2 = "Raindrops System";
if ($parts[2] === "subsystem") {
$actionsProfile = "subsystem";
$part1 = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/subsystems/gdapd-$parts[3].json"), true)["name"];
} else {
$part1 = $pages["s:" . $parts[2]]['name'] ?? $parts[2];
}
} else {
$actionsProfile = "system";
$part1 = "Raindrops System";
}
} else {
$member = getMemberFromName($name);
$actionsProfile = "member";
if (isset($member)) {
$memberName = $member["display_name"] ?? $member["name"];
$part1 = "$memberName";
if ($member["_system"] === "gdapd") {
$part2 = "Raindrops System";
} else {
$part2 = "Cloudburst System";
}
} else {
$part1 = "$name";
}
}
if ($actionsProfile === "default") {
switch ($name) {
case "home":
$actionsProfile = "home";
break;
case "emergency":
case "wakeup":
case "pleasure":
$actionsProfile = "alert";
break;
case "fronting":
$actionsProfile = "planner";
break;
case "actions":
case "toys":
$actionsProfile = "actions-or-toys";
break;
case "docs":
$actionsProfile = "docs";
break;
case "debug":
$actionsProfile = "debug";
break;
case "bitset":
$actionsProfile = "bitset";
break;
case "parser":
case "prefix":
$actionsProfile = "parser-prefix";
break;
}
}
if (isset($part3)) {
echo "$part3 > $part2 > $part1";
} elseif (isset($part2)) {
echo "$part2 > $part1";
} else {
echo "$part1";
}
$links = [
"default" => [
[
"name" => "Go back to top",
"link" => [
"type" => "js",
"text" => "document.body.scrollTop = 0; document.documentElement.scrollTop = 0;"
],
"icon" => "/assets/icons/up.svg",
"invert" => true
]
]
];
$linksList = $links[isset($links[$actionsProfile]) ? $actionsProfile : "default"];
?> (= $actionsProfile ?>
)
$link): ?>
hrefonclick="= $link["link"]["text"] ?>" title="= $link["name"] ?>" data-bs-toggle="tooltip" class="title-bar-action tooltip-nohelp">
" class="dropdown-icon" alt="" style="width:24px;vertical-align: middle;">