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="container-xxl table table-sm 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 btn-sm" type
="submit" value
="Search"></th
></form
>
31 <table
class="container-xxl table table-sm 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">Users
</th
>
36 <th scope
="col">Version
</th
>
37 <th scope
="col">Host
/ IP
</th
>
38 <th scope
="col">Connected to
</th
>
39 <th scope
="col">Up since
</th
>
46 foreach($servers as $server)
50 /* Some basic filtering for NAME */
51 if (isset($_POST['sf_name']) && strlen($_POST['sf_name']) &&
52 strpos(strtolower($server->name
), strtolower($_POST['sf_name'])) !== 0 &&
53 strpos(strtolower($server->name
), strtolower($_POST['sf_name'])) == false)
58 echo "<th scope=\"row\"><input type=\"checkbox\" value='" . base64_encode($server->id
)."' name=\"serverch[]\"></th>";
59 echo "<td><a href=\"details.php?server=".$server->id
."\">$server->name</a></td>";
60 echo "<td>".$server->server
->num_users
."</td>";
62 if (isset($server->server
->features
->software
)) // not (always) present on services
63 $s .= $server->server
->features
->software
;
65 if ($server->server
->ulined
== true)
66 $s .= " <span class=\"badge rounded-pill badge-warning\">Services</span>";
69 echo "<td>".$server->hostname
." (".$server->ip
.")</td>";
70 if (isset($server->server
->uplink
))
71 echo "<td>".$server->server
->uplink
."</td>";
73 echo "<td></td>"; /* self */
74 echo "<td>".$server->server
->boot_time
."</td>";
80 <?php
require_once UPATH
.'/footer.php'; ?>