Check for updates (celebration_emoji)

This commit is contained in:
Yiğit Kerem Oktay 2020-08-17 00:03:58 +03:00 committed by GitHub
parent 55f92ead6d
commit 8f3b4d081b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 0 deletions

View File

@ -66,6 +66,22 @@ fclose($versionfile);
if($db->getSetting($mysqli,"dbConfigVersion") != $appversion){
die("Database needs to be updated. Please update the database and try again. App Version: '".$appversion."' DB Settings Version: '".$db->getSetting($mysqli,"dbConfigVersion")."'.");
}
$useedf = fopen("updateseed", "r") or die("Unable to open updateseed file!");
$useed = fread($versionfile,filesize("updateseed"));
fclose($useedf);
if($useed == "stable"){
$remoteversion = file_get_contents("https://skkyfallenhosted.ml/serverstatus/versionauthority/stable/version");
$remotedl = file_get_contents("https://skkyfallenhosted.ml/serverstatus/versionauthority/stable/dl");
}
if($useed == "beta"){
$remoteversion = file_get_contents("https://skkyfallenhosted.ml/serverstatus/versionauthority/beta/version");
$remotedl = file_get_contents("https://skkyfallenhosted.ml/serverstatus/versionauthority/beta/dl");
}
if($db->getSetting($mysqli,"notifyUpdate") == "yes"){
if($remoteversion != $appversion){
die("Your installation is not upp to date! Download the new update from: '".$remotedl."'");
}
}
Template::render_header("Status");
?>
<div class="text-center">