auth.php 723 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. ** auth.php
  4. **
  5. ** Contains functions used to do authentication.
  6. **
  7. ** $Id$
  8. **/
  9. if (defined ('auth_php'))
  10. return;
  11. define ('auth_php', true);
  12. function is_logged_in () {
  13. global $squirrelmail_language;
  14. if (session_is_registered('user_is_logged_in'))
  15. return;
  16. set_up_language($squirrelmail_language, true);
  17. echo "<html><body bgcolor=\"ffffff\">\n";
  18. echo "<br><br>";
  19. echo "<center>";
  20. echo "<b>"._("You must be logged in to access this page.")."</b><br>";
  21. echo "<a href=\"../src/login.php\" target=\"_top\">"._("Go to the login page")."</a>\n";
  22. echo "</center>";
  23. echo "</body></html>\n";
  24. exit;
  25. }
  26. ?>