forked from AxeniaDevTeam/Axenia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchat_view.php
58 lines (53 loc) · 1.99 KB
/
chat_view.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
<div class="d-flex w-100 h-100 mx-auto flex-column">
<? include('header.php');
$chat_id=$_GET['chat_id'];
?>
<main role="main" class="mb-auto bg-light p-5 text-dark">
<div class='row'>
<div class="col">
<h1><?php echo $site->getGroupName($chat_id); ?></h1>
</div>
</div>
<div id="carouselIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<?php
$users=array_chunk($site->getTopUsers($chat_id),10);
if(count($users)>1)
foreach($users as $n=>$u){
echo "<li data-target=\"#carouselIndicators\" data-slide-to=\"$n\"";
if($n==0)echo "class=\"active\"";
echo ">".($n+1)."</li>";
}
?>
</ol>
<div class="carousel-inner">
<?php
foreach($users as $n=>$u){
echo "<div class=\"carousel-item";
if($n==0) echo " active";
echo "\">";
echo "
<table class=\"table table-hover \">
<thead>
<tr>
<th scope=\"col\">#</th>
<th scope=\"col\">Name</th>
<th scope=\"col\">Karma</th>
</tr>
</thead>
<tbody>
";
foreach($u as $i=>$v){
echo "<tr><th scope=\"row\">".($n*10+$i+1)."</th>";
echo "<td>".$site->beutifyName($v[0],$v[1],$v[2])."</td>";
echo "<td>$v[3]</td>";
echo "</tr>";
}
echo "</tbody></table></div>";
}
?>
</div>
</div>
</main>
<? include('footer.php'); ?>
</div>