Some small changes/fixes
This commit is contained in:
parent
2efd4ad0ab
commit
7322231d3e
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
mysql_query("INSERT INTO subnetlocation (location_id, subnet_id) VALUE ('$location_id', '$subnet_id')") or die(mysql_error());
|
mysql_query("INSERT INTO subnetlocation (location_id, subnet_id) VALUE ('$location_id', '$subnet_id')") or die(mysql_error());
|
||||||
|
|
||||||
header("Location: subnet.php");
|
header("Location: subnetview.php?subnet_id=" . $subnet_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$subnet_id = $_GET['subnet_id'];
|
$subnet_id = $_GET['subnet_id'];
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
mysql_query("UPDATE subnet SET vlan_id='$vlan_id' WHERE subnet_id='$subnet_id'") or die(mysql_error());
|
mysql_query("UPDATE subnet SET vlan_id='$vlan_id' WHERE subnet_id='$subnet_id'") or die(mysql_error());
|
||||||
|
|
||||||
header("location: vlan.php");
|
header("location: vlanview.php?vlan_id=" . $vlan_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$vlan_id = $_GET['vlan_id'];
|
$vlan_id = $_GET['vlan_id'];
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
<select name="subnet_id">
|
<select name="subnet_id">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$result = mysql_query("SELECT subnet_id, subnet_address FROM subnet ORDER BY subnet_address");
|
$result = mysql_query("SELECT subnet_id, subnet_address FROM subnet ORDER BY INET_ATON(subnet_address)");
|
||||||
while ($row = mysql_fetch_object($result)) {
|
while ($row = mysql_fetch_object($result)) {
|
||||||
echo '<option value="' . $row->subnet_id . '">' . $row->subnet_address . '</option>';
|
echo '<option value="' . $row->subnet_id . '">' . $row->subnet_address . '</option>';
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,8 +53,14 @@
|
||||||
while ($row = mysql_fetch_object($result)) {
|
while ($row = mysql_fetch_object($result)) {
|
||||||
echo $displayname = $row->displayname . ' - ';
|
echo $displayname = $row->displayname . ' - ';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TEMP display only if admin
|
||||||
|
if($_SESSION['suser_level'] >= 2) {
|
||||||
|
echo '<a href="nodeadd.php">Add new node</a> - ';
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<a href="options.php">Options</a> -
|
<a href="options.php">Options</a> -
|
||||||
<a href="logout.php">Log out</a>
|
<a href="logout.php">Log out</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<table border="0">
|
<table border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<b>IP Reg <?php echo $config_version; ?></b>
|
<b>IP Reg <?php echo $config_version; ?></b><br>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
function display_subnet ($location_id) {
|
function display_subnet ($location_id) {
|
||||||
$subnet = '';
|
$subnet = '';
|
||||||
|
|
||||||
$result = mysql_query("SELECT s.subnet_id, s.subnet_address, s.subnet_mask FROM subnet s INNER JOIN subnetlocation sl ON s.subnet_id=sl.subnet_id WHERE sl.location_id='$location_id' ORDER BY subnet_address");
|
$result = mysql_query("SELECT s.subnet_id, s.subnet_address, s.subnet_mask FROM subnet s INNER JOIN subnetlocation sl ON s.subnet_id=sl.subnet_id WHERE sl.location_id='$location_id' ORDER BY INET_ATON(subnet_address)");
|
||||||
while ($row = mysql_fetch_object($result)) {
|
while ($row = mysql_fetch_object($result)) {
|
||||||
$subnet .= '<a href="subnetview.php?subnet_id='. $row->subnet_id . '">' . $row->subnet_address . '/' . $row->subnet_mask . '</a><br>';
|
$subnet .= '<a href="subnetview.php?subnet_id='. $row->subnet_id . '">' . $row->subnet_address . '/' . $row->subnet_mask . '</a><br>';
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// look for subnet
|
// look for subnet
|
||||||
$result = mysql_query("SELECT subnet_id, subnet_address FROM subnet WHERE subnet_address LIKE '$needle' OR subnet_info LIKE '%$needle%' ORDER BY subnet_address");
|
$result = mysql_query("SELECT subnet_id, subnet_address FROM subnet WHERE subnet_address LIKE '$needle' OR subnet_info LIKE '%$needle%' ORDER BY INET_ATON(subnet_address)");
|
||||||
if (mysql_num_rows($result)>0) {
|
if (mysql_num_rows($result)>0) {
|
||||||
echo '<tr><td><b>Subnet(s):</b></td></tr>';
|
echo '<tr><td><b>Subnet(s):</b></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
VLAN
|
VLAN
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<select name="vlan_number">
|
<select name="vlan_id">
|
||||||
<option value="0">(none)</option>
|
<option value="0">(none)</option>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
// get subnet info
|
// get subnet info
|
||||||
$result = mysql_query("SELECT subnet_id, subnet_address FROM subnet WHERE vlan_id='$vlan_id' ORDER BY subnet_address");
|
$result = mysql_query("SELECT subnet_id, subnet_address FROM subnet WHERE vlan_id='$vlan_id' ORDER BY INET_ATON(subnet_address)");
|
||||||
while ($row = mysql_fetch_object($result)) {
|
while ($row = mysql_fetch_object($result)) {
|
||||||
echo '<a href="subnetview.php?subnet_id=' . $row->subnet_id . '">' . $row->subnet_address . '</a><br>';
|
echo '<a href="subnetview.php?subnet_id=' . $row->subnet_id . '">' . $row->subnet_address . '</a><br>';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue