]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - tools/ip-whois.php
More towards notes (still not finished)
[irc/unrealircd/unrealircd-webpanel.git] / tools / ip-whois.php
index 6c16d5fe0ecd3da332bb45e9c50b0ccf03137988..e2239837c312c02927493ca0efc7ca7313f80f23 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
-require_once "../common.php";
-require_once "../header.php";
+require_once "../inc/common.php";
+require_once "../inc/header.php";
 
 $ip_info = [];
 $ip = NULL;
@@ -57,8 +57,8 @@ else
 
 <br>
 <form method="get" action="ip-whois.php">
-<div class="input-group short-form-control justify-content-center align-items-center">
-       <input style="margin: 0%; height: 24px;" class="left-pan form-control" id="ip" name="ip" type="text" value=<?php echo $ip; ?>>
+<div class="input-group">
+       <input class="short-form-control" id="ip" name="ip" type="text" value=<?php echo $ip; ?>>
        <div class="input-group-append">
                <br><button type="submit" class="btn btn-primary">Go</button>
        </div>
@@ -83,7 +83,8 @@ if ($ip)
     
     <?php
 }
-
+if (isset($whois))
+{
 ?>
 
 <div class="modal fade" id="ip_whois_raw" tabindex="-1" role="dialog" aria-labelledby="confirmModalCenterTitle" aria-hidden="true">
@@ -96,7 +97,7 @@ if ($ip)
                        </button>
                </div>
                <div class="modal-body">
-            <code><?php echo str_replace("\n", "<br>",$whois); ?></code>
+            <code><?php echo str_replace("\n", "<br>",htmlspecialchars($whois)); ?></code>
                </div>
                <div class="modal-footer">
             <button id="CloseButton" type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
@@ -105,4 +106,6 @@ if ($ip)
        </div>
 </div>
 
-<?php require_once("../footer.php");
\ No newline at end of file
+<?php
+}
+require_once "../inc/footer.php";