Last change
on this file since 6 was 6, checked in by Kris Deugau, 20 years ago |
Add intermediate development files for posterity
|
File size:
1.0 KB
|
Rev | Line | |
---|
[6] | 1 | <html><head><title>Manual munging for routed blocks</title></head><body>
|
---|
| 2 | <?php
|
---|
| 3 | /* edit-route.php
|
---|
| 4 | ** Quick hack to allow manual editing of data in postgres:ipdb:routed table
|
---|
| 5 | ** 07/13/2004 kdeugau@vianet
|
---|
| 6 | */
|
---|
| 7 | // include '../header.inc';
|
---|
| 8 |
|
---|
| 9 | print "<a href=manual.htm>Manual munging</a><br>\n";
|
---|
| 10 |
|
---|
| 11 | $dbh = pg_connect("dbname=ipdb user=ipdb");
|
---|
| 12 | $qu = pg_exec($dbh, "select * from routed order by cidr");
|
---|
| 13 |
|
---|
| 14 | ?>
|
---|
| 15 | <table>
|
---|
| 16 | <form action="add-route.php" method=POST>
|
---|
| 17 | <tr><td>CIDR route:</td><td><input name=cidr></td></tr>
|
---|
| 18 | <tr><td>Maskbits:</td><td><input name=maskbits></td></tr>
|
---|
| 19 | <tr><td>City:</td><td><input name=city></td></tr>
|
---|
| 20 | <tr><td colspan=2><input type=submit value="Add"></td></tr>
|
---|
| 21 | </form>
|
---|
| 22 | </table>
|
---|
| 23 |
|
---|
| 24 | <table border=1 cellspacing=2>
|
---|
| 25 | <tr><td>CIDR route</td><td>Mask bits</td><td>City</td></tr>
|
---|
| 26 | <?
|
---|
| 27 | $row = 0;
|
---|
| 28 | for ($row=0; $row < pg_NumRows($qu); $row++) {
|
---|
| 29 | $data = pg_fetch_array($qu, $row);
|
---|
| 30 | print "<tr><td>$data[0]</td><td>$data[1]</td><td>$data[2]</td></tr>\n";
|
---|
| 31 | }
|
---|
| 32 | ?>
|
---|
| 33 | </table>
|
---|
| 34 | <?
|
---|
| 35 | // include '../footer.inc';
|
---|
| 36 | ?>
|
---|
| 37 | </body></html>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.