Index: branches/stable/cgi-bin/main.cgi
===================================================================
--- branches/stable/cgi-bin/main.cgi	(revision 315)
+++ branches/stable/cgi-bin/main.cgi	(revision 318)
@@ -987,7 +987,7 @@
   # because I'm lazy, we'll try to make the SELECT's bring out identical)ish) data
   if ($webvar{block} =~ /\/32$/) {
-    $sql = "select ip,custid,type,city,circuitid,description,notes,modifystamp,privdata from poolips where ip='$webvar{block}'";
+    $sql = "select ip,custid,type,city,circuitid,description,notes,modifystamp,privdata,oldcustid from poolips where ip='$webvar{block}'";
   } else {
-    $sql = "select cidr,custid,type,city,circuitid,description,notes,modifystamp,privdata,swip from allocations where cidr='$webvar{block}'"
+    $sql = "select cidr,custid,type,city,circuitid,description,notes,modifystamp,privdata,oldcustid,swip from allocations where cidr='$webvar{block}'"
   }
 
@@ -1036,4 +1036,5 @@
       $html =~ s/\$\$TYPESELECT\$\$/$disp_alloctypes{$data[2]}<input type=hidden name=alloctype value="$data[2]">/g;
     }
+    $html =~ s/\$\$OLDCUSTID\$\$/$data[9]/g;
     $html =~ s/\$\$CITY\$\$/<input type=text name=city value="$data[3]">/g;
     $html =~ s/\$\$CIRCID\$\$/<input type="text" name="circid" value="$data[4]" maxlength=64 size=64 class="regular">/g;
@@ -1042,4 +1043,5 @@
   } else {
     $html =~ s/\$\$CUSTID\$\$/$data[1]/g;
+    $html =~ s/\$\$OLDCUSTID\$\$/$data[9]/g;
     $html =~ s/\$\$TYPESELECT\$\$/$disp_alloctypes{$data[2]}/g;
     $html =~ s/\$\$CITY\$\$/$data[3]/g;
@@ -1055,5 +1057,5 @@
   $html =~ s/\$\$SWIP\$\$/N\/A/;
 } else {
-  my $tmp = (($data[8] eq 'n') ? '<input type=checkbox name=swip>' : 
+  my $tmp = (($data[10] eq 'n') ? '<input type=checkbox name=swip>' : 
 	'<input type=checkbox name=swip checked=yes>');
   $html =~ s/\$\$SWIP\$\$/$tmp/;
