my ($instyle) = @_;
my ($t, $v, $k, $x);
print DEBUG "ldb 0 $instyle\n";
- $instyle =~ m/all|area|overlap/ or die "$instyle ?";
+ $instyle =~ m/^all|area|viewoverlap|overlap/ or die "$instyle ?";
$listing= $&;
&{"dblist_prep_$listing"}();
@kl= ();
return net_overlap($dblt_network,$dblt_prefix, $dblo_network,$dblo_prefix);
}
+sub dblist_prep_viewoverlap {
+ ($dblo_network,$dblo_prefix) = ($network,$prefix);
+ $listoverlap= display_net($network,$prefix);
+}
+sub dblist_cond_viewoverlap { dblist_cond_overlap(); }
+
sub foreach_start_db { $db_i=0; }
sub foreach_cond_db { return $db_i < @kl; }
sub foreach_incr_db { $db_i++; }
$db_id= $k;
}
$db_net= display_net($dblt_network,$dblt_prefix);
- $db_pickoverlap= (exists $db{'picked'} &&
- net_overlap($dblt_network, $dblt_prefix,
- $pick_network, $pick_prefix)) ? 1 : 0;
+ if (exists $db{'picked'}) {
+ $db_pickedoverlap= net_overlap($dblt_network, $dblt_prefix,
+ $pick_network, $pick_prefix);
+ } else {
+ $db_pickedoverlap= 0;
+ }
+ if (defined $id) {
+ $db_viewing= ($k eq $id);
+ } else {
+ $db_viewing= 0;
+ }
$db_name= html_sani($ent->{'name'});
$db_contact= html_sani($ent->{'contact'});
$db_hiddenemail= $ent->{'hiddenemail'};
@@@endif:@@@
-@@@if:listingall|listingarea|listingoverlap@@@
+@@@if:listingall|listingarea|listingoverlap|listingviewoverlap@@@
<h2>Database</h2>
@@@if:listingoverlap@@@
Entries which overlap with @@@listoverlap@@@
@@@endif:@@@
+@@@if:listingviewoverlap@@@
+Entries which overlap with this one
+@@@endif:@@@
@@@if:listingarea@@@
Database for entries allocated from @@@listarea@@@
@@@endif:@@@
@@@if:picked@@@
The range picked for you has been <strong>emphasized</strong> below.
-Any existing registrations that overlap with it are also emphasized,
-and marked with an asterisk <strong>*</strong>.
+Any existing registrations that overlap with it are also
+emphasized, and marked with an asterisk <strong>*</strong>.
+@@@endif:@@@
+
+@@@if:listingviewoverlap@@@
+This registration is
+emphasized, and marked with an asterisk <strong>*</strong>.
@@@endif:@@@
<p>
@@@ifnot:listingnonefound@@@
-You can get details about an existing entry by clicking on its address
-range; this can also be used to modify it.
+@@@if:listingviewoverlap@@@
+You can get details about another, overlapping entry by selecting it
+from this list; this can also be used to modify the other entry.
+@@@endif:@@@
+@@@ifnot:listingviewoverlap@@@
+You can get details about an existing entry by selecting it
+from this list; this can also be used to modify it.
+@@@endif:@@@
<table>
<tr><td>Range <td>Name <td>Contact <td>Email
<tr>
<td>
-@@@if:db_pickoverlap@@@
+@@@if:db_pickedoverlap|db_viewing@@@
<strong>
@@@endif:@@@
+@@@if:db_viewing@@@
+@@@db_net@@@
+@@@endif:@@@
+@@@ifnot:db_viewing@@@
<A href="@@@cgi@@@?id=@@@db_id@@@">@@@db_net@@@</A>
-@@@if:db_pickoverlap@@@
+@@@endif:@@@
+@@@if:db_pickedoverlap|db_viewing@@@
*</strong>
@@@endif:@@@
<td>
-@@@if:db_pickoverlap@@@
+@@@if:db_pickedoverlap|db_viewing@@@
<strong>@@@db_name@@@</strong>
@@@endif:@@@
-@@@ifnot:db_pickoverlap@@@
+@@@ifnot:db_pickedoverlap|db_viewing@@@
@@@db_name@@@
@@@endif:@@@