summaryrefslogtreecommitdiff
path: root/includes/components/pleasure.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/components/pleasure.inc')
-rw-r--r--includes/components/pleasure.inc201
1 files changed, 0 insertions, 201 deletions
diff --git a/includes/components/pleasure.inc b/includes/components/pleasure.inc
deleted file mode 100644
index 6d5f4b1..0000000
--- a/includes/components/pleasure.inc
+++ /dev/null
@@ -1,201 +0,0 @@
-<?php global $app; global $_PROFILE; $front = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/fronters.json"), true)["members"]; ?>
-
-<h2>Pleasure alert
- <details style="display: inline-block;font-size:12px;">
- <summary class="text-muted" style="opacity:.5;"></summary>
- <label><input id="test-mode" type="checkbox"> Test Mode</label> · <label><input id="fake-requests" type="checkbox"> Fake Requests</label>
- </details>
-</h2>
-
-<?php if (isset($front[0])): ?>
- <?php if (!parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $front[0]["id"] . ".json"), true))["other"] && !parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $front[0]["id"] . ".json"), true))["other2"]): ?>
- <div class="alert alert-warning">
- <?php
-
- if (count($front) === 1) {
- echo("<b>" . ($front[0]["display_name"] ?? $front[0]["name"]) . "</b> is currently at front and you cannot have sex with this pony.");
- } elseif (count($front) === 2) {
- echo("<b>" . ($front[0]["display_name"] ?? $front[0]["name"]) . " and " . ($front[1]["display_name"] ?? $front[1]["name"]) . "</b> are currently at front and you cannot have sex with them.");
- } else {
- echo("Ponies are currently at front and you cannot have sex with them.");
- }
-
- ?> However, if you wish, any of the ponies mentioned on this page can take control of the body for the amount of time required for sex.
- </div>
- <?php elseif (!parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $front[0]["id"] . ".json"), true))["other"]): ?>
- <div class="alert alert-warning">
- <?php
-
- if (count($front) === 1) {
- echo("<b>" . ($front[0]["display_name"] ?? $front[0]["name"]) . "</b> is currently at front and may not want to have sex with you.");
- } elseif (count($front) === 2) {
- echo("<b>" . ($front[0]["display_name"] ?? $front[0]["name"]) . " and " . ($front[1]["display_name"] ?? $front[1]["name"]) . "</b> are currently at front and may not want to have sex with you.");
- } else {
- echo("Ponies are currently at front and may not want to have sex with you.");
- }
-
- ?> However, if this pony is not wanting to have sex with you, any of the ponies mentioned on this page can take control of the body for the amount of time required for sex.
- </div>
- <?php endif; ?>
-<?php endif; ?>
-
-<span data-bs-toggle="modal" data-bs-target="#turn-on" id="btn-on" style="background: #7f0000;font-size: 48px;padding: 10px 50px;border-radius: 10px;width: max-content;display: block;margin-left: auto;margin-right: auto;cursor: pointer;">Turn <b>ON</b></span>
-<span onclick="disableAlert()" id="btn-off" style="display:none;background: #007f0b;font-size: 48px;padding: 10px 50px;border-radius: 10px;width: max-content;margin-left: auto;margin-right: auto;cursor: pointer;">Turn <b>OFF</b></span>
-<p style="text-align:center;margin-top:10px;">Sending the next notification <b><span id="next-notification">never</span></b> · Local time for Raindrops: <span id="raindrops-time">--:--</span></p>
-
-<hr>
-
-<div style="margin-bottom: 10px;">
- <b>Targets:</b>
-</div>
-
-<label style="display: block; margin-left: 10px;">
- <input type="radio" name="target" checked id="enable-raindrops"> Raindrops System
-</label>
-<label style="display: block; margin-left: 10px;">
- <input type="radio" name="target" id="enable-<?= $GLOBALS["ColdHazeApp"]["other"]["slug"] ?>"> <?= $GLOBALS["ColdHazeApp"]["other"]["name"] ?>
-</label>
-<label style="display: block; margin-left: 10px;">
- <input type="radio" name="target" id="enable-moonglow"> Moonglow
-</label>
-
-<script>
- function updateTime() {
- let time = (new Intl.DateTimeFormat("en-US", {
- timeZone: 'Europe/Paris',
- hour: 'numeric',
- minute: 'numeric',
- hour12: true
- })).format(new Date());
-
- document.getElementById("raindrops-time").innerText = time;
- }
-
- updateTime();
-
- setInterval(() => {
- updateTime();
- }, 10000);
-</script>
-
-<style>
- <?php global $use2023UI; if (!$use2023UI): ?>
- .modal-header {
- border-bottom: 1px solid #353738;
- }
-
- .modal-content {
- border: 1px solid rgba(255, 255, 255, .2);
- background-color: #111;
- }
-
- .btn-close {
- filter: invert(1);
- }
- <?php endif; ?>
-
- #btn-on.disabled, #btn-off.disabled {
- opacity: .5;
- pointer-events: none;
- }
-</style>
-
-<div class="modal fade" id="turn-on">
- <div class="modal-dialog">
- <div class="modal-content">
-
- <div class="modal-header">
- <h4 class="modal-title">Important notice</h4>
- <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
- </div>
-
- <div class="modal-body">
- <div class="alert alert-danger">
- Keep this page open until your pony wakes up. If you close the page, alert notifications will not be sent.
- </div>
-
- <button onclick="enableAlert();" data-bs-dismiss="modal" class="btn btn-danger" style="font-size:20px;font-weight:bold;display:block;width:100%;">Enable the alert now.</button>
-
- <div class="alert alert-light" style="margin-top: 20px;">
- <b>Disclaimer:</b> This alert is not to be used in an emergency. If you need immediate help, use the <a href="/-/emergency">Emergency alert</a> instead.
- </div>
- </div>
- </div>
- </div>
-</div>
-
-<script>
- window.alertInterval = null;
- window.alertIntervalAmount = 5;
- window.alertIntervalCounter = window.alertIntervalAmount;
-
- function buildTargets() {
- let targets = [
- document.getElementById("enable-<?= $GLOBALS["ColdHazeApp"]["other"]["slug"] ?>").checked ? "<?= $GLOBALS["ColdHazeApp"]["other"]["slug"] ?>" : null,
- document.getElementById("enable-raindrops").checked ? "raindrops" : null,
- document.getElementById("enable-moonglow").checked ? "moonglow" : null,
- ].filter(i => i);
- return "?" + targets.join("&");
- }
-
- function sendNotification() {
- window.alertIntervalCounter = -1;
-
- if (document.getElementById("test-mode").checked) {
- document.getElementById("next-notification").innerText = "now";
- if (document.getElementById("fake-requests").checked) {
- window.alertIntervalCounter = window.alertIntervalAmount;
- document.getElementById("next-notification").innerText = "in " + window.alertIntervalAmount + " seconds";
- } else {
- window.fetch("/api/pleasure" + buildTargets()).then(() => {
- window.alertIntervalCounter = window.alertIntervalAmount;
- document.getElementById("next-notification").innerText = "in " + window.alertIntervalAmount + " seconds";
- })
- }
- } else {
- document.getElementById("next-notification").innerText = "now";
- if (document.getElementById("fake-requests").checked) {
- window.alertIntervalCounter = window.alertIntervalAmount;
- document.getElementById("next-notification").innerText = "in " + window.alertIntervalAmount + " seconds";
- } else {
- window.fetch("/api/pleasure-real" + buildTargets()).then(() => {
- window.alertIntervalCounter = window.alertIntervalAmount;
- document.getElementById("next-notification").innerText = "in " + window.alertIntervalAmount + " seconds";
- })
- }
- }
- }
-
- function enableAlert() {
- sendNotification();
- document.getElementById("btn-on").style.display = "none";
- document.getElementById("btn-off").style.display = "block";
- document.getElementById("test-mode").disabled = true;
- document.getElementById("fake-requests").disabled = true;
- document.getElementById("enable-<?= $GLOBALS["ColdHazeApp"]["other"]["slug"] ?>").disabled = true;
- document.getElementById("enable-raindrops").disabled = true;
- document.getElementById("enable-moonglow").disabled = true;
-
- window.alertInterval = setInterval(() => {
- window.alertIntervalCounter--;
-
- if (window.alertIntervalCounter === 0) {
- sendNotification();
- } else if (window.alertIntervalCounter > -1) {
- document.getElementById("next-notification").innerText = "in " + window.alertIntervalCounter + " second" + (window.alertIntervalCounter > 1 ? "s" : "");
- }
- }, 1000);
- }
-
- function disableAlert() {
- clearInterval(window.alertInterval);
- document.getElementById("next-notification").innerText = "never";
- document.getElementById("btn-on").style.display = "block";
- document.getElementById("btn-off").style.display = "none";
- document.getElementById("test-mode").disabled = false;
- document.getElementById("fake-requests").disabled = false;
- document.getElementById("enable-<?= $GLOBALS["ColdHazeApp"]["other"]["slug"] ?>").disabled = false;
- document.getElementById("enable-raindrops").disabled = false;
- document.getElementById("enable-moonglow").disabled = false;
- }
-</script> \ No newline at end of file