]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - channels/index.php
Users: Scratch the "Secure" column, as it's less useful nowadays that
[irc/unrealircd/unrealircd-webpanel.git] / channels / index.php
index af8637c89fd0fd83205ade07de3e00056ef4687a..111bf225e26160c492b8b0050541881efec281b2 100644 (file)
@@ -1,7 +1,7 @@
 <?php
-require_once "../common.php";
-require_once "../connection.php";
-require_once "../header.php";
+require_once "../inc/common.php";
+require_once "../inc/connection.php";
+require_once "../inc/header.php";
 
 if (!empty($_POST))
 {
@@ -34,18 +34,20 @@ $channels = $rpc->channel()->getAll();
                        echo "<td><a href=\"details.php?chan=".urlencode(htmlspecialchars($channel->name))."\">".htmlspecialchars($channel->name)."</a></td>";
                        $s = ($channel->num_users) ? "success" : "danger";
                        echo "<td><span class=\"badge rounded-pill badge-$s\">".$channel->num_users."</span></td>";
-                       $modes = (isset($channel->modes)) ? "+" . $channel->modes : "<none>";
-                       echo "<td class=\"modescol\">".htmlspecialchars($modes)."</td>";
+                       $modes = (isset($channel->modes)) ? "+" . explode(" ",$channel->modes)[0] : "<none>";
+                       echo "<td class=\"modescol\">".
+                            "<span data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"+".htmlspecialchars($channel->modes)."\">".
+                            htmlspecialchars($modes)."</span></td>";
                        $topic = (isset($channel->topic)) ? htmlspecialchars($channel->topic) : "";
                        echo "<td class=\"topiccol\" style=\"overflow:hidden;\">".$topic."</td>";
                        $date = explode("T", $channel->creation_time)[0];
                        echo "<td class=\"createdcol\" style=\"white-space:nowrap\">".
                             "<span data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"".$channel->creation_time."\">".
-                            "$date</td>";
+                            "$date</span></td>";
                        echo "</tr>";
                }
 
-       require_once("../footer.php");
+       require_once("../inc/footer.php");
        ?>
 </tbody>
 </table>
@@ -66,7 +68,7 @@ $channels = $rpc->channel()->getAll();
                        hide_elements = '.modescol';
                } else
                {
-                       show_elements = '.createdcol, .modes, .topiccol';
+                       show_elements = '.createdcol, .modescol, .topiccol';
                        hide_elements = '';
                }