Fetch the repository succeeded.
This action will force synchronization from Young小杰/YoungxjTools, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
<?php
include 'function.base.php';
$CONF = require('function.config.php');
define('VERSION', $CONF['config']['VERSION']);
// 应用目录为当前目录
define('APP_PATH', __DIR__ . '/');
function UpdateAction(){
include 'Autoupdate.class.php';
$update = new Autoupdate(APP_PATH,false);
$update->currentVersion = VERSION;
$update->updateUrl = 'https://api.yum6.cn/service/';
$latest = $update->checkUpdate();
if ($latest !== false) {
if ($latest > $update->currentVersion) {
if ($update->update()) {
if($update->replaceupdate()){
$res=['code'=>'0000','msg'=>'更新成功,欢迎体验最新的YoungxjTools系统^_^'];
}else{
$res=['code'=>'0004','msg'=>'更新文件效验失败!'];
}
}else {
$res=['code'=>'0002','msg'=>'在线更新失败,请尝试手动更新!信息:'.$update->getLastError()];
}
}else {
$res=['code'=>'0001','msg'=>'没有发现可用的新版本!'];
}
} else {
$res=['code'=>'0003','msg'=>$update->getLastError()];
}
echo json_encode($res);
}
if($_POST['token']==md5(md5((int)(time()/1200)).'YoungxjTools')){
UpdateAction();
}else{
exit('非法请求');
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。