更新 common文件

This commit is contained in:
LyLme 2022-03-19 21:51:13 +08:00
parent ab52e53ca4
commit bc14e29978
1 changed files with 6 additions and 7 deletions

View File

@ -1,11 +1,12 @@
<?php
header ("Content-type:text/html;charset=utf-8");
@header ("Content-type:text/html;charset=utf-8");
define('IN_CRONLITE', true);
define('SYS_KEY', 'lylme_key');
define('SYSTEM_ROOT', dirname(__FILE__).'/');
define('ROOT', dirname(SYSTEM_ROOT).'/');
error_reporting(E_ALL ^ E_NOTICE);
require ROOT.'config.php';
if(!defined('SQLITE') && (!$dbconfig['user']||!$dbconfig['pwd']||!$dbconfig['dbname']))//检测安装
if(!defined('SQLITE') && (!$dbconfig['user']||!$dbconfig['pwd']||!$dbconfig['dbname']))
{
@unlink(ROOT.'install/install.lock');
header('Content-type:text/html;charset=utf-8');
@ -14,15 +15,13 @@ exit();
}
include_once(SYSTEM_ROOT."db.class.php");
$DB=new DB($dbconfig['host'],$dbconfig['user'],$dbconfig['pwd'],$dbconfig['dbname'],$dbconfig['port']);
$rs= $DB->query("SELECT * FROM `lylme_config`");
while($row = mysqli_fetch_assoc($rs)) {
$conf[$row['k']]=$row['v'];
}
while($row = mysqli_fetch_assoc($rs)) $conf[$row['k']]=$row['v'];
include_once(SYSTEM_ROOT."function.php");
include_once(SYSTEM_ROOT."member.php");
include_once(SYSTEM_ROOT."tj.php");
$linksrows=$DB->num_rows($DB->query("SELECT * FROM `lylme_links`"));
$groupsrows=$DB->num_rows($DB->query("SELECT * FROM `lylme_groups`"));
$cdnpublic = cdnpublic(isset($conf['cdnpublic']));
$template = './template/'.$conf["template"].'/index.php';
?>