-
- <tbody>
- <form method="post">
- <?php
-
- foreach($users as $user)
- {
-
-
- /* Some basic filtering for NICK */
- if (isset($_POST['uf_nick']) && strlen($_POST['uf_nick']) &&
- strpos(strtolower($user->name), strtolower($_POST['uf_nick'])) !== 0 &&
- strpos(strtolower($user->name), strtolower($_POST['uf_nick'])) == false)
- continue;
-
- /* Some basic filtering for HOST */
- if (isset($_POST['uf_host']) && strlen($_POST['uf_host']) &&
- strpos(strtolower($user->hostname), strtolower($_POST['uf_host'])) !== 0 &&
- strpos(strtolower($user->hostname), strtolower($_POST['uf_host'])) == false)
- continue;
-
- /* Some basic filtering for IP */
- if (isset($_POST['uf_ip']) && strlen($_POST['uf_ip']) &&
- strpos(strtolower($user->ip), strtolower($_POST['uf_ip'])) !== 0 &&
- strpos(strtolower($user->ip), strtolower($_POST['uf_ip'])) == false)
- continue;
-
- /* Some basic filtering for ACCOUNT */
- if (isset($_POST['uf_account']) && strlen($_POST['uf_account']) &&
- strpos(strtolower($user->user->account), strtolower($_POST['uf_account'])) !== 0 &&
- strpos(strtolower($user->user->account), strtolower($_POST['uf_account'])) == false)
- continue;
-
- /* Some basic filtering for ACCOUNT */
- if (isset($_POST['uf_server']) && strlen($_POST['uf_server']) &&
- strpos(strtolower($user->user->servername), strtolower($_POST['uf_server'])) !== 0 &&
- strpos(strtolower($user->user->servername), strtolower($_POST['uf_server'])) == false)
- continue;
-
- /* Some basic filtering for OPER */
- if (isset($_POST['operonly']) &&
- (strpos($user->user->modes, "o") == false || strpos($user->user->modes,"S") !== false))
- continue;
-
- /* Some basic filtering for SERVICES */
- if (isset($_POST['servicesonly']) &&
- (strpos($user->user->modes,"S") == false))
- continue;
-
- echo "\n<tr>";
- echo "<th scope=\"row\"><input type=\"checkbox\" value='" . base64_encode($user->id)."' name=\"userch[]\"></th>";
- $isBot = (strpos($user->user->modes, "B") !== false) ? ' <span class="badge rounded-pill badge-dark">Bot</span>' : "";
- echo "<td><a href=\"details.php?nick=".$user->id."\">$user->name$isBot</a></td>";
- echo "<td>".htmlspecialchars($user->hostname)." (".htmlspecialchars($user->ip).")</td>";
- $account = (isset($user->user->account)) ? "<a href=\"".BASE_URL."users/?account=".$user->user->account."\">".htmlspecialchars($user->user->account)."</a>" : '<span class="badge rounded-pill badge-primary">None</span>';
- echo "<td>".$account."</td>";
- $modes = (isset($user->user->modes)) ? "+" . $user->user->modes : "<none>";
- echo "<td>".$modes."</td>";
- $oper = (isset($user->user->operlogin)) ? $user->user->operlogin." <span class=\"badge rounded-pill badge-secondary\">".$user->user->operclass."</span>" : "";
- if (!strlen($oper))
- $oper = (strpos($user->user->modes, "S") !== false) ? '<span class="badge rounded-pill badge-warning">Services Bot</span>' : "";
- echo "<td>".$oper."</td>";