newsList.php 871 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /*
  3. * Created on 30 mai 2006 by Elixir Interactive http://www.elixir-interactive.com
  4. */
  5. $langFile = array ('courses', 'index');
  6. include("main/inc/global.inc.php");
  7. include_once (api_get_path(LIBRARY_PATH)."/system_announcements.lib.php");
  8. $tool_name = get_lang("SystemAnnouncements"); // title of the page (should come from the language file)
  9. Display::display_header($tool_name);
  10. if(isset($_GET['start']))
  11. {
  12. $start = (int)$_GET['start'];
  13. }
  14. else
  15. {
  16. $start = 0;
  17. }
  18. if (isset($_uid))
  19. {
  20. $visibility = api_is_allowed_to_create_course() ? VISIBLE_TEACHER : VISIBLE_STUDENT;
  21. SystemAnnouncementManager :: display_all_announcements($visibility, $announcement, $start, $_uid);
  22. }
  23. else
  24. {
  25. SystemAnnouncementManager :: display_all_announcements(VISIBLE_GUEST, $announcement, $start);
  26. }
  27. Display::display_footer();
  28. ?>