Index: branches/stable/assign.html
===================================================================
--- branches/stable/assign.html	(revision 90)
+++ branches/stable/assign.html	(revision 91)
@@ -6,44 +6,5 @@
 <td>Customer location:&nbsp</td><td>
 <select name="city"><option selected>-</option>
-<option>Barrie</option>
-<option>Blind River</option>
-<option>Brockville</option>
-<option>Bracebridge</option>
-<option>Burk's Falls</option>
-<option>Burlington</option>
-<option>Chapleau</option>
-<option>Chelmsford</option>
-<option>Espanola</option>
-<option>Elliot Lake</option>
-<option>Hamilton</option>
-<option>Huntsville</option>
-<option>Ingresoll</option>
-<option>Gravenhurst</option>
-<option>Guelph</option>
-<option>Kapuskasing</option>
-<option>Kingston</option>
-<option>Kirkland Lake</option>
-<option>Little Current</option>
-<option>London</option>
-<option>Marathon</option>
-<option>Manitoulin</option>
-<option>Newmarket</option>
-<option>North Bay</option>
-<option>Oakville</option>
-<option>Oshawa</option>
-<option>Ottawa</option>
-<option>Parry Sound</option>
-<option>Peel</option>
-<option>Peterborough</option>
-<option>Pembroke</option>
-<option>Sault Ste. Marie</option>
-<option>Sturgeon Falls</option>
-<option>Sudbury</option>
-<option>Timmins</option>
-<option>Thessalon</option>
-<option>Thunder Bay</option>
-<option>Toronto</option>
-<option>Wawa</option>
-<option>Windsor</option>
+$$ALLCITIES$$
 </select>
 </td>
@@ -77,23 +38,5 @@
 <td>Route from/through:&nbsp</td><td>
 <select name="pop"><option selected>-</option>
-<option>Blind River</option>
-<option>Bracebridge</option>
-<option>Chelmsford</option>
-<option>Elliot Lake</option>
-<option>Espanola</option>
-<option>Gravenhurst</option>
-<option>Huntsville</option>
-<option>Little Current</option>
-<option>Lively</option>
-<option>North Bay</option>
-<option>Ottawa</option>
-<option>Pembroke</option>
-<option>Sault Ste. Marie</option>
-<option>Sturgeon</option>
-<option>Sudbury</option>
-<option>Timmins</option>
-<option>Thunder Bay</option>
-<option>Toronto</option>
-<option>Valley</option>
+$$POPLIST$$
 </select>
 </td>
Index: branches/stable/cgi-bin/ipdb.psql
===================================================================
--- branches/stable/cgi-bin/ipdb.psql	(revision 90)
+++ branches/stable/cgi-bin/ipdb.psql	(revision 91)
@@ -5,5 +5,5 @@
 
 --
--- TOC Entry ID 18 (OID 16556)
+-- TOC Entry ID 22 (OID 16556)
 --
 -- Name: "plpgsql_call_handler" () Type: FUNCTION Owner: postgres
@@ -13,5 +13,5 @@
 
 --
--- TOC Entry ID 19 (OID 16557)
+-- TOC Entry ID 23 (OID 16557)
 --
 -- Name: plpgsql Type: PROCEDURAL LANGUAGE Owner: 
@@ -217,2 +217,48 @@
 GRANT ALL on "allocations" to "ipdb";
 
+--
+-- TOC Entry ID 18 (OID 92809)
+--
+-- Name: alloctypes Type: TABLE Owner: ipdb
+--
+
+CREATE TABLE "alloctypes" (
+	"type" character(2) DEFAULT '' NOT NULL,
+	"listname" character varying(40) DEFAULT '',
+	"dispname" character varying(40) DEFAULT '',
+	"listorder" integer DEFAULT 0,
+	Constraint "alloctypes_pkey" Primary Key ("type")
+);
+
+--
+-- TOC Entry ID 19 (OID 92809)
+--
+-- Name: alloctypes Type: ACL Owner: 
+--
+
+REVOKE ALL on "alloctypes" from PUBLIC;
+GRANT ALL on "alloctypes" to "kdeugau";
+GRANT ALL on "alloctypes" to "ipdb";
+
+--
+-- TOC Entry ID 20 (OID 93964)
+--
+-- Name: cities Type: TABLE Owner: ipdb
+--
+
+CREATE TABLE "cities" (
+	"city" character varying(30) DEFAULT '' NOT NULL,
+	"routing" character(1) DEFAULT 'n' NOT NULL,
+	Constraint "cities_pkey" Primary Key ("city")
+);
+
+--
+-- TOC Entry ID 21 (OID 93964)
+--
+-- Name: cities Type: ACL Owner: 
+--
+
+REVOKE ALL on "cities" from PUBLIC;
+GRANT ALL on "cities" to "kdeugau";
+GRANT ALL on "cities" to "ipdb";
+
Index: branches/stable/cgi-bin/main.cgi
===================================================================
--- branches/stable/cgi-bin/main.cgi	(revision 90)
+++ branches/stable/cgi-bin/main.cgi	(revision 91)
@@ -69,4 +69,6 @@
 # Other global variables
 my @masterblocks;
