summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pages/api/reauthenticate.php14
-rw-r--r--pages/money.inc2
2 files changed, 13 insertions, 3 deletions
diff --git a/pages/api/reauthenticate.php b/pages/api/reauthenticate.php
index e726e8e..fe10d28 100644
--- a/pages/api/reauthenticate.php
+++ b/pages/api/reauthenticate.php
@@ -1,7 +1,7 @@
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/functions.inc";
-require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $isLowerLoggedIn;
+require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $isLowerLoggedIn; global $_PROFILE;
header("Content-Type: text/plain");
@@ -12,14 +12,24 @@ if (!$isLoggedIn || $isLowerLoggedIn) {
$newToken = generateToken();
-if (isset($_COOKIE['PEH2_SESSION_TOKEN'])) {
+if (isset($_COOKIE['PEH2_SESSION_TOKEN']) && $isLoggedIn) {
$old = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . $_COOKIE['PEH2_SESSION_TOKEN']), true);
$old["name"] = base64_decode($_GET["name"] ?? "LQo=");
$old["created"] = time();
$old["addresses"] = [];
$old["last"] = time();
+ $old["profile"] = $_PROFILE;
file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . $newToken, json_encode($old));
+} else if (isset($_COOKIE['PEH2_SESSION_TOKEN']) && $isLowerLoggedIn) {
+ $old = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/lowertokens/" . $_COOKIE['PEH2_SESSION_TOKEN']), true);
+ $old["name"] = base64_decode($_GET["name"] ?? "LQo=");
+ $old["created"] = time();
+ $old["addresses"] = [];
+ $old["last"] = time();
+ $old["profile"] = $_PROFILE;
+
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/lowertokens/" . $newToken, json_encode($old));
}
die($newToken); \ No newline at end of file
diff --git a/pages/money.inc b/pages/money.inc
index 1338a3a..c936138 100644
--- a/pages/money.inc
+++ b/pages/money.inc
@@ -1,7 +1,7 @@
<?php
$minimumRaindrops = 300;
-$minimumCloudburst = 2832.32;
+$minimumCloudburst = 2762.89;
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.inc"; global $title; global $isLoggedIn; global $lang; global $pages; global $_PROFILE;
$parts = explode("/", $_GET["_"]);