diff options
author | ivan <ivan> | 2008-09-15 07:18:57 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-09-15 07:18:57 +0000 |
commit | dcc553538ede04c0783bc92d3942c905c29131c1 (patch) | |
tree | bff35615cfa95478c0ee1bfb757ecb228da2c78f /httemplate/misc/phone_avail-import.html | |
parent | f9befdcb5ce8cf5dc5b9cacb6fe04ce29ed3cb80 (diff) |
add internal did database & ability to query for availability, plus upload tool
Diffstat (limited to 'httemplate/misc/phone_avail-import.html')
-rw-r--r-- | httemplate/misc/phone_avail-import.html | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/httemplate/misc/phone_avail-import.html b/httemplate/misc/phone_avail-import.html new file mode 100644 index 000000000..98dcc8abb --- /dev/null +++ b/httemplate/misc/phone_avail-import.html @@ -0,0 +1,77 @@ +<% include('/elements/header.html', 'Phone number (DID) import') %> + +Import a file containing phone numbers (DIDs). +<BR><BR> + +<% include( '/elements/form-file_upload.html', + 'name' => 'PhonenumImportForm', + 'action' => 'process/phone_avail-import.html', + 'num_files' => 1, + 'fields' => [ 'format', 'availbatch', 'exportnum', 'countrycode' ], + 'message' => 'DID import successful', + 'url' => $p."search/phone_avail.html?availbatch=$availbatch", + ) +%> + +<% &ntable("#cccccc", 2) %> + + <INPUT TYPE="hidden" NAME="format" VALUE="default"> + + <INPUT TYPE="hidden" NAME="availbatch" VALUE="<% $availbatch %>"> + + <INPUT TYPE="hidden" NAME="countrycode" VALUE="1"> + + <% include( '/elements/tr-select-table.html', + 'table' => 'part_export', + 'name_col' => 'machine', + 'label' => 'Export', + 'empty_label' => 'Select export', + 'hashref' => { 'exporttype' => 'internal_diddb', }, + #'label_callback' => + ) + %> + + <% 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.PhonenumImportForm.submit.disabled=true;" + > + </TD> + </TR> + +</TABLE> + +</FORM> + +<BR> + +Uploaded files can be CSV (comma-separated value) files or Excel spreadsheets. The file should have a .CSV or .XLS extension. +<BR><BR> + +<b>Default</b> format has the following field order: <i>state, number<i></i> +<BR><BR> + +Field information: +<ul> + <li><i>state</i>: Two-letter state code, i.e. "CA" + <li><i>number</i>: Phone number +</ul> + +<% include('/elements/footer.html') %> + +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Import'); + +my $availbatch = time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time); + +</%init> |