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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
<% include("/elements/header.html",'Call Detail Record Import') %>
<% include( '/elements/form-file_upload.html',
'name' => 'CDRImportForm',
'action' => 'process/cdr-import.html',
'num_files' => 1,
'fields' => [ 'format', 'cdrbatch', ],
'message' => 'CDR import successful',
'url' => $p."search/cdr.html?cdrbatch=$cdrbatch",
)
%>
Import a file containing Call Detail Records (CDRs).<BR><BR>
<INPUT TYPE="hidden" NAME="cdrbatch" VALUE="<% $cdrbatch %>"%>
<% ntable('#cccccc', 2) %>
<TR>
<TD>CDR Format</TD>
<TD>
<SELECT NAME="format">
% foreach my $format ( keys %formats ) {
<OPTION VALUE="<% $format %>"><% $formats{$format} %></OPTION>
% }
</SELECT>
</TD>
</TR>
<% include( '/elements/file-upload.html',
'field' => 'file',
'label' => 'Filename',
)
%>
<TR>
<TD COLSPAN=2 ALIGN="center" STYLE="padding-top:6px">
<INPUT TYPE = "submit"
ID = "submit"
VALUE = "Import file"
onClick = "document.InventoryItemImportForm.submit.disabled=true;"
>
</TD>
</TR>
</TABLE>
</FORM>
<% include('/elements/footer.html') %>
<%init>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Import');
tie my %formats, 'Tie::IxHash', FS::cdr->import_formats;
my $cdrbatch = time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);
</%init>
|