2 require_once "../common.php";
3 require_once UPATH
. "/header.php";
9 /* Get the server list */
10 $servers = $rpc->server()->getAll();
12 <h4
>Servers Overview
</h4
>
14 Click on a server name to view more information
.
19 if (isset($_POST['sf_name']) && strlen($_POST['sf_name']))
20 Message
::Info("Listing servers which match name: \"" . $_POST['sf_name'] . "\"");
23 <table
class="table table-responsive caption-top table-striped">
25 <th scope
="col"><h5
>Filter
:</h5
></th
>
26 <form action
="" method
="post">
27 <th scope
="col" colspan
="2">Name
<input name
="sf_name" type
="text" class="form-control short-form-control">
28 <th scope
="col"> <input
class="btn btn-primary" type
="submit" value
="Search"></th
></form
>
31 <table
class="table table-responsive caption-top table-striped">
32 <thead
class="table-primary">
33 <th scope
="col"><input type
="checkbox" label
='selectall' onClick
="toggle_server(this)" /></th
>
34 <th scope
="col">Name
</th
>
35 <th scope
="col">Host
/ IP
</th
>
36 <th scope
="col"><span data
-toggle
="tooltip" data
-placement
="bottom" title
="This shows [Secure] if the server is using SSL/TLS or is on localhost." style
="border-bottom: 1px dotted #000000">Secure
</span
></th
>
37 <th scope
="col">Connected to
</th
>
44 foreach($servers as $server)
48 /* Some basic filtering for NAME */
49 if (isset($_POST['sf_name']) && strlen($_POST['sf_name']) &&
50 strpos(strtolower($server->name
), strtolower($_POST['sf_name'])) !== 0 &&
51 strpos(strtolower($server->name
), strtolower($_POST['sf_name'])) == false)
56 echo "<th scope=\"row\"><input type=\"checkbox\" value='" . base64_encode($server->id
)."' name=\"serverch[]\"></th>";
57 $isBot = (strpos($server->server
->modes
, "B") !== false) ? ' <span class="badge-pill badge-dark">Bot</span>' : "";
58 echo "<td><a href=\"details.php?nick=".$server->id
."\">$server->name$isBot</a></td>";
59 echo "<td>".$server->hostname
." (".$server->ip
.")</td>";
60 $secure = (isset($server->tls
)) ? "<span class=\"badge-pill badge-success\">Secure</span>" : "<span class=\"badge-pill badge-danger\">Insecure</span>";
61 if (strpos($server->server
->modes
, "S") !== false)
63 echo "<td>".$secure."</td>";
64 echo "<td>".$server->server
->uplink
."</td>";
70 <?php
require_once UPATH
.'/footer.php'; ?>