1; }))[0] ?? null; $gender = "other"; if (isset($id)) { $id = substr($id, 1); if (!preg_match("/[a-zA-Z0-6]/m", $id)) { header("Location: /profile/$_USER"); die(); } if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/profiles/" . $id . ".json")) { header("Location: /profile/$_USER"); die(); } $data = json_decode(pf_utf8_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/profiles/" . $id . ".json")), true); $title_pre = $data["nick_name"] ?? $data["first_name"] . " " . $data["last_name"]; $title = "lang_profile_title"; } else { header("Location: /profile/$_USER"); die(); } require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/header.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/navigation.php"; $requests = array_reverse($data["requests"]); foreach (array_filter(scandir($_SERVER["DOCUMENT_ROOT"] . "/includes/data/people"), function ($i) { return !str_starts_with($i, "."); }) as $_id) { $_d = json_decode(file_get_contents($_SERVER["DOCUMENT_ROOT"] . "/includes/data/people/" . $_id), true); if ($_d["delta"] === $id) { $gender = $_d["gender"]; } } ?>
= $gender === "fem" || $gender === "trans_fem" ? l("lang_profile_since_female") : ($gender === "male" || $gender === "trans_male" ? l("lang_profile_since_male") : l("lang_profile_since")) ?> = timeAgo($data["date"], false) ?> | |
= $gender === "fem" || $gender === "trans_fem" ? l("lang_profile_last_female") : ($gender === "male" || $gender === "trans_male" ? l("lang_profile_last_male") : l("lang_profile_last")) ?> = timeAgo($data["last_seen"], true, false, true) ?>= l("lang_profile_never") ?> |
(= $gender === "fem" || $gender === "trans_fem" ? l("lang_profile_birth_female") : ($gender === "male" || $gender === "trans_male" ? l("lang_profile_birth_male") : l("lang_profile_birth")) ?> = formatDate($data["birth"], false) ?>)- | |
= $email ?>= l("lang_studio_redacted") ?> | |
">= $data["phone"] ?>-= l("lang_studio_redacted") ?> |
= getNameFromId(array_keys($history)[0]) ?> | |
= getNameFromId(array_keys($history)[1]) ?> |
= getNameFromId(array_keys($requests)[0]) ?> · = timeAgo(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/requests/" . array_values($requests)[0] . ".json"), true)["date"]) ?> | |
= getNameFromId(array_keys($requests)[1]) ?> · = timeAgo(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/requests/" . array_values($requests)[1] . ".json"), true)["date"]) ?> |