index.php
123 lines
| 1 | <form class="settings" method="post" action="<?php echo $this->baseUrl ?>" enctype="multipart/form-data"> |
| 2 | |
| 3 | <div class="wpallimport-header"> |
| 4 | <div class="wpallimport-logo"></div> |
| 5 | <div class="wpallimport-title"> |
| 6 | <p><?php _e('WP All Import', 'pmxi_plugin'); ?></p> |
| 7 | <h3><?php _e('Settings', 'pmxi_plugin'); ?></h3> |
| 8 | </div> |
| 9 | </div> |
| 10 | |
| 11 | <h2></h2> |
| 12 | |
| 13 | <div class="wpallimport-setting-wrapper"> |
| 14 | <?php if ($this->errors->get_error_codes()): ?> |
| 15 | <?php $this->error() ?> |
| 16 | <?php endif ?> |
| 17 | |
| 18 | <h3><?php _e('Import/Export Templates', 'pmxi_plugin') ?></h3> |
| 19 | <?php $templates = new PMXI_Template_List(); $templates->getBy()->convertRecords() ?> |
| 20 | <?php if ($templates->total()): ?> |
| 21 | <table> |
| 22 | <?php foreach ($templates as $t): ?> |
| 23 | <tr> |
| 24 | <td> |
| 25 | <label class="selectit" for="template-<?php echo $t->id ?>"><input id="template-<?php echo $t->id ?>" type="checkbox" name="templates[]" value="<?php echo $t->id ?>" /> <?php echo $t->name ?></label> |
| 26 | </td> |
| 27 | </tr> |
| 28 | <?php endforeach ?> |
| 29 | </table> |
| 30 | <p class="submit-buttons"> |
| 31 | <?php wp_nonce_field('delete-templates', '_wpnonce_delete-templates') ?> |
| 32 | <input type="submit" class="button-primary" name="delete_templates" value="<?php _e('Delete Selected', 'pmxi_plugin') ?>" /> |
| 33 | <input type="submit" class="button-primary" name="export_templates" value="<?php _e('Export Selected', 'pmxi_plugin') ?>" /> |
| 34 | </p> |
| 35 | <?php else: ?> |
| 36 | <em><?php _e('There are no templates saved', 'pmxi_plugin') ?></em> |
| 37 | <?php endif ?> |
| 38 | <p> |
| 39 | <input type="hidden" name="is_templates_submitted" value="1" /> |
| 40 | <input type="file" name="template_file"/> |
| 41 | <input type="submit" class="button-primary" name="import_templates" value="<?php _e('Import Templates', 'pmxi_plugin') ?>" /> |
| 42 | </p> |
| 43 | </div> |
| 44 | |
| 45 | </form> |
| 46 | |
| 47 | <form name="settings" method="post" action="<?php echo $this->baseUrl ?>" class="settings"> |
| 48 | |
| 49 | <h3><?php _e('Files', 'pmxi_plugin') ?></h3> |
| 50 | |
| 51 | <table class="form-table"> |
| 52 | <tbody> |
| 53 | <tr> |
| 54 | <th scope="row"><label><?php _e('Secure Mode', 'pmxi_plugin'); ?></label></th> |
| 55 | <td> |
| 56 | <fieldset style="padding:0;"> |
| 57 | <legend class="screen-reader-text"><span><?php _e('Secure Mode', 'pmxi_plugin'); ?></span></legend> |
| 58 | <input type="hidden" name="secure" value="0"/> |
| 59 | <label for="secure"><input type="checkbox" value="1" id="secure" name="secure" <?php echo (($post['secure']) ? 'checked="checked"' : ''); ?>><?php _e('Randomize folder names', 'pmxi_plugin'); ?></label> |
| 60 | </fieldset> |
| 61 | <p class="description"> |
| 62 | <?php |
| 63 | $wp_uploads = wp_upload_dir(); |
| 64 | ?> |
| 65 | <?php printf(__('Imported files, chunks, logs and temporary files will be placed in a folder with a randomized name inside of %s.', 'pmxi_plugin'), $wp_uploads['basedir'] . '/wpallimport' ); ?> |
| 66 | </p> |
| 67 | </td> |
| 68 | </tr> |
| 69 | <tr> |
| 70 | <th scope="row"><label><?php _e('Log Storage', 'pmxi_plugin'); ?></label></th> |
| 71 | <td> |
| 72 | <input type="text" class="regular-text" name="log_storage" value="<?php echo esc_attr($post['log_storage']); ?>"/> |
| 73 | <p class="description"><?php _e('Number of logs to store for each import. Enter 0 to never store logs.', 'pmxi_plugin'); ?></p> |
| 74 | </td> |
| 75 | </tr> |
| 76 | <tr> |
| 77 | <th scope="row"><label><?php _e('Clean Up Temp Files', 'pmxi_plugin'); ?></label></th> |
| 78 | <td> |
| 79 | <a class="button-primary wpallimport-clean-up-tmp-files" href="<?php echo add_query_arg(array('action' => 'cleanup'), $this->baseUrl); ?>"><?php _e('Clean Up', 'pmxi_plugin'); ?></a> |
| 80 | <p class="description"><?php _e('Attempt to remove temp files left over by imports that were improperly terminated.', 'pmxi_plugin'); ?></p> |
| 81 | </td> |
| 82 | </tr> |
| 83 | </tbody> |
| 84 | </table> |
| 85 | |
| 86 | <div class="clear"></div> |
| 87 | |
| 88 | <h3><?php _e('Advanced Settings', 'pmxi_plugin') ?></h3> |
| 89 | |
| 90 | <table class="form-table"> |
| 91 | <tbody> |
| 92 | <tr> |
| 93 | <th scope="row"><label><?php _e('Chunk Size', 'pmxi_plugin'); ?></label></th> |
| 94 | <td> |
| 95 | <input type="text" class="regular-text" name="large_feed_limit" value="<?php echo esc_attr($post['large_feed_limit']); ?>"/> |
| 96 | <p class="description"><?php _e('Split file into chunks containing the specified number of records.', 'pmxi_plugin'); ?></p> |
| 97 | </td> |
| 98 | </tr> |
| 99 | <tr> |
| 100 | <th scope="row"><label><?php _e('WP_IMPORTING', 'pmxi_plugin'); ?></label></th> |
| 101 | <td> |
| 102 | <fieldset style="padding:0;"> |
| 103 | <legend class="screen-reader-text"><span>Membership</span></legend> |
| 104 | <input type="hidden" name="pingbacks" value="0"/> |
| 105 | <label for="pingbacks"><input type="checkbox" value="1" id="pingbacks" name="pingbacks" <?php echo (($post['pingbacks']) ? 'checked="checked"' : ''); ?>><?php _e('Enable WP_IMPORTING', 'pmxi_plugin'); ?></label> |
| 106 | </fieldset> |
| 107 | <p class="description"><?php _e('Setting this constant avoids triggering pingback.', 'pmxi_plugin'); ?></p> |
| 108 | </td> |
| 109 | </tr> |
| 110 | </tbody> |
| 111 | </table> |
| 112 | |
| 113 | <div class="clear"></div> |
| 114 | |
| 115 | <p class="submit-buttons"> |
| 116 | <?php wp_nonce_field('edit-settings', '_wpnonce_edit-settings') ?> |
| 117 | <input type="hidden" name="is_settings_submitted" value="1" /> |
| 118 | <input type="submit" class="button-primary" value="Save Settings" /> |
| 119 | </p> |
| 120 | |
| 121 | <a href="http://soflyy.com/" target="_blank" class="wpallimport-created-by"><?php _e('Created by', 'pmxi_plugin'); ?> <span></span></a> |
| 122 | |
| 123 | </form> |