importExport.phtml 1.1 KB

123456789101112131415161718192021222324252627
  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. <div class="table">
  15. <?php $this->partial ('configure_aside'); ?>
  16. <form method="post" action="<?php echo Url::display (array ('c' => 'configure', 'a' => 'importExport', 'params' => array ('q' => 'import'))); ?>" enctype="multipart/form-data">
  17. <h1>Exporter au format OPML</h1>
  18. <button formaction="<?php echo Url::display (array ('c' => 'configure', 'a' => 'importExport', 'params' => array ('q' => 'export'))); ?>">Exporter</button>
  19. <h1>Importer au format OPML</h1>
  20. <label for="file">Fichier</label>
  21. <input type="file" name="file" id="file" />
  22. <input type="submit" value="Charger" />
  23. </form>
  24. </div>
  25. <?php } ?>