Updated 17 files and added 4 files (automated)
parent
0742405f6e
commit
4dd73faa40
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/></g><g><path d="M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M12.88,17.76V19h-1.75v-1.29 c-0.74-0.18-2.39-0.77-3.02-2.96l1.65-0.67c0.06,0.22,0.58,2.09,2.4,2.09c0.93,0,1.98-0.48,1.98-1.61c0-0.96-0.7-1.46-2.28-2.03 c-1.1-0.39-3.35-1.03-3.35-3.31c0-0.1,0.01-2.4,2.62-2.96V5h1.75v1.24c1.84,0.32,2.51,1.79,2.66,2.23l-1.58,0.67 c-0.11-0.35-0.59-1.34-1.9-1.34c-0.7,0-1.81,0.37-1.81,1.39c0,0.95,0.86,1.31,2.64,1.9c2.4,0.83,3.01,2.05,3.01,3.45 C15.9,17.17,13.4,17.67,12.88,17.76z"/></g></svg>
|
After Width: | Height: | Size: 686 B |
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="48" width="48"><path d="M23.05 37.45h1.8v-2.4q2.35-.1 4.3-1.475Q31.1 32.2 31.1 29.35q0-2.3-1.35-3.725Q28.4 24.2 24.8 22.85q-3.35-1.25-4.325-2.125-.975-.875-.975-2.525 0-1.55 1.275-2.65 1.275-1.1 3.325-1.1 1.55 0 2.6.675t1.8 1.825l1.55-.65q-.85-1.5-2.175-2.4-1.325-.9-2.925-1v-2.35h-1.8v2.35q-2.65.4-4.025 1.9-1.375 1.5-1.375 3.4 0 2.25 1.4 3.575 1.4 1.325 4.7 2.525 3.3 1.3 4.425 2.3 1.125 1 1.125 2.75 0 2.15-1.6 3.125-1.6.975-3.5.975-1.8 0-3.275-1.025Q19.55 31.4 18.7 29.55l-1.6.65q.95 2.05 2.45 3.15 1.5 1.1 3.5 1.55ZM24 42.2q-3.8 0-7.075-1.45-3.275-1.45-5.75-3.925Q8.7 34.35 7.25 31.05 5.8 27.75 5.8 24t1.45-7.075q1.45-3.325 3.925-5.8 2.475-2.475 5.775-3.9Q20.25 5.8 24 5.8t7.075 1.425q3.325 1.425 5.8 3.9 2.475 2.475 3.9 5.8Q42.2 20.25 42.2 24.05q0 3.75-1.425 7.025-1.425 3.275-3.9 5.75-2.475 2.475-5.8 3.925Q27.75 42.2 24 42.2Zm0-1.75q6.85 0 11.65-4.8 4.8-4.8 4.8-11.65 0-6.85-4.8-11.65-4.8-4.8-11.65-4.8-6.85 0-11.65 4.8-4.8 4.8-4.8 11.65 0 6.85 4.8 11.65 4.8 4.8 11.65 4.8ZM24 24Z" fill="#000000"/></svg>
|
After Width: | Height: | Size: 1.0 KiB |
@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48"><path d="M100 753v-35h321v35H100Zm0-320v-35h321v35H100Zm474 433-24-24 106-106-106-106 24-24 106 106 106-106 24 24-106 106 106 106-24 24-106-106-106 106Zm88-362L550 392l24-24 87 87 172-172 24 25-195 196Z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48"><path d="M100 753v-35h321v35H100Zm0-320v-35h321v35H100Zm474 433-24-24 106-106-106-106 24-24 106 106 106-106 24 24-106 106 106 106-24 24-106-106-106 106Zm88-362L550 392l24-24 87 87 172-172 24 25-195 196Z" fill="#000000"/></svg>
|
Before Width: | Height: | Size: 297 B After Width: | Height: | Size: 312 B |
@ -1,9 +1,51 @@
|
||||
<?php
|
||||
|
||||
$list = [];
|
||||
function doLinking($text) {
|
||||
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php";
|
||||
initLang();
|
||||
|
||||
$list = [
|
||||
...array_map(function ($i) {
|
||||
return [
|
||||
"link" => "/articles/" . substr($i, 0, -5),
|
||||
"name" => getNameFromId(substr($i, 0, -5))
|
||||
];
|
||||
}, array_filter(scandir($_SERVER['DOCUMENT_ROOT'] . "/includes/data/articles"), function ($i) {
|
||||
return !str_starts_with($i, ".");
|
||||
})),
|
||||
...array_map(function ($i) {
|
||||
return [
|
||||
"link" => "/people/" . substr($i, 0, -5),
|
||||
"name" => getNameFromId(substr($i, 0, -5))
|
||||
];
|
||||
}, array_filter(scandir($_SERVER['DOCUMENT_ROOT'] . "/includes/data/people"), function ($i) {
|
||||
return !str_starts_with($i, ".");
|
||||
})),
|
||||
...array_map(function ($i) {
|
||||
return [
|
||||
"link" => "/gallery/" . substr($i, 0, -5),
|
||||
"name" => getNameFromId(substr($i, 0, -5))
|
||||
];
|
||||
}, array_filter(scandir($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gallery"), function ($i) {
|
||||
return !str_starts_with($i, ".");
|
||||
}))
|
||||
];
|
||||
|
||||
usort($list, function ($a, $b) {
|
||||
return strlen($b["name"]) - strlen($a["name"]);
|
||||
});
|
||||
|
||||
/*header("Content-Type: text/plain");
|
||||
var_dump($list);
|
||||
die();*/
|
||||
if (isset(explode("/", $_SERVER['REQUEST_URI'])[2]) && getNameFromId(explode("/", $_SERVER['REQUEST_URI'])[2]) !== null) {
|
||||
$current = getNameFromId(explode("/", $_SERVER['REQUEST_URI'])[2]);
|
||||
} else {
|
||||
$current = null;
|
||||
}
|
||||
|
||||
foreach ($list as $item) {
|
||||
if ($item["name"] !== $current) {
|
||||
$text = str_ireplace($item["name"], '<a href="' . $item["link"] . '">' . $item["name"] . "</a>", $text);
|
||||
}
|
||||
}
|
||||
|
||||
return $text;
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
$server = "auth.equestria.horse";
|
||||
|
||||
header("Content-Type: text/plain");
|
||||
|
||||
if (!isset($_GET['code'])) {
|
||||
die();
|
||||
}
|
||||
|
||||
function encode($string) {
|
||||
return preg_replace("/[^a-zA-Z0-9.]/m", "", base64_encode($string));
|
||||
}
|
||||
|
||||
$appdata = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/email.json"), true);
|
||||
$users = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/users.json"), true);
|
||||
|
||||
$crl = curl_init('https://' . $server . '/hub/api/rest/oauth2/token');
|
||||
curl_setopt($crl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($crl, CURLINFO_HEADER_OUT, true);
|
||||
curl_setopt($crl, CURLOPT_POST, true);
|
||||
curl_setopt($crl, CURLOPT_HTTPHEADER, [
|
||||
"Authorization: Basic " . base64_encode($appdata["oauth2_id"] . ":" . $appdata["oauth2_secret"]),
|
||||
"Content-Type: application/x-www-form-urlencoded",
|
||||
"Accept: application/json"
|
||||
]);
|
||||
curl_setopt($crl, CURLOPT_POSTFIELDS, "grant_type=authorization_code&redirect_uri=" . urlencode("https://" . ($_SERVER["HTTP_HOST"] === "192.168.1.121:81" ? "delta-staging" : "delta") . ".equestria.dev/login/oauth") . "&code=" . $_GET['code']);
|
||||
|
||||
$result = curl_exec($crl);
|
||||
$result = json_decode($result, true);
|
||||
|
||||
curl_close($crl);
|
||||
|
||||
if (isset($result["access_token"])) {
|
||||
$crl = curl_init('https://' . $server . '/hub/api/rest/users/me');
|
||||
curl_setopt($crl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($crl, CURLINFO_HEADER_OUT, true);
|
||||
curl_setopt($crl, CURLOPT_HTTPHEADER, [
|
||||
"Authorization: Bearer " . $result["access_token"],
|
||||
"Accept: application/json"
|
||||
]);
|
||||
|
||||
$result = curl_exec($crl);
|
||||
$result = json_decode($result, true);
|
||||
$result["email"] = isset($result["profile"]["email"]) && $result["profile"]["email"]["verified"] ? $result["profile"]["email"]["email"] : "-";
|
||||
|
||||
if (!in_array($result["email"], array_keys($users))) {
|
||||
header("Location: /login/?return=" . rawurlencode($_COOKIE["DeltaReturnPage"] ?? "/") . "&failed_oauth2_notfound&v=" . rawurlencode($result["email"]));
|
||||
die();
|
||||
}
|
||||
|
||||
if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens")) mkdir($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens");
|
||||
|
||||
$token = encode(openssl_random_pseudo_bytes(128));
|
||||
|
||||
file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . $token, json_encode([
|
||||
"user" => $users[$result["email"]],
|
||||
"date" => date('c')
|
||||
]));
|
||||
|
||||
setcookie("DeltaSession", $token, time() + (86400 * 90), "/", "", false, true);
|
||||
|
||||
if (isset($_COOKIE["DeltaReturnPage"])) {
|
||||
header("Location: " . str_replace("\n", "", str_replace("\r", "", $_COOKIE["DeltaReturnPage"])));
|
||||
} else {
|
||||
header("Location: /");
|
||||
}
|
||||
|
||||
setcookie("DeltaReturnPage", "");
|
||||
die();
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
<?php
|
||||
|
||||
$price = (float)trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/plusprice"));
|
||||
$title = "lang_pricing_title";
|
||||
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php";
|
||||
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/header.php";
|
||||
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/navigation.php";
|
||||
global $_PROFILE; global $_USER;
|
||||
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
<br><br>
|
||||
<h1><?= l("lang_pricing_title") ?></h1>
|
||||
|
||||
<div class="alert alert-secondary">
|
||||
<b><?= l("lang_pricing_delta_title") ?></b> <?= str_replace("%2", "</a>", str_replace("%1", "<a href='/support'>", l("lang_pricing_delta_message"))) ?>
|
||||
</div>
|
||||
|
||||
<?php if ($_PROFILE["ultra"]): ?>
|
||||
<div class="alert alert-secondary">
|
||||
<?= str_replace("%1", coinsToEur($price * 2), l("lang_pricing_ultra")) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<h2><?= l("lang_pricing_base") ?></h2>
|
||||
|
||||
<p><?= l("lang_pricing_descriptions_base") ?></p>
|
||||
|
||||
<div style="display: grid; grid-template-columns: 1fr max-content; grid-column-gap: 20px; grid-row-gap: 5px;">
|
||||
<div>
|
||||
<span title="<?= l("lang_pricing_offers_0_description") ?>" data-bs-toggle="tooltip" style="cursor: help;"><?= l("lang_pricing_offers_0_title") ?></span>
|
||||
</div>
|
||||
<div style="font-weight: bold; text-align: right;"><?= l("lang_pricing_offers_0_pricing") ?></div>
|
||||
|
||||
<div>
|
||||
<span title="<?= l("lang_pricing_offers_1_description") ?>" data-bs-toggle="tooltip" style="cursor: help;"><?= l("lang_pricing_offers_1_title") ?></span>
|
||||
</div>
|
||||
<div style="font-weight: bold; text-align: right;"><?= l("lang_pricing_offers_1_pricing") ?></div>
|
||||
|
||||
<div>
|
||||
<span title="<?= l("lang_pricing_offers_2_description") ?>" data-bs-toggle="tooltip" style="cursor: help;"><?= l("lang_pricing_offers_2_title") ?></span>
|
||||
</div>
|
||||
<div style="font-weight: bold; text-align: right;"><?= l("lang_pricing_offers_2_pricing") ?></div>
|
||||
|
||||
<div>
|
||||
<span title="<?= l("lang_pricing_offers_3_description") ?>" data-bs-toggle="tooltip" style="cursor: help;"><?= l("lang_pricing_offers_3_title") ?></span>
|
||||
</div>
|
||||
<div style="font-weight: bold; text-align: right;"><?= l("lang_pricing_offers_3_pricing") ?></div>
|
||||
</div>
|
||||
|
||||
<h2 style="margin-top: 15px;"><?= l("lang_pricing_additional") ?></h2>
|
||||
|
||||
<p><?= l("lang_pricing_descriptions_additional") ?></p>
|
||||
|
||||
|
||||
<div style="display: grid; grid-template-columns: 1fr max-content; grid-column-gap: 20px; grid-row-gap: 5px;">
|
||||
<div>
|
||||
<span title="<?= l("lang_pricing_offers_4_description") ?>" data-bs-toggle="tooltip" style="cursor: help;"><?= l("lang_pricing_offers_4_title") ?></span>
|
||||
</div>
|
||||
<div style="font-weight: bold; text-align: right;"><?= l("lang_pricing_offers_4_pricing") ?></div>
|
||||
|
||||
<div>
|
||||
<span title="<?= l("lang_pricing_offers_5_description") ?>" data-bs-toggle="tooltip" style="cursor: help;"><?= l("lang_pricing_offers_5_title") ?></span>
|
||||
</div>
|
||||
<div style="font-weight: bold; text-align: right;"><?= l("lang_pricing_offers_5_pricing") ?></div>
|
||||
|
||||
<div>
|
||||
<span title="<?= l("lang_pricing_offers_6_description") ?>" data-bs-toggle="tooltip" style="cursor: help;"><?= l("lang_pricing_offers_6_title") ?></span>
|
||||
</div>
|
||||
<div style="font-weight: bold; text-align: right;"><?= l("lang_pricing_offers_6_pricing") ?></div>
|
||||
|
||||
<div>
|
||||
<span title="<?= l("lang_pricing_offers_7_description") ?>" data-bs-toggle="tooltip" style="cursor: help;"><?= l("lang_pricing_offers_7_title") ?></span>
|
||||
</div>
|
||||
<div style="font-weight: bold; text-align: right;"><?= l("lang_pricing_offers_7_pricing") ?></div>
|
||||
|
||||
<div>
|
||||
<span title="<?= l("lang_pricing_offers_8_description") ?>" data-bs-toggle="tooltip" style="cursor: help;"><?= l("lang_pricing_offers_8_title") ?></span>
|
||||
</div>
|
||||
<div style="font-weight: bold; text-align: right;"><?= l("lang_pricing_offers_8_pricing") ?></div>
|
||||
|
||||
<div>
|
||||
<span title="<?= l("lang_pricing_offers_9_description") ?>" data-bs-toggle="tooltip" style="cursor: help;"><?= l("lang_pricing_offers_9_title") ?></span>
|
||||
</div>
|
||||
<div style="font-weight: bold; text-align: right;"><?= l("lang_pricing_offers_9_pricing") ?></div>
|
||||
|
||||
<div>
|
||||
<span title="<?= l("lang_pricing_offers_10_description") ?>" data-bs-toggle="tooltip" style="cursor: help;"><?= l("lang_pricing_offers_10_title") ?></span>
|
||||
</div>
|
||||
<div style="font-weight: bold; text-align: right;"><?= l("lang_pricing_offers_10_pricing") ?></div>
|
||||
|
||||
<div>
|
||||
<span title="<?= l("lang_pricing_offers_11_description") ?>" data-bs-toggle="tooltip" style="cursor: help;"><?= l("lang_pricing_offers_11_title") ?></span>
|
||||
</div>
|
||||
<div style="font-weight: bold; text-align: right;"><?= l("lang_pricing_offers_11_pricing") ?></div>
|
||||
</div>
|
||||
|
||||
<br><br>
|
||||
</div>
|
||||
|
||||
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/footer.php"; ?>
|
Loading…
Reference in New Issue