rss.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /*
  3. * To change this license header, choose License Headers in Project Properties.
  4. * To change this template file, choose Tools | Templates
  5. * and open the template in the editor.
  6. */
  7. include_once 'utils/utils.php';
  8. include_once 'utils/bdd.php';
  9. switch (auth_user()) {
  10. case AUTH_NOT_USER:
  11. include_once 'view/unknown_ip.php';
  12. break;
  13. default :
  14. header("Content-type: text/xml");
  15. ?>
  16. <?xml version="1.0"?>
  17. <rss version="2.0">
  18. <channel>
  19. <title>GIWYT Latest Shows</title>
  20. <link>http://giwyt.ewft.org/</link>
  21. <description>TV Shows</description>
  22. <language>en-us</language>
  23. <pubDate>Tue, 10 Jun 2003 04:00:00 GMT</pubDate>
  24. <lastBuildDate>Tue, 10 Jun 2003 09:41:01 GMT</lastBuildDate>
  25. <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  26. <generator>GIWYT RSS 0.9</generator>
  27. <webMaster>webmaster@ewft.org</webMaster>
  28. <?php
  29. $repepisode = $bdd->query('SELECT * FROM `TVS_episode` , `TVS_shows`,`torrent_data` WHERE `TVS_shows`.`id`=`TVS_episode`.`shows_id` AND `torrent_data`.`episode_id`=`TVS_episode`.`id` ORDER BY `torrent_data`.`id` DESC LIMIT 0,25');
  30. while ($donepi = $repepisode->fetch()) {
  31. ?>
  32. <item>
  33. <title><?php echo $donepi['display_name']; ?> S<?php echo $donepi['season_num']; ?>E<?php echo $donepi['episode_num']; ?> <?php echo $donepi['res']; ?></title>
  34. <link>http://giwyt.ewft.org/index.php?page_id=2&amp;epi_id=<?php echo $donepi['id']; ?></link>
  35. <description><img id="new_pict" src="<?php echo "http://thetvdb.com/banners/graphical/" . $donepi['tvdbid'] . "-g" . $donepi['TVDB_banner_id'] . ".jpg" ?>" /></description>
  36. <pubDate><?php echo $donepi['timeadded']; ?></pubDate>
  37. <guid>http://giwyt.ewft.org/ItemID#<?php echo $donepi[13]; ?></guid>
  38. </item>
  39. <?php
  40. }
  41. ?>
  42. </channel>
  43. </rss>
  44. <?php
  45. }