1 <% include('/elements/header.html', 'Phone number (DID) import') %>
3 Import a file containing phone numbers (DIDs).
6 <% include( '/elements/form-file_upload.html',
7 'name' => 'PhonenumImportForm',
8 'action' => 'process/phone_avail-import.html',
10 'fields' => [ 'format', 'availbatch', 'exportnum', 'countrycode' ],
11 'message' => 'DID import successful',
12 'url' => $p."search/phone_avail.html?availbatch=$availbatch",
16 <% &ntable("#cccccc", 2) %>
18 <INPUT TYPE="hidden" NAME="format" VALUE="default">
20 <INPUT TYPE="hidden" NAME="availbatch" VALUE="<% $availbatch %>">
22 <% include( '/elements/tr-select-table.html',
23 'table' => 'part_export',
24 'name_col' => 'machine',
26 'empty_label' => 'Select export',
27 'hashref' => { 'exporttype' => 'internal_diddb', },
33 <TH ALIGN="right">Country code</TH>
37 VALUE = "<% $conf->config('default_phone_countrycode') || 1 %>"
42 <% include( '/elements/file-upload.html',
44 'label' => 'Filename',
49 <TD COLSPAN=2 ALIGN="center" STYLE="padding-top:6px">
50 <INPUT TYPE = "submit"
53 onClick = "document.PhonenumImportForm.submit.disabled=true;"
64 Uploaded files can be CSV (comma-separated value) files or Excel spreadsheets. The file should have a .CSV or .XLS extension.
67 <b>Default</b> format has the following field order: <i>state, number, name</i>
72 <li><i>state</i>: Two-letter state code, i.e. "CA"
73 <li><i>number</i>: Phone number
74 <li><i>name</i>: optional, rate center
77 <% include('/elements/footer.html') %>
82 unless $FS::CurrentUser::CurrentUser->access_right('Import');
84 my $conf = new FS::Conf;
87 time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);