sidebar.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <div id="sidebar">
  2. <h2>Mai multe informații</h2>
  3. <a href="http://ceata.org" target="_blank" title="Ceata"><img src="./img/ceata.png" alt="Ceata" height="42" /></a>
  4. <a href="http://fsf.org" target="_blank" title="Free Software Foundation"><img src="./img/fsf.png" alt="Free Software Foundation Europe" /></a>
  5. <a href="http://fsfe.org" target="_blank" title="Free Software Foundation Europe"><img src="./img/fsfe.png" alt="Free Software Foundation Europe" /></a>
  6. <a href="http://freedomdefined.org" target="_blank" title="The Definition of Free Cultural Work"><img src="./img/fc.png" alt="The Definition of Free Cultural Work" /></a>
  7. <a href="http://www.defectivebydesign.org/" target="_blank" title="What is DRM? Digital Restrictions Management — We Oppose DRM!"><img src="./img/drm.png" alt="What is DRM? Digital Restrictions Management — We Oppose DRM!" /></a>
  8. <h2>Noutăți</h2>
  9. <?php
  10. require_once("./lib/rsslib.php");
  11. $cachename = "./cache/rss-cache-tmp.php";
  12. $url = "http://identi.ca/api/statusnet/groups/timeline/51195.rss";
  13. if (file_exists($cachename))
  14. {
  15. $now = date("G");
  16. $time = date("G", filemtime($cachename));
  17. if ($time == $now)
  18. {
  19. require_once($cachename);
  20. }
  21. else
  22. {
  23. $cache = RSS_Display($url, 15, false, true);
  24. $cache = '<div id="news">'.$cache."</div><!-- #news -->";
  25. file_put_contents($cachename, $cache);
  26. echo $cache;
  27. }
  28. }
  29. else
  30. {
  31. $cache = RSS_Display($url, 15, false, true);
  32. $cache = '<div id="news">'.$cache."</div><!-- #news -->";
  33. file_put_contents($cachename, $cache);
  34. echo $cache;
  35. }
  36. ?>
  37. </div>