Changeset 577 for trunk/cgi-bin
- Timestamp:
- 12/21/12 17:55:49 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/main.cgi
r576 r577 792 792 my $blockdata; 793 793 794 if ($webvar{ alloctype} eq 'rm') {794 if ($webvar{rdepth} == 0) { # $webvar{alloctype} eq 'mm' 795 795 796 796 $blockdata->{block} = $webvar{block}; 797 $blockdata->{city} = getRoutedCity($ip_dbh, $webvar{block});797 $blockdata->{city} = "N/A"; 798 798 $blockdata->{custid} = "N/A"; 799 $blockdata->{type} = $webvar{alloctype};799 $blockdata->{type} = 'mm'; 800 800 $blockdata->{circuitid} = "N/A"; 801 801 $blockdata->{description} = "N/A"; 802 802 $blockdata->{notes} = "N/A"; 803 803 $blockdata->{privdata} = "N/A"; 804 805 } elsif ($webvar{alloctype} eq 'mm') { 806 807 $blockdata->{block} = $webvar{block}; 808 $blockdata->{city} = "N/A"; 809 $blockdata->{custid} = "N/A"; 810 $blockdata->{type} = $webvar{alloctype}; 811 $blockdata->{circuitid} = "N/A"; 812 $blockdata->{description} = "N/A"; 813 $blockdata->{notes} = "N/A"; 814 $blockdata->{privdata} = "N/A"; 804 $blockdata->{rdepth} = 0; 815 805 816 806 } else { 817 807 818 $blockdata = getBlockData($ip_dbh, $webvar{block} )808 $blockdata = getBlockData($ip_dbh, $webvar{block}, $webvar{rdepth}); 819 809 820 810 } # end cases for different alloctypes 821 811 822 812 $page->param(block => $blockdata->{block}); 813 $page->param(rdepth => $blockdata->{rdepth}); 823 814 $page->param(disptype => $disp_alloctypes{$blockdata->{type}}); 824 $page->param(type => $blockdata->{type});815 # $page->param(type => $blockdata->{type}); 825 816 $page->param(city => $blockdata->{city}); 826 817 $page->param(custid => $blockdata->{custid}); … … 850 841 851 842 # need to retrieve block data before deleting so we can notify on that 852 my $blockinfo = getBlockData($ip_dbh, $webvar{block} );853 854 my ($code,$msg) = deleteBlock($ip_dbh, $webvar{block}, $webvar{ alloctype});843 my $blockinfo = getBlockData($ip_dbh, $webvar{block}, $webvar{rdepth}); 844 845 my ($code,$msg) = deleteBlock($ip_dbh, $webvar{block}, $webvar{rdepth}, $webvar{vrf}); 855 846 856 847 $page->param(block => $webvar{block}); 857 if ($code eq 'OK') { 848 $page->param(delparent => $blockinfo->{parent}) if $webvar{rdepth}; 849 $page->param(prdepth => $webvar{rdepth}); 850 if ($code =~ /^WARN/) { 851 my ($bp,$bd) = split /,/, $msg; 852 $page->param(bparent => $bp); 853 $page->param(brdepth => $bd); 854 $page->param(mergeip => $code eq 'WARNPOOL'); 855 } 856 857 if ($code eq 'OK' || $code =~ /^WARN/) { 858 858 syslog "notice", "$authuser deallocated '$webvar{alloctype}'-type netblock $webvar{block} ". 859 859 $blockinfo->{custid}.", ".$blockinfo->{city}.", desc='".$blockinfo->{description}."'";
Note:
See TracChangeset
for help on using the changeset viewer.