_buttons_template.php
11 years ago
_import_file.php
11 years ago
_reimport_options.php
11 years ago
_reimport_template.php
11 years ago
_settings_template.php
11 years ago
_import_file.php
113 lines
| 1 | <?php |
| 2 | |
| 3 | $l10n = array( |
| 4 | 'queue_limit_exceeded' => 'You have attempted to queue too many files.', |
| 5 | 'file_exceeds_size_limit' => 'This file exceeds the maximum upload size for this site.', |
| 6 | 'zero_byte_file' => 'This file is empty. Please try another.', |
| 7 | 'invalid_filetype' => 'This file type is not allowed. Please try another.', |
| 8 | 'default_error' => 'An error occurred in the upload. Please try again later.', |
| 9 | 'missing_upload_url' => 'There was a configuration error. Please contact the server administrator.', |
| 10 | 'upload_limit_exceeded' => 'You may only upload 1 file.', |
| 11 | 'http_error' => 'HTTP error.', |
| 12 | 'upload_failed' => 'Upload failed.', |
| 13 | 'io_error' => 'IO error.', |
| 14 | 'security_error' => 'Security error.', |
| 15 | 'file_cancelled' => 'File canceled.', |
| 16 | 'upload_stopped' => 'Upload stopped.', |
| 17 | 'dismiss' => 'Dismiss', |
| 18 | 'crunching' => 'Crunching…', |
| 19 | 'deleted' => 'moved to the trash.', |
| 20 | 'error_uploading' => 'has failed to upload due to an error', |
| 21 | 'cancel_upload' => 'Cancel upload', |
| 22 | 'dismiss' => 'Dismiss' |
| 23 | ); |
| 24 | |
| 25 | ?> |
| 26 | <script type="text/javascript"> |
| 27 | var plugin_url = '<?php echo PMXI_ROOT_URL; ?>'; |
| 28 | var swfuploadL10n = <?php echo json_encode($l10n); ?>; |
| 29 | </script> |
| 30 | |
| 31 | <div class="change_file"> |
| 32 | <div class="wpallimport-content-section"> |
| 33 | <div class="wpallimport-collapsed-header" style="padding-left:30px;"> |
| 34 | <h3><?php _e('Import File','pmxi_plugin');?></h3> |
| 35 | </div> |
| 36 | <div class="wpallimport-collapsed-content" style="padding-bottom: 40px;"> |
| 37 | <hr> |
| 38 | <table class="form-table" style="max-width:none;"> |
| 39 | <tr> |
| 40 | <td colspan="3"> |
| 41 | |
| 42 | <div class="wpallimport-import-types"> |
| 43 | <h3><?php _e('Specify the location of the file to use for future runs of this import.', 'pmxi_plugin'); ?></h3> |
| 44 | <a class="wpallimport-import-from wpallimport-upload-type <?php echo 'upload' == $import->type ? 'selected' : '' ?>" rel="upload_type" href="javascript:void(0);"> |
| 45 | <span class="wpallimport-icon"></span> |
| 46 | <span class="wpallimport-icon-label"><?php _e('Upload a file', 'pmxi_plugin'); ?></span> |
| 47 | </a> |
| 48 | <a class="wpallimport-import-from wpallimport-url-type <?php echo 'url' == $import->type ? 'selected' : '' ?>" rel="url_type" href="javascript:void(0);"> |
| 49 | <span class="wpallimport-icon"></span> |
| 50 | <span class="wpallimport-icon-label"><?php _e('Download from URL', 'pmxi_plugin'); ?></span> |
| 51 | </a> |
| 52 | <a class="wpallimport-import-from wpallimport-file-type <?php echo 'file' == $import->type ? 'selected' : '' ?>" rel="file_type" href="javascript:void(0);"> |
| 53 | <span class="wpallimport-icon"></span> |
| 54 | <span class="wpallimport-icon-label"><?php _e('Use existing file', 'pmxi_plugin'); ?></span> |
| 55 | </a> |
| 56 | </div> |
| 57 | |
| 58 | <input type="hidden" value="upload" name="new_type"/> |
| 59 | |
| 60 | <div class="wpallimport-upload-type-container" rel="upload_type"> |
| 61 | <div id="plupload-ui" class="wpallimport-file-type-options"> |
| 62 | <div> |
| 63 | <input type="hidden" name="filepath" value="<?php if ('upload' == $import->type) echo $import->path; ?>" id="filepath"/> |
| 64 | <a id="select-files" href="javascript:void(0);"/><?php _e('Click here to select file from your computer...', 'pmxi_plugin'); ?></a> |
| 65 | <div id="progressbar" class="wpallimport-progressbar"> |
| 66 | <?php if ('upload' == $import->type) _e( '<span>Upload Complete</span> - '.basename($import->path).' 100%', 'pmxi_plugin'); ?> |
| 67 | </div> |
| 68 | <div id="progress" class="wpallimport-progress" <?php if ('upload' == $import->type):?>style="display: block;"<?php endif;?>> |
| 69 | <div id="upload_process" class="wpallimport-upload-process"></div> |
| 70 | </div> |
| 71 | </div> |
| 72 | </div> |
| 73 | </div> |
| 74 | <div class="wpallimport-upload-type-container" rel="url_type"> |
| 75 | <div class="wpallimport-file-type-options"> |
| 76 | <span class="wpallimport-url-icon"></span> |
| 77 | <input type="text" class="regular-text" name="url" value="<?php echo ('url' == $import->type) ? esc_attr($import->path) : 'Enter a web address to download the file from...'; ?>"/> |
| 78 | <div class="wpallimport-free-edition-notice"> |
| 79 | <a href="http://www.wpallimport.com/upgrade-to-pro/?utm_source=free-plugin&utm_medium=in-plugin&utm_campaign=download-from-url" target="_blank" class="upgrade_link"><?php _e('Upgrade to the professional edition of WP All Import to use this feature.', 'pmxi_plugin');?></a> |
| 80 | </div> |
| 81 | </div> |
| 82 | <input type="hidden" name="downloaded"/> |
| 83 | </div> |
| 84 | <div class="wpallimport-upload-type-container" rel="file_type"> |
| 85 | <?php $upload_dir = wp_upload_dir(); ?> |
| 86 | <div class="wpallimport-file-type-options"> |
| 87 | |
| 88 | <div id="file_selector" class="dd-container" style="width: 600px;"> |
| 89 | <div class="dd-select" style="width: 600px; background: none repeat scroll 0% 0% rgb(238, 238, 238);"> |
| 90 | <input type="hidden" class="dd-selected-value" value=""> |
| 91 | <a class="dd-selected" style="color: rgb(207, 206, 202);"> |
| 92 | <label class="dd-selected-text "><?php _e('Select a previously uploaded file', 'pmxi_plugin'); ?></label> |
| 93 | </a> |
| 94 | <span class="dd-pointer dd-pointer-down"></span> |
| 95 | </div> |
| 96 | </div> |
| 97 | |
| 98 | <input type="hidden" name="file" value="<?php if ('file' == $import->type) echo esc_attr($import->path); ?>"/> |
| 99 | |
| 100 | <div class="wpallimport-note" style="width:60%; margin: 0 auto; "> |
| 101 | <?php printf(__('Upload files to <strong>%s</strong> and they will appear in this list', 'pmxi_plugin'), $upload_dir['basedir'] . '/wpallimport/files'); ?> |
| 102 | </div> |
| 103 | <div class="wpallimport-free-edition-notice"> |
| 104 | <a href="http://www.wpallimport.com/upgrade-to-pro/?utm_source=free-plugin&utm_medium=in-plugin&utm_campaign=use-existing-file" target="_blank" class="upgrade_link"><?php _e('Upgrade to the professional edition of WP All Import to use this feature.', 'pmxi_plugin');?></a> |
| 105 | </div> |
| 106 | </div> |
| 107 | </div> |
| 108 | </td> |
| 109 | </tr> |
| 110 | </table> |
| 111 | </div> |
| 112 | </div> |
| 113 | </div> |