Changeset 376
- Timestamp:
- 01/10/08 14:19:02 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/cgi-bin/main.cgi
r366 r376 401 401 $sth->execute(); 402 402 403 # hack hack hack 404 # set up to flag swip=y records if they don't actually have supporting data in the customers table 405 my $custsth = $ip_dbh->prepare("select count(*) from customers where custid=?"); 406 403 407 my $count=0; 404 408 while (my @data = $sth->fetchrow_array()) { … … 409 413 # $data[2] =~ s/\s+//g; 410 414 415 $custsth->execute($data[3]); 416 my ($ncust) = $custsth->fetchrow_array(); 417 411 418 # Prefix subblocks with "Sub " 412 419 my @row = ( (($data[2] =~ /^.r$/) ? 'Sub ' : ''). 413 420 qq(<a href="/ip/cgi-bin/main.cgi?action=edit&block=$data[0]">$data[0]</a>), 414 421 $data[1], $disp_alloctypes{$data[2]}, $data[3], 415 ($data[4] eq 'y' ? 'Yes': 'No'), $data[5]);422 ($data[4] eq 'y' ? ($ncust == 0 ? 'Yes<small>*</small>' : 'Yes') : 'No'), $data[5]); 416 423 # If the allocation is a pool, allow listing of the IPs in the pool. 417 424 if ($data[2] =~ /^.[pd]$/) {
Note:
See TracChangeset
for help on using the changeset viewer.