summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaindropsSys <raindrops@equestria.dev>2024-03-30 23:40:25 +0100
committerRaindropsSys <raindrops@equestria.dev>2024-03-30 23:40:25 +0100
commitf16062c94d5da929be9f0c1e2eb3489ba42a7cd8 (patch)
treed439681072dc1a864aa28d8c14b587f79c0de034
parent1a0e9dc16d0709701ceaa5738478a2e16b572d92 (diff)
downloaddelta-f16062c94d5da929be9f0c1e2eb3489ba42a7cd8.tar.gz
delta-f16062c94d5da929be9f0c1e2eb3489ba42a7cd8.tar.bz2
delta-f16062c94d5da929be9f0c1e2eb3489ba42a7cd8.zip
Updated 9 files (automated)
-rw-r--r--includes/email.php10
-rw-r--r--includes/header.php4
-rw-r--r--index.php4
-rw-r--r--lang/en.json4
-rw-r--r--lang/fr.json4
-rw-r--r--logout/index.php2
-rw-r--r--plus/index.php10
-rw-r--r--plus/subscribe/index.php12
-rw-r--r--version2
9 files changed, 29 insertions, 23 deletions
diff --git a/includes/email.php b/includes/email.php
index 89c3710..7357812 100644
--- a/includes/email.php
+++ b/includes/email.php
@@ -2,6 +2,12 @@
use PHPMailer\PHPMailer\PHPMailer;
+function url_get_contents($url) {
+ $ret = [];
+ exec("curl \"" . str_replace('"', '\\"', $url) . "\"", $ret);
+ return $ret[0];
+}
+
require $_SERVER['DOCUMENT_ROOT'] . '/includes/PHPMailer/src/Exception.php';
require $_SERVER['DOCUMENT_ROOT'] . '/includes/PHPMailer/src/PHPMailer.php';
require $_SERVER['DOCUMENT_ROOT'] . '/includes/PHPMailer/src/SMTP.php';
@@ -251,7 +257,7 @@ function sendLogin($email) {
$mail->Subject = l("lang_email_login_title");
$mail->addEmbeddedImage($_SERVER['DOCUMENT_ROOT'] . "/logo.png", "logo", "logo.png");
- $location = json_decode(file_get_contents("https://api.iplocation.net/?ip=" . $_SERVER['HTTP_X_FORWARDED_FOR']), true);
+ $location = json_decode(url_get_contents("https://api.iplocation.net/?ip=" . $_SERVER['HTTP_X_FORWARDED_FOR']), true);
$body = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/email.html");
$body = str_replace("%3", date('Y'), $body);
@@ -263,4 +269,4 @@ function sendLogin($email) {
$mail->AltBody = strip_tags($body);
$mail->send();
-} \ No newline at end of file
+}
diff --git a/includes/header.php b/includes/header.php
index b6d3254..efb49ae 100644
--- a/includes/header.php
+++ b/includes/header.php
@@ -86,7 +86,7 @@ if (isset($_GET["__"])) {
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title><?= $unreadAlerts > 0 ? "(" . $unreadAlerts . ") " : "" ?><?= isset($title_pre) ? $title_pre . " · " : "" ?><?= l($title) ?> · Delta</title>
+ <title><?= $unreadAlerts > 0 ? "(" . $unreadAlerts . ") " : "" ?><?= isset($title_pre) ? $title_pre . " · " : "" ?><?= l($title) ?> · Delta<?php if ($_SERVER["SERVER_PORT"] === "81"): ?> (<?= trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/version")) ?>)<?php endif; ?></title>
<link rel="shortcut icon" href="/logo.svg" type="image/svg+xml">
<link rel="stylesheet" href="/bootstrap/bootstrap.min.css">
<script src="/bootstrap/bootstrap.bundle.min.js"></script>
@@ -858,7 +858,7 @@ if (isset($_GET["__"])) {
</style>
</head>
<body class="bg-light">
-<?php if ($_SERVER["HTTP_HOST"] === "192.168.1.121:81"): ?>
+<?php if ($_SERVER["SERVER_PORT"] === "81"): ?>
<div style="position: fixed; z-index: 999999; bottom: 0; right: 0;" class="dse-debug">
<div style="background-color: black; width: max-content; color: white; font-family: monospace; margin-left: auto;">Delta Staging Environment</div>
diff --git a/index.php b/index.php
index efebeb3..0b57a36 100644
--- a/index.php
+++ b/index.php
@@ -27,7 +27,7 @@ $version = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/version");
</div>
<?php endif; ?>
- <?php if ($_SERVER["HTTP_HOST"] === "192.168.1.121:81"): ?>
+ <?php if ($_SERVER["SERVER_PORT"] === "81"): ?>
<div class="alert alert-danger">
<b>This is a development environment.</b> All data is reset with data from production every 60 minutes. Run <code style="color: inherit;"><?= $_SERVER['DOCUMENT_ROOT'] ?>/includes/prod.sh</code> to push this release to production.
</div>
@@ -96,4 +96,4 @@ $version = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/version");
</script>
</div>
-<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/footer.php"; ?> \ No newline at end of file
+<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/footer.php"; ?>
diff --git a/lang/en.json b/lang/en.json
index c002ba6..3d3ef1b 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -288,7 +288,7 @@
"change": "Change subscription",
"notice": "Current subscription is %1. May require a Delta coins balance.",
"perks": "What do we get with Delta Plus (for 4 coins a month)?",
- "perks2": "Delta Ultra adds all of this for 7 coins a month:",
+ "perks2": "Delta Ultra adds all of this for 6 coins a month:",
"list": [
{
"title": "Free technical support",
@@ -1329,4 +1329,4 @@
"Your new nickname has been saved and will appear everywhere on Delta within a few minutes."
]
}
-} \ No newline at end of file
+}
diff --git a/lang/fr.json b/lang/fr.json
index 6cb0322..d9c21f8 100644
--- a/lang/fr.json
+++ b/lang/fr.json
@@ -288,7 +288,7 @@
"change": "Changer d'offre",
"notice": "L'offre actuelle est %1. Peut nécessiter un solde de pièces.",
"perks": "Qu'est-ce que nous obtenons avec Delta Plus (pour 4 pièces par mois) ?",
- "perks2": "Delta Ultra ajoute tout ça pour 7 pièces par mois :",
+ "perks2": "Delta Ultra ajoute tout ça pour 6 pièces par mois :",
"list": [
{
"title": "Support technique gratuit",
@@ -1322,4 +1322,4 @@
"Votre nouveau surnom a été enregistré et apparaîtra partout sur Delta d'ici quelques minutes."
]
}
-} \ No newline at end of file
+}
diff --git a/logout/index.php b/logout/index.php
index 63c265b..a23ee60 100644
--- a/logout/index.php
+++ b/logout/index.php
@@ -21,4 +21,4 @@ global $_PROFILE;
<br><br><br>
</div>
-<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/footer.php"; ?> \ No newline at end of file
+<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/footer.php"; ?>
diff --git a/plus/index.php b/plus/index.php
index 8fdd3a5..fd54e9f 100644
--- a/plus/index.php
+++ b/plus/index.php
@@ -132,7 +132,7 @@ $age = (int)(explode(" ", timeAgo($_PROFILE["birth"] ?? "1990-01-01", false, tru
<span><?= str_replace("%1", "<sup>7</sup>", l("lang_plus_list_7_description")) ?></span>
</div>
</div>
- </div>-->
+ </div>
<div class="promo-wrapper promo-ultra">
<div class="card promo-item">
@@ -142,7 +142,7 @@ $age = (int)(explode(" ", timeAgo($_PROFILE["birth"] ?? "1990-01-01", false, tru
<span><?= str_replace("%2", "<sup>9</sup>", str_replace("%1", "<sup>8</sup>", l("lang_plus_list_0_description"))) ?></span>
</div>
</div>
- </div>
+ </div>-->
<div class="promo-wrapper promo-ultra">
<div class="card promo-item">
@@ -192,9 +192,9 @@ $age = (int)(explode(" ", timeAgo($_PROFILE["birth"] ?? "1990-01-01", false, tru
<sup>4</sup><?= l("lang_plus_notes_3") ?><br>
<sup>5</sup><?= l("lang_plus_notes_4") ?><br>
<sup>6</sup><?= l("lang_plus_notes_5") ?><br>
- <sup>7</sup><?= l("lang_plus_notes_6") ?><br>
+ <!--<sup>7</sup><?= l("lang_plus_notes_6") ?><br>
<sup>8</sup><?= l("lang_plus_notes_7") ?><br>
- <sup>9</sup><?= l("lang_plus_notes_8") ?><br>
+ <sup>9</sup><?= l("lang_plus_notes_8") ?><br>-->
<sup>10</sup><?= l("lang_plus_notes_9") ?><br>
<sup>11</sup><?= l("lang_plus_notes_10") ?><br>
<sup>12</sup><?= l("lang_plus_notes_11") ?><br>
@@ -205,4 +205,4 @@ $age = (int)(explode(" ", timeAgo($_PROFILE["birth"] ?? "1990-01-01", false, tru
<br><br>
-<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/footer.php"; ?> \ No newline at end of file
+<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/footer.php"; ?>
diff --git a/plus/subscribe/index.php b/plus/subscribe/index.php
index afb8cb1..b72bc77 100644
--- a/plus/subscribe/index.php
+++ b/plus/subscribe/index.php
@@ -44,11 +44,11 @@ if (isset($_GET["plan"])) {
if ($_GET["plan"] === "delta") $planTarget = 0 and $planTargetName = "Delta Free" and $planTargetCost = 0;
if ($_GET["plan"] === "plus") $planTarget = 1 and $planTargetName = "Delta Plus" and $planTargetCost = $price;
- if ($_GET["plan"] === "ultra") $planTarget = 2 and $planTargetName = "Delta Ultra" and $planTargetCost = $price * 1.75;
+ if ($_GET["plan"] === "ultra") $planTarget = 2 and $planTargetName = "Delta Ultra" and $planTargetCost = $price * 1.5;
- if ($currentPlan === 0 && $planTarget === 1) $updateCost = 3;
- if ($currentPlan === 0 && $planTarget === 2) $updateCost = 7;
- if ($currentPlan === 1 && $planTarget === 2) $updateCost = 3;
+ if ($currentPlan === 0 && $planTarget === 1) $updateCost = 4;
+ if ($currentPlan === 0 && $planTarget === 2) $updateCost = 6;
+ if ($currentPlan === 1 && $planTarget === 2) $updateCost = 4;
$updatePossible = $_PROFILE["balance"] === -1 || $_PROFILE["balance"] - $updateCost >= 0;
}
@@ -245,7 +245,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/navigation.php";
<a href="/plus/subscribe/?plan=ultra" class="btn btn-primary"><?= l("lang_plus_subscribe_up") ?></a><br>
<?php endif; ?>
- <div style="margin-top: 10px;" class="small text-muted"><?= $price * 1.75 ?> <?= l("lang_plus_subscribe_coin") ?> · <?= str_replace("%1", coinsToEur($price * 1.75), l("lang_plus_subscribe_monthly")) ?></div>
+ <div style="margin-top: 10px;" class="small text-muted"><?= $price * 1.5 ?> <?= l("lang_plus_subscribe_coin") ?> · <?= str_replace("%1", coinsToEur($price * 1.5), l("lang_plus_subscribe_monthly")) ?></div>
</div>
</div>
</div>
@@ -257,4 +257,4 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/navigation.php";
<br><br>
-<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/footer.php"; ?> \ No newline at end of file
+<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/footer.php"; ?>
diff --git a/version b/version
index c7cb131..84197c8 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-5.3.1
+5.3.2