auth.php 895 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * auth.php
  4. *
  5. * Copyright (c) 1999-2002 The SquirrelMail Project Team
  6. * Licensed under the GNU GPL. For full terms see the file COPYING.
  7. *
  8. * Contains functions used to do authentication.
  9. *
  10. * $Id$
  11. */
  12. require_once( '../functions/page_header.php' );
  13. function is_logged_in () {
  14. global $squirrelmail_language, $frame_top;
  15. if ( session_is_registered('user_is_logged_in') ) {
  16. return;
  17. }
  18. if (!isset($frame_top)) {
  19. $frame_top = '_top';
  20. }
  21. set_up_language($squirrelmail_language, true);
  22. displayHtmlHeader( 'SquirrelMail', '', FALSE );
  23. echo "<body bgcolor=\"ffffff\">\n" .
  24. '<br><br><center><b>' .
  25. _("You must be logged in to access this page.").'</b><br><br>' .
  26. "<a href=\"../src/login.php\" target=\"$frame_top\">"._("Go to the login page")."</a>\n" .
  27. "</center></body></html>\n";
  28. exit;
  29. }
  30. ?>