forked from lincanbin/Carbon-Forum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
statistics.php
35 lines (34 loc) · 1.06 KB
/
statistics.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
<?php
require(__DIR__ . '/common.php');
require(__DIR__ . '/language/' . ForumLanguage . '/statistics.php');
//数据没问题的情况下不需要排序,拿出来顺序就是好的,并且顺序可以通过刷新缓存修复
$StatisticsData = $DB->query('SELECT * FROM ' . $Prefix . 'statistics');
$TotalTopicsStatisticsData = array();
foreach ($StatisticsData as $Key => $Value) {
$TotalTopicsStatisticsData[] = array(
$Value['DaysDate'],
$Value['TotalTopics'],
$Value['TotalPosts'],
$Value['TotalUsers'],
$Value['DaysTopics'],
$Value['DaysPosts'],
$Value['DaysUsers']
);
}
$TotalTopicsStatisticsData[] = array(
date('Y-m-d'),
$Config['NumTopics'],
$Config['NumPosts'],
$Config['NumUsers'],
$Config['DaysTopics'],
$Config['DaysPosts'],
$Config['DaysUsers']
);
unset($StatisticsData);
$DataJsonString = json_encode($TotalTopicsStatisticsData);
unset($TotalTopicsStatisticsData);
$DB->CloseConnection();
// 页面变量
$PageTitle = $Lang['Statistics'];
$ContentFile = $TemplatePath . 'statistics.php';
include($TemplatePath . 'layout.php');