Changeset 328 for trunk/cgi-bin
- Timestamp:
- 04/07/06 13:34:55 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/extras/db2rwhois.pl
r327 r328 29 29 my @masterblocks; 30 30 my %netnameprefix; 31 my %def_custids; 31 32 32 33 # Fill in data about our master blocks as allocated from ARIN … … 85 86 while (my @data = $sth->fetchrow_array) { 86 87 $netnameprefix{$data[0]} = $data[2]; 88 $def_custids{$data[0]} = $data[1]; 87 89 } 88 90 … … 166 168 my $netname = $netnameprefix{$type}; 167 169 168 if ($swip eq 'n') { 169 print MASTERFILE "---\nID: NETBLK-ISP.$master\n". 170 "Auth-Area: $master\n". 171 "Network-Name: $netname-".$net->network."\n". 172 "IP-Network: $net\n". 173 "IP-Network-Block: ".$net->range."\n". 174 "Org-Name: Friendly ISP\n". 175 "Street-Address: 123 4th Street\n". 176 "City: Anytown\n". 177 "StateProv: Ontario\n". 178 "Postal-Code: H0H 0H0\n". 179 "Country-Code: CA\n". 180 "Tech-Contact: ISP-ARIN-HANDLE\n". 181 "Created: $ctime\n". 182 "Updated: $mtime\n". 183 "Updated-By: noc\@example.com\n"; 184 } else { 170 if ($swip eq 'y' && $def_custids{$type} eq '') { 171 # def_custids{$type} should only be blank on types that are 172 # allocated direct to customers. i are sMart!!11!!oneone! 185 173 $custsth->execute($custid); 186 174 my ($name, $street, $city, $prov, $country, $pocode, $phone, $tech, $special) = $custsth->fetchrow_array; … … 206 194 "Updated: $mtime\n". 207 195 "Updated-By: noc\@example.com\n"; 208 } # swip 209 196 } else { 197 print MASTERFILE "---\nID: NETBLK-ISP.$master\n". 198 "Auth-Area: $master\n". 199 "Network-Name: $netname-".$net->network."\n". 200 "IP-Network: $net\n". 201 "IP-Network-Block: ".$net->range."\n". 202 "Org-Name: Friendly ISP\n". 203 "Street-Address: 123 4th Street\n". 204 "City: Anytown\n". 205 "StateProv: Ontario\n". 206 "Postal-Code: H0H 0H0\n". 207 "Country-Code: CA\n". 208 "Tech-Contact: ISP-ARIN-HANDLE\n". 209 "Created: $ctime\n". 210 "Updated: $mtime\n". 211 "Updated-By: noc\@example.com\n"; 212 } # decide which contact data to use (cust data only on swip==y && def custid=='') 210 213 } # net in master 211 214 } # foreach master
Note:
See TracChangeset
for help on using the changeset viewer.