Changeset 86 for branches


Ignore:
Timestamp:
11/26/04 17:05:27 (20 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Modified process for allocating a static IP

  • POP list now determines city to search for wrt pool location
  • City will now be displayed in list of pools
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/cgi-bin/main.cgi

    r83 r86  
    829829my $city;       # Shut up Perl's "strict" scoping/usage check.
    830830      $sql = "select * from poolips where available='y' and".
    831         " ptype='$base' and city='$webvar{city}'";
     831        " ptype='$base' and city='$webvar{pop}'";
    832832    }
    833833
     
    840840      $ipcount{$data[0]}++;
    841841    }
     842    $sth = $ip_dbh->prepare("select city from allocations where cidr=?");
    842843    foreach my $key (keys %ipcount) {
    843       $optionlist .= "<option value='$key'>$key [$ipcount{$key} free IP(s)]</option>\n";
     844      $sth->execute($key);
     845      my @data = $sth->fetchrow_array;
     846      $optionlist .= "<option value='$key'>$key [$ipcount{$key} free IP(s)] in $data[0]</option>\n";
    844847    }
    845848    $cidr = "Single static IP";
Note: See TracChangeset for help on using the changeset viewer.