<?php
$now = date("m/j/y h:i:s",time());
include "connect.php";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>edit router</TITLE>
</HEAD>
<?
$now = date("j/m/y h:i:s",time());
$stmt = "Select * FROM switches order by ip_address;";
$sth = ibase_query($dbh, $stmt);
?>
<body text="#000000" bgcolor="#FFFFCC" link="#0000EE" vlink="#551A8B" alink="#FF0000">
<form name="editswitches" method="post" action="postswitches.php">
<table BORDER=3>
<tr ALIGN=CENTER BGCOLOR="#999999">
<td><b><font face="Times New Roman,Times">IP_ADDRESS</font></b></td>
<td><b><font face="Times New Roman,Times">SWITCH</font></b></td>
<td><b><font face="Times New Roman,Times">DESCRIPTION</font></b></td>
<td><b><font face="Times New Roman,Times">SNMPSTRING</font></b></td>
</tr>
<tr><td>
<input type="text" name="IP_ADDRESS1">
</td><td>
<input type="text" name="SWITCH1">
</td><td>
<input type="text" name="DESCRIPTION1">
</td><td>
<input type="text" name="SNMPSTRING1">
</td>
</tr>
</table>
<input type="submit" name="Submit" value="Add Subnet">
<table BORDER=3>
<tr ALIGN=CENTER BGCOLOR="#999999">
<td><b><font face="Times New Roman,Times">IP_ADDRESS</font></b></td>
<td><b><font face="Times New Roman,Times">SWITCH</font></b></td>
<td><b><font face="Times New Roman,Times">DESCRIPTION</font></b></td>
<td><b><font face="Times New Roman,Times">SNMPSTRING</font></b></td>
<td><b><font face="Times New Roman,Times">DELETE</font></b></td>
</tr>
<?
while ($row = ibase_fetch_object($sth)) {
print '<tr><td><input type="hidden" name="serial[]" value="' . $row->SERIAL . '">';
?>
<?
print '<input type="text" name="IP_ADDRESS[]" value ="' . $row->IP_ADDRESS . '" size="15" maxlength="15"></td>';
?>
<?
print '<td><input type="text" name="SWITCH[]" value ="' . $row->SWITCH . '" size="15" maxlength="25"></td>';
?>
<?
print '<td><input type="text" name="DESCRIPTION[]" value="' . $row->DESCRIPTION . '" size="25" maxlength="100"></td>';
?>
<?
print '<td><input type="text" name="SNMPSTRING[]" value="' . $row->SNMPSTRING . '" size="20" maxlength="20"></td>';
print '<td><input type="checkbox" name="Delete[]" value="' . $row->SERIAL . '"></td>';
print '</tr>';
?>
<?
}
print '</table> <input type="submit" name="Submit" value="Submit">';
?>
</form>
</body>
</html>