Update to current files
This commit is contained in:
1
database/backported/.htaccess
Normal file
1
database/backported/.htaccess
Normal file
@@ -0,0 +1 @@
|
||||
Require all denied
|
||||
@@ -1,23 +1,4 @@
|
||||
<?php
|
||||
require __DIR__ . '/../config/general.php';
|
||||
require __DIR__ . '/../incl/util.php';
|
||||
setPlainHeader();
|
||||
|
||||
$clientVersion = $_SERVER['HTTP_CLIENTVERSION'] ?? "0";
|
||||
if (($_SERVER['HTTP_REQUESTER'] ?? "0") != "BerryDashClient" && ($_SERVER['HTTP_USER_AGENT'] ?? "0") != "BerryDashClient" && ($clientVersion == "1.4.1" || $clientVersion == "1.4.0" || $clientVersion == "1.4.0-beta1")) {
|
||||
exitWithMessage("-1", false);
|
||||
}
|
||||
if (isAllowedVersion($clientVersion) && $clientVersion == "1.4.0-beta1") {
|
||||
exitWithMessage("1", false);
|
||||
}
|
||||
if (isLatestVersion($clientVersion)) {
|
||||
echo "1";
|
||||
} else if (isBetaVersion($clientVersion)) {
|
||||
echo "4";
|
||||
} else if (isAllowedVersion($clientVersion) && isAllowedDatabaseVersion($clientVersion)) {
|
||||
echo "2";
|
||||
} else if (isAllowedVersion($clientVersion)) {
|
||||
echo "3";
|
||||
} else {
|
||||
echo "-1";
|
||||
}
|
||||
echo '1';
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
require __DIR__ . '/../incl/util.php';
|
||||
setPlainHeader();
|
||||
checkClientDatabaseVersion();
|
||||
$conn = newConnection();
|
||||
|
||||
$post = getPostData();
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
<?php
|
||||
require __DIR__ . '/../incl/util.php';
|
||||
setPlainHeader();
|
||||
if (isAllowedDatabaseVersion(getClientVersion())) {
|
||||
if (getClientVersion() == "1.3-beta1") {
|
||||
require __DIR__ . '/backported/1.3-beta1/changeAccountUsername.php';
|
||||
exit;
|
||||
}
|
||||
if (getClientVersion() == "1.3-beta2" || getClientVersion() == "1.3" || getClientVersion() == "1.33") {
|
||||
require __DIR__ . '/backported/1.3-beta2/changeAccountUsername.php';
|
||||
exit;
|
||||
}
|
||||
if (getClientVersion() == "1.3-beta1") {
|
||||
require __DIR__ . '/backported/1.3-beta1/changeAccountUsername.php';
|
||||
exit;
|
||||
}
|
||||
if (getClientVersion() == "1.3-beta2" || getClientVersion() == "1.3" || getClientVersion() == "1.33") {
|
||||
require __DIR__ . '/backported/1.3-beta2/changeAccountUsername.php';
|
||||
exit;
|
||||
}
|
||||
checkClientDatabaseVersion();
|
||||
$conn = newConnection();
|
||||
|
||||
$post = getPostData();
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
require __DIR__ . '/../incl/util.php';
|
||||
setPlainHeader();
|
||||
checkClientDatabaseVersion();
|
||||
$conn = newConnection();
|
||||
|
||||
$post = getPostData();
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
require __DIR__ . '/../incl/util.php';
|
||||
setPlainHeader();
|
||||
checkClientDatabaseVersion();
|
||||
|
||||
$post = getPostData();
|
||||
$id = $post['id'] ?? '';
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
require __DIR__ . '/../incl/util.php';
|
||||
setPlainHeader();
|
||||
checkClientDatabaseVersion();
|
||||
|
||||
$post = getPostData();
|
||||
$id = $post['id'] ?? '';
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
require __DIR__ . '/../incl/util.php';
|
||||
setPlainHeader();
|
||||
checkClientDatabaseVersion();
|
||||
|
||||
$post = getPostData();
|
||||
$uesrId = $post['uesrId'] ?? '';
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
require __DIR__ . '/../incl/util.php';
|
||||
setPlainHeader();
|
||||
checkClientDatabaseVersion();
|
||||
$conn = newConnection();
|
||||
|
||||
$post = getPostData();
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
<?php
|
||||
require __DIR__ . '/../incl/util.php';
|
||||
setPlainHeader();
|
||||
if (isAllowedDatabaseVersion(getClientVersion())) {
|
||||
if (getClientVersion() == "1.5.1" || getClientVersion() == "1.5.2") {
|
||||
require __DIR__ . '/backported/1.5.1/getChatroomMessages.php';
|
||||
exit;
|
||||
}
|
||||
if (getClientVersion() == "1.5.1" || getClientVersion() == "1.5.2") {
|
||||
require __DIR__ . '/backported/1.5.1/getChatroomMessages.php';
|
||||
exit;
|
||||
}
|
||||
checkClientDatabaseVersion();
|
||||
$conn = newConnection();
|
||||
|
||||
$stmt = $conn->prepare("
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
require __DIR__ . '/../config/general.php';
|
||||
require __DIR__ . '/../incl/util.php';
|
||||
setPlainHeader();
|
||||
echo $latestVersion;
|
||||
echo "1.8.2";
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
require __DIR__ . '/../incl/util.php';
|
||||
setPlainHeader();
|
||||
checkClientDatabaseVersion();
|
||||
$conn = newConnection();
|
||||
|
||||
$post = getPostData();
|
||||
|
||||
@@ -1,22 +1,17 @@
|
||||
<?php
|
||||
require __DIR__ . '/../incl/util.php';
|
||||
setPlainHeader();
|
||||
if (getClientVersion() == "0" && isAllowedDatabaseVersion("1.4.0-beta1") && isAllowedDatabaseVersion("1.4.0") && isAllowedDatabaseVersion("1.4.1")) {
|
||||
if (getClientVersion() == "0") {
|
||||
require __DIR__ . '/backported/1.4.0-beta1/getTopPlayers.php';
|
||||
exit;
|
||||
}
|
||||
if (isAllowedDatabaseVersion(getClientVersion())) {
|
||||
if (getClientVersion() == "1.3-beta2" || getClientVersion() == "1.3" || getClientVersion() == "1.33") {
|
||||
require __DIR__ . '/backported/1.3-beta2/getTopPlayers.php';
|
||||
exit;
|
||||
}
|
||||
if (getClientVersion() == "1.5.0" || getClientVersion() == "1.5.1" || getClientVersion() == "1.5.2") {
|
||||
require __DIR__ . '/backported/1.5/getTopPlayers.php';
|
||||
exit;
|
||||
}
|
||||
if (getClientVersion() == "1.3-beta2" || getClientVersion() == "1.3" || getClientVersion() == "1.33") {
|
||||
require __DIR__ . '/backported/1.3-beta2/getTopPlayers.php';
|
||||
exit;
|
||||
}
|
||||
if ($_SERVER['HTTP_REQUESTER'] != 'BerryDashLauncher') {
|
||||
checkClientDatabaseVersion();
|
||||
if (getClientVersion() == "1.5.0" || getClientVersion() == "1.5.1" || getClientVersion() == "1.5.2") {
|
||||
require __DIR__ . '/backported/1.5/getTopPlayers.php';
|
||||
exit;
|
||||
}
|
||||
$post = getPostData();
|
||||
$request_type = $post['type'] ?? '';
|
||||
|
||||
3
database/launcher/latest.php
Executable file → Normal file
3
database/launcher/latest.php
Executable file → Normal file
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
require __DIR__ . '/../../incl/util.php';
|
||||
require __DIR__ . '/../../config/general.php';
|
||||
setPlainHeader();
|
||||
echo $latestLauncherVersion;
|
||||
echo "-1";
|
||||
|
||||
13
database/launcher/versions.php
Executable file → Normal file
13
database/launcher/versions.php
Executable file → Normal file
@@ -9,17 +9,6 @@ $stmt->execute();
|
||||
$result_versions = $stmt->get_result();
|
||||
$versions = array_map(fn($row) => ['id' => $row['id'], 'version' => $row['version'], 'releaseDate' => $row['releaseDate'], 'displayName' => empty($row['displayName']) ? $row['version'] : $row['displayName'], 'platforms' => json_decode($row['platforms']), 'downloadUrls' => json_decode($row['downloadUrls']), 'executables' => json_decode($row['executables']), 'category' => $row['category']], $result_versions->fetch_all(MYSQLI_ASSOC));
|
||||
|
||||
$stmt = $conn->prepare("SELECT * FROM launchercategories ORDER BY id DESC");
|
||||
$stmt->execute();
|
||||
|
||||
$result_categories = $stmt->get_result();
|
||||
$rows = $result_categories->fetch_all(MYSQLI_ASSOC);
|
||||
|
||||
$categories = [];
|
||||
foreach ($rows as $row) {
|
||||
$categories[$row['id']] = $row['name'];
|
||||
}
|
||||
|
||||
echo json_encode(["versions" => $versions, "categories" => $categories]);
|
||||
echo json_encode($versions);
|
||||
|
||||
$conn->close();
|
||||
@@ -1,17 +1,14 @@
|
||||
<?php
|
||||
require __DIR__ . '/../incl/util.php';
|
||||
setPlainHeader();
|
||||
if (isAllowedDatabaseVersion(getClientVersion())) {
|
||||
if (getClientVersion() == "1.4.0-beta1") {
|
||||
require __DIR__ . '/backported/1.4.0-beta1/loadAccount.php';
|
||||
exit;
|
||||
}
|
||||
if (getClientVersion() == "1.5.0" || getClientVersion() == "1.5.1" || getClientVersion() == "1.5.2") {
|
||||
require __DIR__ . '/backported/1.5/loadAccount.php';
|
||||
exit;
|
||||
}
|
||||
if (getClientVersion() == "1.4.0-beta1") {
|
||||
require __DIR__ . '/backported/1.4.0-beta1/loadAccount.php';
|
||||
exit;
|
||||
}
|
||||
if (getClientVersion() == "1.5.0" || getClientVersion() == "1.5.1" || getClientVersion() == "1.5.2") {
|
||||
require __DIR__ . '/backported/1.5/loadAccount.php';
|
||||
exit;
|
||||
}
|
||||
checkClientDatabaseVersion();
|
||||
|
||||
$post = getPostData();
|
||||
$token = $post['token'] ?? '';
|
||||
|
||||
@@ -1,30 +1,28 @@
|
||||
<?php
|
||||
require __DIR__ . '/../incl/util.php';
|
||||
setPlainHeader();
|
||||
if (isAllowedDatabaseVersion(getClientVersion())) {
|
||||
if (
|
||||
getClientVersion() == "1.2-beta2" ||
|
||||
getClientVersion() == "1.2" ||
|
||||
getClientVersion() == "1.21" ||
|
||||
getClientVersion() == "1.3-beta1"
|
||||
) {
|
||||
require __DIR__ . '/backported/1.2-beta2/loginAccount.php';
|
||||
exit;
|
||||
}
|
||||
if (getClientVersion() == "1.3-beta2" || getClientVersion() == "1.3" || getClientVersion() == "1.33") {
|
||||
require __DIR__ . '/backported/1.3-beta2/loginAccount.php';
|
||||
exit;
|
||||
}
|
||||
if (getClientVersion() == "1.4.0-beta1") {
|
||||
require __DIR__ . '/backported/1.4.0-beta1/loginAccount.php';
|
||||
exit;
|
||||
}
|
||||
if (getClientVersion() == "1.5.0" || getClientVersion() == "1.5.1" || getClientVersion() == "1.5.2") {
|
||||
require __DIR__ . '/backported/1.5/loginAccount.php';
|
||||
exit;
|
||||
}
|
||||
if (
|
||||
getClientVersion() == "1.2-beta2" ||
|
||||
getClientVersion() == "1.2" ||
|
||||
getClientVersion() == "1.21" ||
|
||||
getClientVersion() == "1.3-beta1"
|
||||
) {
|
||||
require __DIR__ . '/backported/1.2-beta2/loginAccount.php';
|
||||
exit;
|
||||
}
|
||||
checkClientDatabaseVersion();
|
||||
if (getClientVersion() == "1.3-beta2" || getClientVersion() == "1.3" || getClientVersion() == "1.33") {
|
||||
require __DIR__ . '/backported/1.3-beta2/loginAccount.php';
|
||||
exit;
|
||||
}
|
||||
if (getClientVersion() == "1.4.0-beta1") {
|
||||
require __DIR__ . '/backported/1.4.0-beta1/loginAccount.php';
|
||||
exit;
|
||||
}
|
||||
if (getClientVersion() == "1.5.0" || getClientVersion() == "1.5.1" || getClientVersion() == "1.5.2") {
|
||||
require __DIR__ . '/backported/1.5/loginAccount.php';
|
||||
exit;
|
||||
}
|
||||
|
||||
$conn = newConnection();
|
||||
|
||||
$post = getPostData();
|
||||
|
||||
@@ -1,26 +1,24 @@
|
||||
<?php
|
||||
require __DIR__ . '/../incl/util.php';
|
||||
setPlainHeader();
|
||||
if (isAllowedDatabaseVersion(getClientVersion())) {
|
||||
if (getClientVersion() == "1.2-beta2" || getClientVersion() == "1.2") {
|
||||
require __DIR__ . '/backported/1.2-beta2/registerAccount.php';
|
||||
exit;
|
||||
}
|
||||
if (
|
||||
getClientVersion() == "1.21" ||
|
||||
getClientVersion() == "1.3-beta1" ||
|
||||
getClientVersion() == "1.3-beta2" ||
|
||||
getClientVersion() == "1.3"
|
||||
) {
|
||||
require __DIR__ . '/backported/1.21/registerAccount.php';
|
||||
exit;
|
||||
}
|
||||
if (getClientVersion() == "1.5.0" || getClientVersion() == "1.5.1" || getClientVersion() == "1.5.2") {
|
||||
require __DIR__ . '/backported/1.5/registerAccount.php';
|
||||
exit;
|
||||
}
|
||||
if (getClientVersion() == "1.2-beta2" || getClientVersion() == "1.2") {
|
||||
require __DIR__ . '/backported/1.2-beta2/registerAccount.php';
|
||||
exit;
|
||||
}
|
||||
checkClientDatabaseVersion();
|
||||
if (
|
||||
getClientVersion() == "1.21" ||
|
||||
getClientVersion() == "1.3-beta1" ||
|
||||
getClientVersion() == "1.3-beta2" ||
|
||||
getClientVersion() == "1.3"
|
||||
) {
|
||||
require __DIR__ . '/backported/1.21/registerAccount.php';
|
||||
exit;
|
||||
}
|
||||
if (getClientVersion() == "1.5.0" || getClientVersion() == "1.5.1" || getClientVersion() == "1.5.2") {
|
||||
require __DIR__ . '/backported/1.5/registerAccount.php';
|
||||
exit;
|
||||
}
|
||||
|
||||
$conn = newConnection();
|
||||
|
||||
$post = getPostData();
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
require __DIR__ . '/../incl/util.php';
|
||||
setPlainHeader();
|
||||
checkClientDatabaseVersion();
|
||||
|
||||
$post = getPostData();
|
||||
$id = $post['id'] ?? '';
|
||||
|
||||
@@ -1,29 +1,26 @@
|
||||
<?php
|
||||
require __DIR__ . '/../incl/util.php';
|
||||
setPlainHeader();
|
||||
if (isAllowedDatabaseVersion(getClientVersion())) {
|
||||
if (
|
||||
getClientVersion() == "1.2-beta2" ||
|
||||
getClientVersion() == "1.2" ||
|
||||
getClientVersion() == "1.21" ||
|
||||
getClientVersion() == "1.3-beta1" ||
|
||||
getClientVersion() == "1.3-beta2" ||
|
||||
getClientVersion() == "1.3" ||
|
||||
getClientVersion() == "1.33"
|
||||
) {
|
||||
require __DIR__ . '/backported/1.2-beta2/syncAccount.php';
|
||||
exit;
|
||||
}
|
||||
if (getClientVersion() == "1.4.0-beta1") {
|
||||
require __DIR__ . '/backported/1.4.0-beta1/saveAccount.php';
|
||||
exit;
|
||||
}
|
||||
if (getClientVersion() == "1.5.0" || getClientVersion() == "1.5.1" || getClientVersion() == "1.5.2") {
|
||||
require __DIR__ . '/backported/1.5/saveAccount.php';
|
||||
exit;
|
||||
}
|
||||
if (
|
||||
getClientVersion() == "1.2-beta2" ||
|
||||
getClientVersion() == "1.2" ||
|
||||
getClientVersion() == "1.21" ||
|
||||
getClientVersion() == "1.3-beta1" ||
|
||||
getClientVersion() == "1.3-beta2" ||
|
||||
getClientVersion() == "1.3" ||
|
||||
getClientVersion() == "1.33"
|
||||
) {
|
||||
require __DIR__ . '/backported/1.2-beta2/syncAccount.php';
|
||||
exit;
|
||||
}
|
||||
if (getClientVersion() == "1.4.0-beta1") {
|
||||
require __DIR__ . '/backported/1.4.0-beta1/saveAccount.php';
|
||||
exit;
|
||||
}
|
||||
if (getClientVersion() == "1.5.0" || getClientVersion() == "1.5.1" || getClientVersion() == "1.5.2") {
|
||||
require __DIR__ . '/backported/1.5/saveAccount.php';
|
||||
exit;
|
||||
}
|
||||
checkClientDatabaseVersion();
|
||||
|
||||
$post = getPostData();
|
||||
$token = $post['token'] ?? '';
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
<?php
|
||||
require __DIR__ . '/../incl/util.php';
|
||||
setPlainHeader();
|
||||
if (isAllowedDatabaseVersion(getClientVersion())) {
|
||||
if (getClientVersion() == "1.5.1" || getClientVersion() == "1.5.2") {
|
||||
require __DIR__ . '/backported/1.5.1/sendChatroomMessage.php';
|
||||
exit;
|
||||
}
|
||||
if (getClientVersion() == "1.5.1" || getClientVersion() == "1.5.2") {
|
||||
require __DIR__ . '/backported/1.5.1/sendChatroomMessage.php';
|
||||
exit;
|
||||
}
|
||||
checkClientDatabaseVersion();
|
||||
|
||||
$post = getPostData();
|
||||
$request_content = $post['content'] ?? '';
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
require __DIR__ . '/../incl/util.php';
|
||||
setPlainHeader();
|
||||
checkClientDatabaseVersion();
|
||||
|
||||
$post = getPostData();
|
||||
$request_content = $post['content'] ?? '';
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
require __DIR__ . '/../incl/util.php';
|
||||
setPlainHeader();
|
||||
checkClientDatabaseVersion();
|
||||
|
||||
$post = getPostData();
|
||||
$token = $post['token'] ?? '';
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
require __DIR__ . '/../incl/util.php';
|
||||
setPlainHeader();
|
||||
checkClientDatabaseVersion();
|
||||
$conn = newConnection();
|
||||
|
||||
$post = getPostData();
|
||||
|
||||
Reference in New Issue
Block a user