Use new variable instead of $_GET['ip']
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
This commit is contained in:
parent
53f88f5d0c
commit
f1029be65b
13
index.php
13
index.php
|
@ -125,14 +125,15 @@
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
|
|
||||||
if($_GET['ip'] != '') {
|
if($_GET['ip'] != '') {
|
||||||
if ( preg_match("#/#", $_GET['ip']) == 0) {
|
$ipaddr = $_GET['ip'];
|
||||||
if ( preg_match("#:#", $_GET['ip']) == 0) {
|
if ( preg_match("#/#", $ipaddr) == 0) {
|
||||||
$_GET['ip'] = $_GET['ip'] . "/32";
|
if ( preg_match("#:#", $ipaddr) == 0) {
|
||||||
|
$ipaddr = $ipaddr . "/32";
|
||||||
} else {
|
} else {
|
||||||
$_GET['ip'] = $_GET['ip'] . "/128";
|
$ipaddr = $ipaddr . "/128";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo '<H2>Wege zu '.$_GET["ip"].'</H2>';
|
echo '<H2>Wege zu '.$ipaddr.'</H2>';
|
||||||
echo '<table>
|
echo '<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th>target</th>
|
<th>target</th>
|
||||||
|
@ -143,7 +144,7 @@
|
||||||
<th>Destination ID</th>
|
<th>Destination ID</th>
|
||||||
</tr>';
|
</tr>';
|
||||||
foreach($output['routes'] as $route) {
|
foreach($output['routes'] as $route) {
|
||||||
if ($route['target'] == $_GET['ip']) {
|
if ($route['target'] == $ipaddr) {
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
foreach($route as $temp) { echo "<td>$temp</td>"; }
|
foreach($route as $temp) { echo "<td>$temp</td>"; }
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
|
|
Loading…
Reference in New Issue