importExport.phtml 1.4 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'); ?>">← Retour à vos flux RSS</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>Import / export au format OPML</legend>
  19. <div class="form-group">
  20. <label class="group-name" for="file">Fichier à importer</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">Importer</button>
  28. ou
  29. <button type="submit" class="btn btn-important" formaction="<?php echo Url::display (array ('c' => 'configure', 'a' => 'importExport', 'params' => array ('q' => 'export'))); ?>">Exporter</button>
  30. </div>
  31. </div>
  32. </form>
  33. </div>
  34. <?php } ?>