diff options
author | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
commit | c82d349f864e6bd9f96fd1156903bc1f7193a203 (patch) | |
tree | e117a87533656110b6acd56fc0ca64289892a9f5 /httemplate/misc/cdr.cgi | |
parent | 74e058c8a010ef6feb539248a550d0bb169c1e94 (diff) |
This commit was manufactured by cvs2svn to create tag 'TORRUS_1_0_9'.TORRUS_1_0_9
Diffstat (limited to 'httemplate/misc/cdr.cgi')
-rw-r--r-- | httemplate/misc/cdr.cgi | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/httemplate/misc/cdr.cgi b/httemplate/misc/cdr.cgi deleted file mode 100644 index d2ee77364..000000000 --- a/httemplate/misc/cdr.cgi +++ /dev/null @@ -1,48 +0,0 @@ -%# <% $cgi->redirect(popurl(2). "search/cdr.html") %> -%# i should be a popup and reload my parent... until then, this will do -<% include('/elements/header.html','CDR update successful') %> -<% include('/elements/footer.html') %> -<%init> -die "access denied" - unless $FS::CurrentUser::CurrentUser->access_right('Edit rating data'); - -$cgi->param('action') =~ /^(new|del|(reprocess|delete) selected)$/ - or die "Illegal action"; -my $action = $1; - -my $cdr; -if ( $action eq 'new' || $action eq 'del' ) { - $cgi->param('acctid') =~ /^(\d+)$/ or die "Illegal acctid"; - my $acctid = $1; - $cdr = qsearchs('cdr', { 'acctid' => $1 }) - or die "unknown acctid $acctid"; -} - -if ( $action eq 'new' ) { - my %hash = $cdr->hash; - $hash{'freesidestatus'} = ''; - my $new = new FS::cdr \%hash; - my $error = $new->replace($cdr); - die $error if $error; -} elsif ( $action eq 'del' ) { - my $error = $cdr->delete; - die $error if $error; -} elsif ( $action =~ /^(reprocess|delete) selected$/ ) { - foreach my $acctid ( - map { /^acctid(\d+)$/; $1; } grep /^acctid\d+$/, $cgi->param - ) { - my $cdr = qsearchs('cdr', { 'acctid' => $acctid }); - if ( $action eq 'reprocess selected' && $cdr ) { #new - my %hash = $cdr->hash; - $hash{'freesidestatus'} = ''; - my $new = new FS::cdr \%hash; - my $error = $new->replace($cdr); - die $error if $error; - } elsif ( $action eq 'delete selected' && $cdr ) { #del - my $error = $cdr->delete; - die $error if $error; - } - } -} - -</%init> |