Changeset 638 for trunk/cgi-bin/main.cgi
- Timestamp:
- 10/09/14 18:13:22 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/main.cgi
r634 r638 821 821 822 822 my $blockdata; 823 824 if ($webvar{rdepth} == 0) { # $webvar{alloctype} eq 'mm' 825 826 $blockdata->{block} = $webvar{block}; 823 $blockdata = getBlockData($ip_dbh, $webvar{block}, $webvar{basetype}); 824 825 if ($blockdata->{parent_id} == 0) { # $webvar{alloctype} eq 'mm' 827 826 $blockdata->{city} = "N/A"; 828 827 $blockdata->{custid} = "N/A"; 829 $blockdata->{type} = 'mm';830 828 $blockdata->{circuitid} = "N/A"; 831 829 $blockdata->{description} = "N/A"; 832 830 $blockdata->{notes} = "N/A"; 833 831 $blockdata->{privdata} = "N/A"; 834 $blockdata->{rdepth} = 0;835 836 } else {837 838 $blockdata = getBlockData($ip_dbh, $webvar{block}, $webvar{rdepth});839 840 832 } # end cases for different alloctypes 841 833 834 $page->param(blockid => $webvar{block}); 835 $page->param(basetype => $webvar{basetype}); 836 842 837 $page->param(block => $blockdata->{block}); 843 844 838 $page->param(rdns => $blockdata->{rdns}); 845 839 … … 853 847 } 854 848 855 $page->param(rdepth => $blockdata->{rdepth});856 849 $page->param(disptype => $disp_alloctypes{$blockdata->{type}}); 857 # $page->param(type => $blockdata->{type});858 850 $page->param(city => $blockdata->{city}); 859 851 $page->param(custid => $blockdata->{custid}); … … 883 875 884 876 # need to retrieve block data before deleting so we can notify on that 885 my $blockinfo = getBlockData($ip_dbh, $webvar{block}, $webvar{rdepth}); 886 887 my ($code,$msg) = deleteBlock($ip_dbh, $webvar{block}, $webvar{rdepth}, $webvar{vrf}, $webvar{delforward}, $authuser); 888 889 $page->param(block => $webvar{block}); 890 $page->param(delparent => $blockinfo->{parent}) if $webvar{rdepth}; 891 $page->param(prdepth => $webvar{rdepth}); 877 my $blockinfo = getBlockData($ip_dbh, $webvar{block}, $webvar{basetype}); 878 my $pinfo = getBlockData($ip_dbh, $blockinfo->{parent_id}, 'b'); 879 880 my ($code,$msg) = deleteBlock($ip_dbh, $webvar{block}, $webvar{basetype}, $webvar{delforward}, $authuser); 881 882 $page->param(block => $blockinfo->{block}); 883 $page->param(delparent_id => $blockinfo->{parent_id});# if $webvar{rdepth}; 884 $page->param(delparent => $pinfo->{block}); 885 $page->param(returnpool => ($webvar{basetype} eq 'i') ); 892 886 if ($code =~ /^WARN(POOL|MERGE)/) { 893 my ($ bp,$bd) = split /,/, $msg;894 $page->param( bparent => $bp);895 $page->param( brdepth => $bd);887 my ($pid,$pcidr) = split /,/, $msg; 888 $page->param(parent_id => $pid); 889 $page->param(parent => $pcidr); 896 890 $page->param(mergeip => $code eq 'WARNPOOL'); 897 891 } … … 901 895 } 902 896 if ($code eq 'OK' || $code =~ /^WARN/) { 903 syslog "notice", "$authuser deallocated ' $webvar{alloctype}'-type netblock $webvar{block} ".897 syslog "notice", "$authuser deallocated '".$blockinfo->{type}."'-type netblock $webvar{block} ". 904 898 $blockinfo->{custid}.", ".$blockinfo->{city}.", desc='".$blockinfo->{description}."'"; 905 mailNotify($ip_dbh, 'da', "REMOVED: $disp_alloctypes{$webvar{alloctype}}$webvar{block}",906 "$disp_alloctypes{$webvar{alloctype}}$webvar{block} deallocated by $authuser\n".899 mailNotify($ip_dbh, 'da', "REMOVED: ".$disp_alloctypes{$blockinfo->{type}}." $webvar{block}", 900 $disp_alloctypes{$blockinfo->{type}}." $webvar{block} deallocated by $authuser\n". 907 901 "CustID: ".$blockinfo->{custid}."\nCity: ".$blockinfo->{city}. 908 902 "\nDescription: ".$blockinfo->{description}."\n");
Note:
See TracChangeset
for help on using the changeset viewer.