blob: ba58bbdd718b86db1dbccb9f3297e41783467b48 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<% $server->process %>
<%init>
my @args = $cgi->param('arg');
my %param = ();
while ( @args ) {
my( $field, $value ) = splice(@args, 0, 2);
unless ( exists( $param{$field} ) ) {
$param{$field} = $value;
} elsif ( ! ref($param{$field}) ) {
$param{$field} = [ $param{$field}, $value ];
} else {
push @{$param{$field}}, $value;
}
}
my $exportnum;
my $method;
for (grep /^*_script$/, keys %param) {
$exportnum = $param{$param{$_}.'_exportnum'};
$method = $param{$param{$_}.'_script'};
}
my $part_export = qsearchs('part_export', { 'exportnum'=> $exportnum, } )
or die "unknown exportnum $exportnum";
my $class = 'FS::part_export::'.$part_export->{Hash}->{exporttype}.'::'.$method;
my $server = new FS::UI::Web::JSRPC $class, $cgi;
</%init>
|