importExport.phtml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. require_once(LIB_PATH . '/lib_opml.php');
  3. if ($this->req == 'export') {
  4. echo '<?xml version="1.0" encoding="UTF-8" ?>';
  5. ?>
  6. <!-- Generated by <?php echo Minz_Configuration::title (); ?> -->
  7. <opml version="2.0">
  8. <head>
  9. <title><?php echo Minz_Configuration::title (); ?> OPML Feed</title>
  10. <dateCreated><?php echo date('D, d M Y H:i:s'); ?></dateCreated>
  11. </head>
  12. <body>
  13. <?php echo opml_export ($this->categories); ?>
  14. </body>
  15. </opml>
  16. <?php } else { ?>
  17. <?php $this->partial ('aside_feed'); ?>
  18. <div class="post ">
  19. <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
  20. <form method="post" action="<?php echo Minz_Url::display (array ('c' => 'configure', 'a' => 'importExport', 'params' => array ('q' => 'import'))); ?>" enctype="multipart/form-data">
  21. <legend><?php echo Minz_Translate::t ('import_export_opml'); ?></legend>
  22. <div class="form-group">
  23. <label class="group-name" for="file"><?php echo Minz_Translate::t ('file_to_import'); ?></label>
  24. <div class="group-controls">
  25. <input type="file" name="file" id="file" />
  26. </div>
  27. </div>
  28. <div class="form-group form-actions">
  29. <div class="group-controls">
  30. <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('import'); ?></button>
  31. <?php echo Minz_Translate::t ('or'); ?>
  32. <a target="_blank" class="btn btn-important" href="<?php echo _url ('configure', 'importExport', 'q', 'export'); ?>"><?php echo Minz_Translate::t ('export'); ?></a>
  33. </div>
  34. </div>
  35. </form>
  36. </div>
  37. <?php } ?>