Changeset 417 for trunk/cgi-bin/IPDB.pm
- Timestamp:
- 06/30/10 17:48:03 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r416 r417 7 7 # Last update by $Author$ 8 8 ### 9 # Copyright (C) 2004-20 06- Kris Deugau9 # Copyright (C) 2004-2010 - Kris Deugau 10 10 11 11 package IPDB; … … 20 20 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); 21 21 22 $VERSION = 2 .6;22 $VERSION = 2; ##VERSION## 23 23 @ISA = qw(Exporter); 24 24 @EXPORT_OK = qw( … … 53 53 our %IPDBacl; 54 54 55 our $org name = 'Example Corp';55 our $org_name = 'Example Corp'; 56 56 our $smtphost = 'smtp.example.com'; 57 57 our $domain = 'example.com'; 58 our $defcustid = '5554242'; 59 # mostly for rwhois 60 ##fixme: leave these blank by default? 61 our $org_street = '123 4th Street'; 62 our $org_city = 'Anytown'; 63 our $org_prov_state = 'ON'; 64 our $org_pocode = 'H0H 0H0'; 65 our $org_country = 'CA'; 66 our $org_phone = '000-555-1234'; 67 our $org_techhandle = 'ISP-ARIN-HANDLE'; 68 69 our $syslog_facility = 'local2'; 58 70 59 71 # Let's initialize the globals. … … 561 573 # have to insert all pool IPs into poolips table as "unallocated". 562 574 $sth = $dbh->prepare("insert into poolips (pool,ip,custid,city,type)". 563 " values ('$pool', ?, ' 6750400', '$city', '$type')");575 " values ('$pool', ?, '$defcustid', '$city', '$type')"); 564 576 my @poolip_list = $pool->hostenum; 565 577 if ($class eq 'all') { # (DSL-ish block - *all* IPs available … … 618 630 eval { 619 631 $msg = "Unable to deallocate $disp_alloctypes{$type} $cidr"; 620 $sth = $dbh->prepare("update poolips set custid=' 6750400',available='y',".632 $sth = $dbh->prepare("update poolips set custid='$defcustid',available='y',". 621 633 "city=(select city from allocations where cidr >>= '$cidr'". 622 634 " order by masklen(cidr) desc limit 1),". … … 716 728 ##TEMP 717 729 # We've already deleted the block, now we have to stuff its IPs into the pool. 718 my $sth2 = $dbh->prepare("insert into poolips values ('209.91.185.0/24',?,' 6750400','Sudbury','di','y','','','')");730 my $sth2 = $dbh->prepare("insert into poolips values ('209.91.185.0/24',?,'$defcustid','Sudbury','di','y','','','')"); 719 731 $sth2->execute($cidr->addr); 720 732 foreach my $ip ($cidr->hostenum) { … … 849 861 "Subject: {IPDB} $subj\n", 850 862 "X-Mailer: IPDB Notify v".sprintf("%.1d",$IPDB::VERSION)."\n", 851 "Organization: $org name\n",863 "Organization: $org_name\n", 852 864 "\n$message\n"); 853 865 }
Note:
See TracChangeset
for help on using the changeset viewer.