importExport.phtml 1.5 KB

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