]>
jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blob - ip-whois.php
3 require_once "common.php";
4 require_once "header.php";
9 if (isset($_GET['ip']))
10 $_POST['ip'] = $_GET['ip'];
12 if (isset($_POST['ip']))
15 $title = "IP WHOIS Lookup";
16 $title .= (isset($noip)) ? "" : " for $ip";
18 echo "<h4
>$title</h4
>";
26 $whois = get_ip_whois($ip);
27 $file = split($whois, "\n
");
32 foreach ($file as $line) {
33 if (!strlen($line) && $start)
36 if (!ctype_alnum($line[0])) // we don't care about your opinion we just want the info
45 $resplit = split(glue($tok));
47 $key = trim($resplit[0], ":");
49 $value = glue($resplit);
51 if (!isset($ip_info[$i][$key]))
52 $ip_info[$i][$key] = $value;
54 $ip_info[$i][$key] .= "\n
$value";
60 <form method
="get" action
="ip-whois.php">
61 <div
class="input-group short-form-control justify-content-center align-items-center">
62 <input style
="margin: 0%; height: 24px;" class="left-pan form-control" id
="ip" name
="ip" type
="text" value
=<?php
echo $ip; ?>>
63 <div
class="input-group-append">
64 <br
><button type
="submit" class="btn btn-primary">Go
</button
>
74 <div
class="container-xxl mt-3">
76 <div
class="col-sm-3">
77 <?php
generate_ip_whois_table($ip_info); ?>
80 <div
class="btn btn-sm btn-info" data
-toggle
="modal" data
-target
="#ip_whois_raw">View RAW
</div
>
90 <div
class="modal fade" id
="ip_whois_raw" tabindex
="-1" role
="dialog" aria
-labelledby
="confirmModalCenterTitle" aria
-hidden
="true">
91 <div
class="modal-dialog modal-xl modal-dialog-centered" role
="document">
92 <div
class="modal-content">
93 <div
class="modal-header">
94 <h5
class="modal-title" id
="myModalLabel">RAW IP WHOIS Information
</h5
>
95 <button type
="button" class="close" data
-dismiss
="modal" aria
-label
="Close">
96 <span aria
-hidden
="true">×
;</span
>
99 <div
class="modal-body">
100 <code
><?php
echo str_replace("\n", "<br>",$whois); ?></code
>
102 <div
class="modal-footer">
103 <button id
="CloseButton" type
="button" class="btn btn-secondary" data
-dismiss
="modal">Close
</button
>
109 <?php
require_once("footer.php");