From 0185b1692ee7a5b59a4955ed5900f8e0fd929b7e Mon Sep 17 00:00:00 2001 From: SuperDev Date: Thu, 22 Dec 2022 21:23:51 -0600 Subject: [PATCH] Update index.php --- admin/dashboard/index.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/admin/dashboard/index.php b/admin/dashboard/index.php index c2eb618..24d184a 100644 --- a/admin/dashboard/index.php +++ b/admin/dashboard/index.php @@ -66,6 +66,20 @@ return $bytes . ' B'; // get size of folders in a folder $plugin_count = count(glob('../../plugins/*', GLOB_ONLYDIR)); +// Update checker +$PATCH_URL = 'https://raw.githubusercontent.com/Supernova3339/anonfiles/main/'; +$version_filename = 'latest.txt?token=GHSAT0AAAAAAB4S7HM4SZGF7VWPABQO3KRSY5FDV4Q'; # REMOVE TOKEN +// Get version + $ch = curl_init($this->PATCH_URL.$this->version_filename); + + curl_setopt($ch, CURLOPT_HEADER, 0); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + + $str = curl_exec($ch); + curl_close($ch); + + $server_version = $this->str_to_version_info($str); + ?> @@ -101,6 +115,12 @@ $plugin_count = count(glob('../../plugins/*', GLOB_ONLYDIR));

Version

+

+ version){ + echo '

update available

' + } + ?>