From b829a6f42e808002752c062373211f906fbecb0e Mon Sep 17 00:00:00 2001 From: LyLme Date: Sat, 12 Mar 2022 15:23:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E8=BF=9E=E6=8E=A5=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/common.php | 43 +++++++++++++++---------------------------- 1 file changed, 15 insertions(+), 28 deletions(-) diff --git a/include/common.php b/include/common.php index 31b94bd..e8a8820 100644 --- a/include/common.php +++ b/include/common.php @@ -1,41 +1,28 @@ 点此安装'; +exit(); } -$GLOBALS['con'] = $con; -mysqli_query($con,"set sql_mode = ''"); - //字符转换,读库 -mysqli_query($con,"set character set 'utf8'"); -//写库 -mysqli_query($con,"set names 'utf8'"); +include_once(SYSTEM_ROOT."db.class.php"); +$DB=new DB($dbconfig['host'],$dbconfig['user'],$dbconfig['pwd'],$dbconfig['dbname'],$dbconfig['port']); -$rs= mysqli_query($con,"SELECT * FROM `lylme_config`"); + +$rs= $DB->query("SELECT * FROM `lylme_config`"); 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"); -mysqli_query($con,'set names utf8'); -$linksrows=mysqli_num_rows(mysqli_query($con, "SELECT * FROM `lylme_links`")); -$groupsrows=mysqli_num_rows(mysqli_query($con, "SELECT * FROM `lylme_groups`")); - -?> - +$linksrows=$DB->num_rows($DB->query("SELECT * FROM `lylme_links`")); +$groupsrows=$DB->num_rows($DB->query("SELECT * FROM `lylme_groups`")); +?> \ No newline at end of file