put each CDR web import into a batch
[freeside.git] / httemplate / misc / cdr-import.html
1 <% include("/elements/header.html",'Call Detail Record Import') %>
2 <FORM ACTION="process/cdr-import.html" METHOD="POST" ENCTYPE="multipart/form-data">
3 Import a CSV file containing Call Detail Records (CDRs).<BR><BR>
4 CDR Format:
5 <SELECT NAME="format">
6 % foreach my $format ( keys %formats ) {
7     <OPTION VALUE="<% $format %>"><% $formats{$format} %></OPTION>
8 % }
9 </SELECT>
10 <BR><BR>
11
12 Filename: <INPUT TYPE="file" NAME="csvfile"><BR><BR>
13
14 <INPUT TYPE="hidden" NAME="cdrbatch" VALUE="<% $cdrbatch %>"%>
15
16 <INPUT TYPE="submit" VALUE="Upload">
17 </FORM>
18
19 <% include('/elements/footer.html') %>
20
21 <%init>
22
23 die "access denied"
24   unless $FS::CurrentUser::CurrentUser->access_right('Import');
25
26 tie my %formats, 'Tie::IxHash', FS::cdr->import_formats;
27
28 my $cdrbatch = time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);
29
30 </%init>