]>
Commit | Line | Data |
---|---|---|
90dc8f2b | 1 | <?php |
a44ced16 BM |
2 | require_once "../common.php"; |
3 | require_once UPATH . "/header.php"; | |
90dc8f2b VP |
4 | |
5 | if (!empty($_POST)) | |
6 | { | |
7 | do_log($_POST); | |
8 | ||
9 | /* Nothing being posted yet */ | |
10 | ||
11 | } | |
12 | ||
13 | $channels = $rpc->channel()->getAll(); | |
14 | ||
15 | ?> | |
0d846731 | 16 | <h4>Channels Overview</h4><br> |
f41baac8 | 17 | <table class="container-xxl table table-sm table-responsive caption-top table-striped"> |
d1d9caa9 | 18 | <thead class="table-primary"> |
90dc8f2b | 19 | <th>Name</th> |
f2a87326 | 20 | <th>Users</th> |
90dc8f2b | 21 | <th>Modes</th> |
f2a87326 BM |
22 | <th>Topic</th> |
23 | <th>Created</th> | |
def32bb1 BM |
24 | </thead> |
25 | <tbody> | |
90dc8f2b | 26 | <?php |
5a054690 M |
27 | $columns = array_column($channels, 'num_users'); |
28 | array_multisort($columns, SORT_DESC, $channels); | |
29 | ||
90dc8f2b VP |
30 | foreach($channels as $channel) |
31 | { | |
32 | echo "<tr>"; | |
d9a581b9 | 33 | echo "<td><a href=\"details.php?chan=".urlencode(htmlspecialchars($channel->name))."\">".htmlspecialchars($channel->name)."</a></td>"; |
90dc8f2b | 34 | echo "<td>".$channel->num_users."</td>"; |
90dc8f2b | 35 | $modes = (isset($channel->modes)) ? "+" . $channel->modes : "<none>"; |
11b7f7e4 BM |
36 | echo "<td>".htmlspecialchars($modes)."</td>"; |
37 | $topic = (isset($channel->topic)) ? htmlspecialchars($channel->topic) : ""; | |
f2a87326 BM |
38 | echo "<td>".$topic."</td>"; |
39 | echo "<td>".$channel->creation_time."</td>"; | |
f41baac8 | 40 | echo "</tr>"; |
90dc8f2b | 41 | } |
809f7483 VP |
42 | |
43 | require_once("../footer.php"); | |
def32bb1 BM |
44 | ?> |
45 | </tbody> | |
46 | </table> |