修复一些问题

This commit is contained in:
zyx0814
2024-05-11 00:27:45 +08:00
Unverified
parent 588b8ec561
commit 5b855704ff
23 changed files with 227 additions and 116 deletions

View File

@@ -351,8 +351,8 @@ class dzz_upgrade
if (!@mkdir($dir, 0777)) {
return false;
}
@touch($dir . '/index.htm');
@chmod($dir . '/index.htm', 0777);
// @touch($dir . '/index.html');
// @chmod($dir . '/index.html', 0777);
}
return true;
}

View File

@@ -17,10 +17,33 @@ class Sysreg{
$chars[date('s')].substr(md5($onlineip.TIMESTAMP), 0, 4).random(4);
C::t('setting')->update('machinecode',$mcode);
C::t('setting')->update('adminfirstlogin',0);
include_once libfile('function/cache');
updatecache(array('machinecode','adminfirstlogin'));
self::upgradeinformation($mcode);
}else{
C::t('setting')->update('adminfirstlogin',0);
}
}
private static function upgradeinformation($machinecode) {
global $_SERVER;
$update = array();
$update[ 'mcode' ] = $machinecode;
$update[ 'usum' ] = 1;
$update[ 'siteurl' ] = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'];
$update[ 'sitename' ] = getglobal('sitename');
$update[ 'version' ] = CORE_VERSION;
$update[ 'version_level' ] = CORE_VERSION_LEVEL;
$update[ 'release' ] = CORE_RELEASE;
$update[ 'fixbug' ] = CORE_FIXBUG;
$update[ 'license_version' ] = LICENSE_VERSION;
$update[ 'license_limit' ] = LICENSE_LIMIT;
$data = '';
foreach ( $update as $key => $value ) {
$data .= $key . '=' . rawurlencode( $value ) . '&';
}
$upgradeurl = APP_CHECK_URL . "authlicense/count/info/" . rawurlencode( base64_encode( $data ) ) . "/" . time();
dfopen( $upgradeurl );
}
}