From cd0147e3195e8c978b9672f509454077cdefbef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yi=C4=9Fit=20Kerem=20Oktay?= Date: Sun, 16 Aug 2020 21:55:01 +0300 Subject: [PATCH] Implement version check --- index.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index b9104b7..0469aa3 100644 --- a/index.php +++ b/index.php @@ -54,7 +54,13 @@ if (isset($_GET['subscriber_logout'])){ unset($_SESSION['subscriber_id']); header('Location: index.php'); } - +$db = SSDB(); +$versionfile = fopen("versionfile", "r") or die("Unable to open version file!"); +$appversion = fread($versionfile,filesize("versionfile")); +fclose($versionfile); +if($db->getSetting($mysqli,"dbConfigVersion") != $appversion){ + die("Database needs to be updated. Please update the database and try again."); +} Template::render_header("Status"); ?>