This repository was archived by the owner on Aug 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathadmin_statistics.php
More file actions
164 lines (161 loc) · 4.88 KB
/
admin_statistics.php
File metadata and controls
164 lines (161 loc) · 4.88 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<div class="statistics-container card-effect">
<h2>备案数据统计 <a href="admin.php" class="back-button">返回备案列表</a></h2>
<div class="stats-summary">
<div class="stat-item">
<h3>总备案数</h3>
<p><?php echo $total_filings; ?></p>
</div>
<div class="stat-item pending">
<h3>待审批</h3>
<p><?php echo $pending_filings; ?></p>
</div>
<div class="stat-item approved">
<h3>已通过</h3>
<p><?php echo $approved_filings; ?></p>
</div>
<div class="stat-item rejected">
<h3>已拒绝</h3>
<p><?php echo $rejected_filings; ?></p>
</div>
</div>
<h3>每日新增备案 (过去7天)</h3>
<div class="daily-stats chart-container">
<?php foreach ($daily_new_filings as $date => $count): ?>
<div class="chart-bar" style="height: <?php echo ($count / (max($daily_new_filings) ?: 1)) * 100; ?>%;" title="<?php echo $date; ?>: <?php echo $count; ?>">
<span><?php echo $count; ?></span>
</div>
<?php endforeach; ?>
</div>
<div class="chart-labels">
<?php foreach ($daily_new_filings as $date => $count): ?>
<span><?php echo date('m-d', strtotime($date)); ?></span>
<?php endforeach; ?>
</div>
<h3>每月新增备案 (过去12个月)</h3>
<div class="monthly-stats chart-container">
<?php foreach ($monthly_new_filings as $month => $count): ?>
<div class="chart-bar" style="height: <?php echo ($count / (max($monthly_new_filings) ?: 1)) * 100; ?>%;" title="<?php echo $month; ?>: <?php echo $count; ?>">
<span><?php echo $count; ?></span>
</div>
<?php endforeach; ?>
</div>
<div class="chart-labels">
<?php foreach ($monthly_new_filings as $month => $count): ?>
<span><?php echo date('Y-m', strtotime($month)); ?></span>
<?php endforeach; ?>
</div>
</div>
<style>
.statistics-container {
background-color: #0a0a0a;
border: 1px solid #0ff;
border-radius: 8px;
padding: 20px;
margin-top: 20px;
color: #0ff;
box-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
}
.statistics-container h2, .statistics-container h3 {
color: #0ff;
text-align: center;
margin-bottom: 20px;
text-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
}
.stats-summary {
display: flex;
justify-content: space-around;
flex-wrap: wrap;
margin-bottom: 30px;
}
.stat-item {
background-color: #1a1a1a;
border: 1px solid #0ff;
border-radius: 5px;
padding: 15px;
margin: 10px;
text-align: center;
flex: 1;
min-width: 180px;
box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}
.stat-item h3 {
color: #0ff;
margin-top: 0;
margin-bottom: 10px;
font-size: 1.2em;
}
.stat-item p {
color: #fff;
font-size: 2em;
font-weight: bold;
}
.stat-item.pending {
border-color: #ffcc00;
box-shadow: 0 0 10px rgba(255, 204, 0, 0.6);
}
.stat-item.approved {
border-color: #00ff00;
box-shadow: 0 0 10px rgba(0, 255, 0, 0.6);
}
.stat-item.rejected {
border-color: #ff0000;
box-shadow: 0 0 10px rgba(255, 0, 0, 0.6);
}
.chart-container {
display: flex;
justify-content: space-around;
align-items: flex-end;
height: 200px;
background-color: #1a1a1a;
border: 1px solid #0ff;
border-radius: 5px;
padding: 10px;
margin-top: 10px;
box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}
.chart-bar {
width: 8%;
background-color: #00ffff;
margin: 0 1%;
position: relative;
display: flex;
justify-content: center;
align-items: flex-end;
padding-bottom: 5px;
border-radius: 3px 3px 0 0;
box-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
transition: height 0.5s ease-in-out;
}
.chart-bar span {
position: absolute;
top: -20px;
color: #fff;
font-size: 0.8em;
text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}
.chart-labels {
display: flex;
justify-content: space-around;
margin-top: 5px;
color: #0ff;
font-size: 0.9em;
}
.chart-labels span {
flex: 1;
text-align: center;
}
.back-button {
display: inline-block;
margin-left: 20px;
padding: 8px 15px;
background-color: #007bff;
color: white;
text-decoration: none;
border-radius: 5px;
font-size: 0.8em;
transition: background-color 0.3s ease;
}
.back-button:hover {
background-color: #0056b3;
}
</style>