entry[0]->link['href'] ); unlink(RSS_LOCAL_PATH); } catch (Exception $e) { print_failure('Unable to update: '.$e->getMessage()); return; } } else { print_failure('Unable to read : ' . RSS_LOCAL_PATH); return; } if(isset($seed)) { /// Checking for changes in the main update files: $main_update_files = array( 'modules/update/update.php' => 'https://raw.githubusercontent.com/OpenGamePanel/'.REPONAME.'/'.$seed.'/modules/update/update.php', 'modules/update/updating.php' => 'https://raw.githubusercontent.com/OpenGamePanel/'.REPONAME.'/'.$seed.'/modules/update/updating.php' ); $refresh = False; foreach($main_update_files as $local_path => $remote_url) { $result = check_file($local_path, $remote_url); if ($result === 'nochange') { continue; } elseif($result) { $refresh = True; } else { return; } } if($refresh) { header("Refresh:0"); return; } echo "

".get_lang('update')."

"; $pversion = $settings['ogp_version']; echo ''.get_lang('blacklist_files')." ".get_lang('blacklist_files_info')."

"; echo get_lang('panel_version').": ".$pversion."

"; echo get_lang('latest_version').": $seed

"; if ( $seed != $pversion ) { $dwl = $gitHubURL . REPONAME . '/archive/'.$seed.'.zip'; $dwlHeaders = get_headers($dwl); if($dwlHeaders[0] != 'HTTP/1.1 302 Found') print_failure('The generated URL for the download returned a bad response code: ' . $dwlHeaders[0]); else echo "
\n". "


\n"; } else { print_success(get_lang('the_panel_is_up_to_date')); } } } ?>