diff options
Diffstat (limited to 'includes/details.inc')
-rw-r--r-- | includes/details.inc | 112 |
1 files changed, 88 insertions, 24 deletions
diff --git a/includes/details.inc b/includes/details.inc index 8fee082..08ba52a 100644 --- a/includes/details.inc +++ b/includes/details.inc @@ -1,40 +1,32 @@ -<?php global $isLoggedIn; global $metadata; global $memberData; global $lang; global $pages; ?> +<?php global $isLoggedIn; global $metadata; global $memberData; global $lang; global $pages; $pronouns = getMemberPronouns($memberData['pronouns']); ?> <div id="member-details" class="<?= $isLoggedIn ? 'member-details-loggedIn' : '' ?>" style="<?php if (!$isLoggedIn): ?>grid-template-columns: repeat(3, 1fr);<?php endif; ?> background-color: <?= isset($memberData["color"]) ? '#' . $memberData["color"] . "33" : "transparent" ?>; margin-left: -20px; margin-right: -20px;"> <div> <b><?= $lang["details"]["food"] ?></b><span class="member-small-separator"><br></span> <?= match ($metadata["food"]) { - 0 => "<span data-bs-toggle='tooltip' title='" . ucfirst(str_replace("'", "'", getMemberPronouns($memberData['pronouns'])["possessive_det"])) . " species indicates that " . str_replace("'", "'", getMemberPronouns($memberData['pronouns'])["subjective"]) . ' ' . (getMemberPronouns($memberData["pronouns"])["third"] ? "doesn't" : "don't") . " need to eat food, therefore " . str_replace("'", "'", getMemberPronouns($memberData['pronouns'])["subjective"]) . " can eat all foods.'>" . $lang["details"]["food_states"][0] . "</span>", - 1 => "<span data-bs-toggle='tooltip' title='" . ucfirst(str_replace("'", "'", getMemberPronouns($memberData['pronouns'])["subjective"])) . " can't eat fish or meat.'>" . $lang["details"]["food_states"][1] . "</span>", - 2 => "<span data-bs-toggle='tooltip' title='" . ucfirst(str_replace("'", "'", getMemberPronouns($memberData['pronouns'])["subjective"])) . " can't eat meat, but can eat fish.'>" . $lang["details"]["food_states"][2] . "</span>", - 3 => "<span data-bs-toggle='tooltip' title='" . ucfirst(str_replace("'", "'", getMemberPronouns($memberData['pronouns'])["subjective"])) . " can eat all foods, meat and fish included.'>" . $lang["details"]["food_states"][3] . "</span>", + 0 => "<span data-bs-toggle='tooltip' title='" . ucfirst(str_replace("'", "'", $pronouns["possessive_det"])) . " species indicates that " . str_replace("'", "'", $pronouns["subjective"]) . ' ' . ($pronouns["third"] ? "doesn't" : "don't") . " need to eat food, therefore " . str_replace("'", "'", $pronouns["subjective"]) . " can eat all foods.'>" . $lang["details"]["food_states"][0] . "</span>", + 1 => "<span data-bs-toggle='tooltip' title='" . ucfirst(str_replace("'", "'", $pronouns["subjective"])) . " can't eat fish or meat.'>" . $lang["details"]["food_states"][1] . "</span>", + 2 => "<span data-bs-toggle='tooltip' title='" . ucfirst(str_replace("'", "'", $pronouns["subjective"])) . " can't eat meat, but can eat fish.'>" . $lang["details"]["food_states"][2] . "</span>", + 3 => "<span data-bs-toggle='tooltip' title='" . ucfirst(str_replace("'", "'", $pronouns["subjective"])) . " can eat all foods, meat and fish included.'>" . $lang["details"]["food_states"][3] . "</span>", } ?> </div> <div> <b><?= $lang["details"]["memory"] ?></b><span class="member-small-separator"><br></span> <?= match ($metadata["shared_memory"]) { - 0 => "<span data-bs-toggle='tooltip' title='" . str_replace("'", "'", ucfirst(getMemberPronouns($memberData['pronouns'])["subjective"])) . (getMemberPronouns($memberData["pronouns"])["third"] ? " doesn't directly share" : " don't directly share") . " memory with " . str_replace("'", "'", getMemberPronouns($memberData['pronouns'])["possessive_det"]) . " headmates, but is able to (slowly) query it if that is needed.'>" . $lang["details"]["memory_states"][0] . "</span>", - 1 => "<span data-bs-toggle='tooltip' title='" . str_replace("'", "'", ucfirst(getMemberPronouns($memberData['pronouns'])["subjective"])) . (getMemberPronouns($memberData["pronouns"])["third"] ? " doesn't directly shares" : " don't directly share") . " all memories with " . str_replace("'", "'", getMemberPronouns($memberData['pronouns'])["possessive_det"]) . " headmates, but may be able to share certain memories and/or share memories at will.'>" . $lang["details"]["memory_states"][1] . "</span>", - 2 => "<span data-bs-toggle='tooltip' title='" . str_replace("'", "'", ucfirst(getMemberPronouns($memberData['pronouns'])["subjective"])) . (getMemberPronouns($memberData["pronouns"])["third"] ? " shares" : " share") . " all memories with " . str_replace("'", "'", getMemberPronouns($memberData['pronouns'])["possessive_det"]) . " headmates.'>" . $lang["details"]["memory_states"][2] . "</span>", + 0 => "<span data-bs-toggle='tooltip' title='" . str_replace("'", "'", ucfirst($pronouns["subjective"])) . ($pronouns["third"] ? " doesn't directly share" : " don't directly share") . " memory with " . str_replace("'", "'", $pronouns["possessive_det"]) . " headmates, but is able to (slowly) query it if that is needed.'>" . $lang["details"]["memory_states"][0] . "</span>", + 1 => "<span data-bs-toggle='tooltip' title='" . str_replace("'", "'", ucfirst($pronouns["subjective"])) . ($pronouns["third"] ? " doesn't directly shares" : " don't directly share") . " all memories with " . str_replace("'", "'", $pronouns["possessive_det"]) . " headmates, but may be able to share certain memories and/or share memories at will.'>" . $lang["details"]["memory_states"][1] . "</span>", + 2 => "<span data-bs-toggle='tooltip' title='" . str_replace("'", "'", ucfirst($pronouns["subjective"])) . ($pronouns["third"] ? " shares" : " share") . " all memories with " . str_replace("'", "'", $pronouns["possessive_det"]) . " headmates.'>" . $lang["details"]["memory_states"][2] . "</span>", } ?> </div> <?php if ($isLoggedIn): ?> <div> - <b>Sensitivity:</b><span class="member-small-separator"><br></span> - <?= match ($metadata["sensitivity"]) { - 0 => "<span data-bs-toggle='tooltip' title='" . str_replace("'", "'", ucfirst(getMemberPronouns($memberData['pronouns'])["subjective"])) . (getMemberPronouns($memberData["pronouns"])["third"] ? " does" : " do") . " not have sensitive spots on " . str_replace("'", "'", getMemberPronouns($memberData['pronouns'])["possessive_det"]) . " body.'>None</span>", - 1 => "<span data-bs-toggle='tooltip' title='" . str_replace("'", "'", ucfirst(getMemberPronouns($memberData['pronouns'])["subjective"])) . " may have (a) sensitive spot·s on " . str_replace("'", "'", getMemberPronouns($memberData['pronouns'])["possessive_det"]) . " body.'>Maybe</span>", - 2 => "<span data-bs-toggle='tooltip' title='" . str_replace("'", "'", ucfirst(getMemberPronouns($memberData['pronouns'])["subjective"])) . (getMemberPronouns($memberData["pronouns"])["third"] ? " has" : " have") . " (a) sensitive spot·s on " . str_replace("'", "'", getMemberPronouns($memberData['pronouns'])["possessive_det"]) . " body, and playing with it/them will make " . str_replace("'", "'", getMemberPronouns($memberData['pronouns'])["object"]) . " feel affectionate: extremely safe and cared for.'>Affectionate</span>", - 3 => "<span data-bs-toggle='tooltip' title='" . str_replace("'", "'", ucfirst(getMemberPronouns($memberData['pronouns'])["subjective"])) . (getMemberPronouns($memberData["pronouns"])["third"] ? " has" : " have") . " (a) sensitive spot·s on " . str_replace("'", "'", getMemberPronouns($memberData['pronouns'])["possessive_det"]) . " body, and playing with it/them will make " . str_replace("'", "'", getMemberPronouns($memberData['pronouns'])["object"]) . " feel sexually pleasured.'>Sexual</span>", - 4 => "<span data-bs-toggle='tooltip' title='" . str_replace("'", "'", ucfirst(getMemberPronouns($memberData['pronouns'])["subjective"])) . (getMemberPronouns($memberData["pronouns"])["third"] ? " has" : " have") . " (a) sensitive spot·s on " . str_replace("'", "'", getMemberPronouns($memberData['pronouns'])["possessive_det"]) . " body, and playing with it/them will make " . str_replace("'", "'", getMemberPronouns($memberData['pronouns'])["object"]) . " feel affectionate or sexually pleasured.'>Affectionate and sexual</span>", - } ?> - </div> - <div> <b>Age:</b><span class="member-small-separator"><br></span> <?php if (!isset($metadata["birth"]["year"])): ?> - <?php if ($metadata["birth"]["age"] <= 0): ?> + <?php if ($metadata["birth"]["age"] === -1): $age = abs(log(0)); // => INF ?> + <?= "<span data-bs-toggle='tooltip' title='" . str_replace("'", "'", ucfirst($pronouns["subjective"])) . " never age" . str_replace("'", "'", $pronouns["third"] ? "s" : "") . " and " . str_replace("'", "'", $pronouns["third"] ? "doesn't" : "don't") . " have a defined age, making " . str_replace("'", "'", $pronouns["object"]) . " pretty much eternal.'>Eternal</span>" ?> + <?php elseif ($metadata["birth"]["age"] <= 0): ?> - - <?php else: ?> - <?= "<span data-bs-toggle='tooltip' title='" . str_replace("'", "'", ucfirst(getMemberPronouns($memberData['pronouns'])["subjective"])) . str_replace("'", "'", getMemberPronouns($memberData["pronouns"])["third"] ? " doesn't" : " don't") . " age like the body does, making " . str_replace("'", "'", getMemberPronouns($memberData['pronouns'])["object"]) . " stay " . $metadata["birth"]["age"] . " years old for " . str_replace("'", "'", getMemberPronouns($memberData['pronouns'])["possessive_det"]) . " entire life.'>" . $metadata["birth"]["age"] . "* years old</span>" ?> + <?php else: $age = $metadata["birth"]["age"]; ?> + <?= "<span data-bs-toggle='tooltip' title='" . str_replace("'", "'", ucfirst($pronouns["subjective"])) . str_replace("'", "'", $pronouns["third"] ? " doesn't" : " don't") . " age like the body does, making " . str_replace("'", "'", $pronouns["object"]) . " stay " . $metadata["birth"]["age"] . " years old for " . str_replace("'", "'", $pronouns["possessive_det"]) . " entire life.'>" . $metadata["birth"]["age"] . "* years old</span>" ?> <?php endif; ?> <?php else: ?> <?php if ($metadata["birth"]["year"] <= 1900): ?> @@ -47,7 +39,8 @@ $birthdate = $metadata["birth"]["year"] . "-" . $metadata["birth"]["date"]; } - $age = floor((time() - strtotime($birthdate)) / 31557600); + $age = (int)date('Y') - $metadata["birth"]["year"] + (strtotime(date('Y') . "-" . $metadata["birth"]["date"]) <= time() ? 0 : -1); + $age2 = floor((time() - strtotime($birthdate)) / 31557600); $birthday = "as time passes"; if (isset($metadata["birth"]["date"]) && trim($metadata["birth"]["date"]) !== "" && $metadata["birth"]["date"] !== "01-01") { @@ -55,7 +48,7 @@ } ?> - <?= "<span data-bs-toggle='tooltip' title='" . str_replace("'", "'", ucfirst(getMemberPronouns($memberData['pronouns'])["subjective"])) . " age" . str_replace("'", "'", getMemberPronouns($memberData["pronouns"])["third"] ? "s" : "") . " like the body does, making " . str_replace("'", "'", getMemberPronouns($memberData['pronouns'])["object"]) . " stay " . $age . " years old for now, having this age change $birthday.'>" . $age . " years old</span>" ?> + <?= "<span data-bs-toggle='tooltip' title='$age2 with the old algorithm | " . str_replace("'", "'", ucfirst($pronouns["subjective"])) . " age" . str_replace("'", "'", $pronouns["third"] ? "s" : "") . " like the body does, making " . str_replace("'", "'", $pronouns["object"]) . " stay " . $age . " years old for now, having this age change $birthday.'>" . $age . " years old</span>" ?> <?php endif; ?> <?php endif; ?> </div> @@ -76,4 +69,75 @@ - <?php endif; ?> </div> -</div>
\ No newline at end of file +</div> +<?php if ($isLoggedIn): ?> +<div id="member-details-2" style="background-color: <?= isset($memberData["color"]) ? '#' . $memberData["color"] . "33" : "transparent" ?>; margin-left: -20px; margin-right: -20px;"> + <?php if ((isset($age) && $age >= 16 && $metadata["little"] === 0) || (!isset($age) && $metadata["little"] === 0)): ?> + <div> + <b>Sexual consent:</b><span class="member-small-separator"><br></span> + <?php if ($metadata["sexually_active"]): ?> + <span title="Consent is assumed when having sex with <?= $pronouns["object"] ?>, however <?= $pronouns["subjective"] ?> may ask to not have sex at the moment and such request must be honored." data-bs-toggle="tooltip">Preemptive</span> + <?php else: ?> + <span title="Consent is absolutely required every time when having sex with <?= $pronouns["object"] ?>." data-bs-toggle="tooltip">Required</span> + <?php endif; ?> + </div> + <div> + <b><span class="member-detail-desktop">Sexual alignment</span><span class="member-detail-mobile">Sex. algn.</span>:</b><span class="member-small-separator"><br></span> + <?php switch ($metadata["alignment"]["sexual"]) { + case "aroace": + echo "Asexual"; + break; + case "hetero": + echo "Straight"; + break; + case "homo": + echo $pronouns["subjective"] === "she" ? "Lesbian" : ($pronouns["subjective"] === "he" ? "Gay" : "Homosexual"); + break; + case "bi": + echo "Bisexual"; + break; + case "pan": + echo "Pansexual"; + break; + } ?><?php if ($metadata["polyamorous"]["sexual"]): ?> (poly)<?php endif; ?> + </div> + <?php else: ?> + <div> + <style> + #member-details-2 { + grid-template-columns: 2fr 1fr; + } + </style> + <div style="display: flex; align-items: center; justify-content: center; height: 100%;opacity:.5;">This member is too young to have a sexual relationship.</div> + </div> + <?php endif; ?> + <div> + <b><span class="member-detail-desktop">Romantic alignment</span><span class="member-detail-mobile">Rom. algn.</span>:</b><span class="member-small-separator"><br></span> + <?php switch ($metadata["alignment"]["romantic"]) { + case "aroace": + echo "Aromantic"; + break; + case "hetero": + echo "Heteroromantic"; + break; + case "homo": + echo $pronouns["subjective"] === "she" ? "Lesbiromantic" : ($pronouns["subjective"] === "he" ? "Gay" : "Homoromantic"); + break; + case "bi": + echo "Biromantic"; + break; + case "pan": + echo "Panromantic"; + break; + } ?><?php if ($metadata["polyamorous"]["romantic"]): ?> (poly)<?php endif; ?> + </div> + <!--<div> + <b>Item 4:</b><span class="member-small-separator"><br></span> + Value 4 + </div> + <div> + <b>Item 5:</b><span class="member-small-separator"><br></span> + Value 5 + </div>--> +</div> +<?php endif; ?> |