$versionHash[1], "old" => isset($version["list"]) ? $version["list"]["current"] ?? null : null ]; $version["build"]++; } else { $version["revision"]++; } file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/version.json", json_encode($version)); if (!is_link($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $app["other"]["id"])) { link($_SERVER['DOCUMENT_ROOT'] . "/includes/data/other", $_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $app["other"]["id"]); } echo("Backing up...\n"); $lastBackup = (int)trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/backup.txt")); if (time() - $lastBackup >= 3600) { require_once "./refresh/backup.inc"; file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/backup.txt", time()); echo("Backup completed\n"); } else { echo("Backup skipped\n"); } echo("Fetching school information...\n"); file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/school.json", "{}"); chdir("./external/school"); exec("node index.js"); chdir("../.."); echo("Fetched school information\n"); echo("Completed.\n");