export.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. @include_once NEWSLETTER_INCLUDES_DIR . '/controls.php';
  3. $options_profile = get_option('newsletter_profile');
  4. $controls = new NewsletterControls();
  5. $module = NewsletterUsers::instance();
  6. ?>
  7. <div class="wrap" id="tnp-wrap">
  8. <?php include NEWSLETTER_DIR . '/tnp-header.php'; ?>
  9. <div id="tnp-heading">
  10. <h2><?php _e('Export', 'newsletter') ?></h2>
  11. <p>
  12. <strong>The import and export functions ARE NOT for backup</strong>.
  13. If you want to backup you should consider to backup the <code><?php echo $wpdb->prefix ?>newsletter*</code> tables.
  14. </p>
  15. </div>
  16. <div id="tnp-body" class="tnp-users tnp-users-export">
  17. <form method="post" action="<?php echo admin_url('admin-ajax.php') ?>?action=newsletter_users_export">
  18. <?php $controls->init(); ?>
  19. <table class="form-table">
  20. <tr>
  21. <th><?php _e('Field separator', 'newsletter') ?></th>
  22. <td>
  23. <?php $controls->select('separator', array(';' => 'Semicolon', ',' => 'Comma', 'tab' => 'Tabulation')); ?>
  24. <p class="description">Try to change the separator if Excel does not recognize the columns.</p>
  25. </td>
  26. </tr>
  27. <tr>
  28. <th><?php _e('List', 'newsletter') ?></th>
  29. <td>
  30. <?php $controls->lists_select('list', __('All', 'newsletter')); ?>
  31. </td>
  32. </tr>
  33. </table>
  34. <p>
  35. <?php $controls->button('export', __('Export', 'newsletter')); ?>
  36. </p>
  37. </form>
  38. </div>
  39. <?php include NEWSLETTER_DIR . '/tnp-footer.php'; ?>
  40. </div>