<html><head><title>Manual munging for routed blocks</title></head><body>
<?php
/* edit-route.php
** Quick hack to allow manual editing of data in postgres:ipdb:routed table
** 07/13/2004 kdeugau@vianet
*/
//  include '../header.inc';

  print "<a href=manual.htm>Manual munging</a><br>\n";

  $dbh = pg_connect("dbname=ipdb user=ipdb");
  $qu = pg_exec($dbh, "select * from routed order by cidr");

?>
<table>
<form action="add-route.php" method=POST>
<tr><td>CIDR route:</td><td><input name=cidr></td></tr>
<tr><td>Maskbits:</td><td><input name=maskbits></td></tr>
<tr><td>City:</td><td><input name=city></td></tr>
<tr><td colspan=2><input type=submit value="Add"></td></tr>
</form>
</table>

<table border=1 cellspacing=2>
<tr><td>CIDR route</td><td>Mask bits</td><td>City</td></tr>
<?
  $row = 0;
  for ($row=0; $row < pg_NumRows($qu); $row++) {
    $data = pg_fetch_array($qu, $row);
    print "<tr><td>$data[0]</td><td>$data[1]</td><td>$data[2]</td></tr>\n";
  }
?>
</table>
<?
//  include '../footer.inc';
?>
</body></html>
