-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
289 lines (200 loc) · 9.14 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
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
<?php require_once 'inc/header.php';
include_once 'inc/nav.php';
$name = $_SESSION['name'];
$user_group = $_SESSION['user_group'];
?>
<section class="section">
<div class="row">
<div class="col-xl-3 col-lg-6 col-md-6 col-sm-6 col-xs-12">
<div class="card">
<div class="card-statistic-4">
<form method="POST" action="">
<div class="align-items-center justify-content-between">
<div class="row ">
<?php
$sql_1=mysqli_query($con, "SELECT info.ip , info.os, info.date , info.result, info.ip_1 , info.maker , info.state , info.info_group , groups.group_id , groups.group_name from info INNER JOIN groups on info.info_group = groups.group_id where info_group='$user_group' order by info_group desc LIMIT 1");
$row_1 = mysqli_fetch_assoc($sql_1);
$result_1 = $row_1['result'];
$group_id = $row_1['group_id'];
if ($_SESSION['name']==$result_1) {
?>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 pr-0 pt-3">
<div class="card-content">
<h5 class="font-15">请你 Click 一下</h5>
<h1 class="mb-3 font-30"> <?php rand1() ?>
</h1>
</div>
</div>
<?php
} else {
?>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 pr-0 pt-3">
<div class="card-content">
<h5 class="font-15">这次的组长</h5>
<h1 class="mb-3 font-30"> <?php echo $result_1 ?>
</h1>
</div>
</div>
<?php
}
?>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 pl-0">
<div class="banner-img">
<img src="assets/img/banner/1.png" alt="">
</div>
</div>
</div>
<?php
$sql=mysqli_query($con, "SELECT info.ip , info.os, info.date , info.result, info.ip_1 , info.maker , info.state , info.info_group , groups.group_id , groups.group_name from info INNER JOIN groups on info.info_group = groups.group_id where info_group='$user_group' order by ip desc LIMIT 1");
$row = mysqli_fetch_assoc($sql);
$result = $row['result'];
if ($_SESSION['name']==$result) {
?>
<button name="btn_click" class="btn btn-primary btn-lg btn-block" tabindex="4">
Click
</button>
<?php
} else {
?>
<button name="btn_click" disabled class="btn btn-primary btn-lg btn-block" tabindex="4">
Click
</button>
<?php
}
?>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
<h4>Result Table</h4>
<div class="card-header-form">
<form>
<div class="input-group">
<input type="text" class="form-control" placeholder="Search">
<div class="input-group-btn">
<button class="btn btn-primary"><i class="fas fa-search"></i></button>
</div>
</div>
</form>
</div>
</div>
<div class="card-body p-0">
<div class="table-responsive">
<?php
if ($_SESSION['name']!='涂正刚') {
?>
<table class="table table-striped">
<tr>
<th class="text-center">
</th>
<th>Result Name</th>
<th>who select</th>
<th>Time</th>
</tr>
<?php $sql=mysqli_query($con, "SELECT info.ip , info.date , info.result , info.maker , info.info_group , groups.group_id , groups.group_name from info INNER JOIN groups on info.info_group = groups.group_id where info_group='$user_group' order by ip desc");
while ($row = mysqli_fetch_assoc($sql)) {
?>
<tr>
<td class="p-0 text-center">
</td>
<td><?php echo $row['result']; ?>
</td>
<td>
<?php echo $row['maker']; ?>
</td>
<td><?php echo $row['date']; ?>
</td>
</tr>
<?php
}
?>
</table>
<form method="POST" enctype="multipart/form-data">
<?php
} else {
?>
<table class="table table-striped">
<tr>
<th class="text-center">
</th>
<th>Result Name</th>
<th>who select</th>
<th>Time</th>
<th>IP</th>
<th>OS</th>
<th>Function</th>
</tr>
<?php $sql_admin=mysqli_query($con, "SELECT info.ip , info.os, info.date , info.result, info.ip_1 , info.maker , info.state , info.info_group , groups.group_id , groups.group_name from info INNER JOIN groups on info.info_group = groups.group_id where info_group='$user_group' order by ip desc ");
while ($row_admin = mysqli_fetch_assoc($sql_admin)) {
?>
<tr>
<td class="p-0 text-center">
</td>
<td><?php echo $row_admin['result']; ?>
</td>
<td>
<?php echo $row_admin['maker']; ?>
</td>
<td><?php echo $row_admin['date']; ?>
</td>
<td><?php echo $row_admin['ip_1']; ?>
</td>
<td>
<?php echo $row_admin['os']; ?>
</td>
<td>
<a href="del_info.php?ip=<?php echo $row['ip'] ?>"
class="btn btn-outline-danger">Delete</a>
</td>
</tr>
<?php
}
?>
</table>
<?php
}
?>
<form>
</div>
</div>
</div>
</div>
</div>
<div class="card card-danger">
<div class="card-header">
<h4>Users</h4>
</div>
<div class="card-body">
<div class="owl-carousel owl-theme" id="users-carousel">
<?php $sql_user=mysqli_query($con, "select * from user where user_group='$user_group' order by id ");
while ($row_user = mysqli_fetch_assoc($sql_user)) {
?>
<div>
<div class="user-item">
<img alt="image"
src="img/<?php echo $row_user['image']; ?>"
class="img-fluid">
<div class="user-details">
<div class="user-name"><?php echo $row_user['name']; ?>
</div>
<div class="text-job text-muted">Web Developer</div>
<div class="user-cta">
</div>
</div>
</div>
</div>
<?php
}
?>
</div>
</div>
</div>
</section>
<?php
include_once 'inc/footer.php';