+my @citylist;
+my @poplist;
 my %allocated;	# Count for allocated blocks in a master block
 my %free;	# Count for free blocks (routed and unrouted) in a master block
@@ -78,8 +80,9 @@
 # Use the connectDB function, otherwise we end up confusing ourselves
 my $ip_dbh = connectDB;
+my $sth;
 
 # Slurp up the master block list - we need this several places
 # While we're at it, initialize the related hashes.
-my $sth = $ip_dbh->prepare("select * from masterblocks order by cidr");
+$sth = $ip_dbh->prepare("select * from masterblocks order by cidr");
 $sth->execute;
 for (my $i=0; my @data = $sth->fetchrow_array(); $i++) {
@@ -92,4 +95,15 @@
 }
 
+# Initialize the city and poplist arrays
+$sth = $ip_dbh->prepare("select * from cities order by city");
+$sth->execute;
+my $i = 0;
+my $j = 0;
+while (my @data = $sth->fetchrow_array) {
+  $citylist[$i++] = $data[0];
+  if ($data[1] eq 'y') {
+    $poplist[$j++] = $data[0];
+  }
+}
 
 
@@ -779,4 +793,5 @@
 	or croak "Could not open assign.html: $!";
     $html = join('',<HTML>);
+    close HTML;
     my $masterlist = "<select name=allocfrom><option selected>-</option>\n";
     foreach my $master (@masterblocks) {
@@ -785,6 +800,15 @@
     $masterlist .= "</select>\n";
     $html =~ s|\$\$MASTERLIST\$\$|$masterlist|g;
-    close HTML;
-  }
+    my $pops = '';
+    foreach my $pop (@poplist) {
+      $pops .= "<option>$pop</option>\n";
+    }
+    $html =~ s|\$\$POPLIST\$\$|$pops|g;
+  }
+  my $cities = '';
+  foreach my $city (@citylist) {
+    $cities .= "<option>$city</option>\n";
+  }
+  $html =~ s|\$\$ALLCITIES\$\$|$cities|g;
 
   print $html;
Index: branches/stable/changes.html
===================================================================
--- branches/stable/changes.html	(revision 90)
+++ branches/stable/changes.html	(revision 91)
@@ -13,4 +13,9 @@
 
 <tr class="color1">
+<td valign=top>11/30/2004</td>
+<td>Overhauled the city listings;  they should be somewhat more complete now.  Still needs a
+mechanism to easily add new cities.
+</td></tr>
+<tr class="color2">
 <td valign=top>11/26/2004</td>
 <td>Allocating a static IP is now a little different.  Use the "Customer Location" field to
Index: branches/stable/fb-assign.html
===================================================================
--- branches/stable/fb-assign.html	(revision 90)
+++ branches/stable/fb-assign.html	(revision 91)
@@ -7,44 +7,5 @@
 <td>City:&nbsp</td><td>
 <select name="city"><option selected>-</option>
-<option>Barrie</option>
-<option>Blind River</option>
-<option>Brockville</option>
-<option>Bracebridge</option>
-<option>Burk's Falls</option>
-<option>Burlington</option>
-<option>Chapleau</option>
-<option>Chelmsford</option>
-<option>Espanola</option>
-<option>Elliot Lake</option>
-<option>Hamilton</option>
-<option>Huntsville</option>
-<option>Ingresoll</option>
-<option>Gravenhurst</option>
-<option>Guelph</option>
-<option>Kapuskasing</option>
-<option>Kingston</option>
-<option>Kirkland Lake</option>
-<option>Little Current</option>
-<option>London</option>
-<option>Marathon</option>
-<option>Manitoulin</option>
-<option>Newmarket</option>
-<option>North Bay</option>
-<option>Oakville</option>
-<option>Oshawa</option>
-<option>Ottawa</option>
-<option>Parry Sound</option>
-<option>Peel</option>
-<option>Peterborough</option>
-<option>Pembroke</option>
-<option>Sault Ste. Marie</option>
-<option>Sturgeon Falls</option>
-<option>Sudbury</option>
-<option>Timmins</option>
-<option>Thessalon</option>
-<option>Thunder Bay</option>
-<option>Toronto</option>
-<option>Wawa</option>
-<option>Windsor</option>
+$$ALLCITIES$$
 </select>
 </td>
