-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathindex.php
42 lines (42 loc) · 1.36 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/*
* @Description:
* @Autor: 吃纸怪
* @QQ: 2903074366
* @Email: [email protected]
* @QQgroup: 801235342
* @Github: https://github.com/zhiguai
*/
if ($_GET['state'] == "server") {
@header("content-type:application/json; charset=utf-8");
@header('Access-Control-Allow-Origin: *');
//引入数据库配置
require_once "./config/sqlConfig.php";
//引入数据库操作函数库
require_once "./public/dbInc.php";
//数据库连接检测
$conn = Connect();
// 报告 E_NOTICE 之外的所有错误
error_reporting(E_ALL & ~E_NOTICE);
$sqlcont='select * from card';//卡
$data['cntcont']=mysqli_num_rows(Execute($conn,$sqlcont));
$resspk='select * from comment';//评论
$data['cntspk']=mysqli_num_rows(Execute($conn,$resspk));
$reszan='select * from zan';//赞
$data['rowzan']=mysqli_num_rows(Execute($conn,$reszan));
$data['version'] = SYSTEM_VERSION;
$data['version_r'] = "1.0.4.3";//详细版本号
$data['state'] = "200";
echo json_encode($data);
exit;
}
if (is_dir("./install")) {
if (file_exists("./install/lock.txt")) {
header("location:./index/index.php?notifications=2¬ifications_content=请务必删除程序主目录下的install文件夹后再投入使用!!!");
exit;
}
header("location:./install/index.php");
exit;
}
header("location:./index/index.php");
exit;