]>
jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blob - channels/index.php
2 require_once "../common.php";
3 require_once "../connection.php";
4 require_once "../header.php";
10 /* Nothing being posted yet */
14 $channels = $rpc->channel()->getAll();
17 <h4
>Channels Overview
</h4
><br
>
18 <table
class="container-xxl table table-sm table-responsive caption-top table-striped">
19 <thead
class="table-primary">
28 $columns = array_column($channels, 'num_users');
29 array_multisort($columns, SORT_DESC
, $channels);
31 foreach($channels as $channel)
34 echo "<td><a href=\"details.php?chan=".urlencode(htmlspecialchars($channel->name
))."\">".htmlspecialchars($channel->name
)."</a></td>";
35 $s = ($channel->num_users
) ? "success" : "danger";
36 echo "<td><span class=\"badge rounded-pill badge-$s\">".$channel->num_users
."</span></td>";
37 $modes = (isset($channel->modes
)) ? "+" . $channel->modes
: "<none>";
38 echo "<td>".htmlspecialchars($modes)."</td>";
39 $topic = (isset($channel->topic
)) ? htmlspecialchars($channel->topic
) : "";
40 echo "<td>".$topic."</td>";
41 echo "<td>".$channel->creation_time
."</td>";
45 require_once("../footer.php");