点此安装';
exit();
}
$DB = new \lib\PdoHelper($dbconfig);
if($DB->query("select * from pre_config where 1")==FALSE)//检测安装2
{
header('Content-type:text/html;charset=utf-8');
echo '你还没安装!点此安装';
exit();
}
$CACHE=new \lib\Cache();
$conf=$CACHE->pre_fetch();
define('SYS_KEY', $conf['syskey']);
if(!$conf['localurl'])$conf['localurl'] = $siteurl;
$password_hash='!@#%!s!0';
if ($conf['version'] < DB_VERSION) {
if (!$install) {
header('Content-type:text/html;charset=utf-8');
echo '请先完成网站升级!点此升级';
exit;
}
}
include_once(SYSTEM_ROOT."functions.php");
include_once(SYSTEM_ROOT."member.php");
require_once SYSTEM_ROOT."vendor/autoload.php";
if (!file_exists(ROOT.'install/install.lock') && file_exists(ROOT.'install/index.php')) {
sysmsg('
检测到无 install.lock 文件
- 如果您尚未安装本程序,请前往安装
- 如果您已经安装本程序,请手动放置一个空的 install.lock 文件到 /install 文件夹下,为了您站点安全,在您完成它之前我们不会工作。
为什么必须建立 install.lock 文件?
它是安装保护文件,如果检测不到它,就会认为站点还没安装,此时任何人都可以安装/重装你的网站。
');exit;
}
if($conf['cdnpublic']==1){
$cdnpublic = '//lib.baomitu.com/';
}elseif($conf['cdnpublic']==2){
$cdnpublic = 'https://s4.zstatic.net/ajax/libs/';
}elseif($conf['cdnpublic']==4){
$cdnpublic = '//cdnjs.cloudflare.com/ajax/libs/';
}else{
$cdnpublic = '//mirrors.sustech.edu.cn/cdnjs/ajax/libs/';
}
if(empty($conf['public_key'])){
$key_pair = generate_key_pair();
if($key_pair){
$conf['public_key'] = $key_pair['public_key'];
$conf['private_key'] = $key_pair['private_key'];
saveSetting('public_key', $conf['public_key']);
saveSetting('private_key', $conf['private_key']);
$CACHE->clear();
unset($key_pair);
}
}
?>