auth.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * auth.php
  4. *
  5. * Copyright (c) 1999-2001 The Squirrelmail Development 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. /*****************************************************************/
  13. /*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!! ***/
  14. /*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION. ***/
  15. /*** + Base level indent should begin at left margin, as ***/
  16. /*** the require_once below. ***/
  17. /*** + All identation should consist of four space blocks ***/
  18. /*** + Tab characters are evil. ***/
  19. /*** + all comments should use "slash-star ... star-slash" ***/
  20. /*** style -- no pound characters, no slash-slash style ***/
  21. /*** + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD ***/
  22. /*** ALWAYS USE { AND } CHARACTERS!!! ***/
  23. /*** + Please use ' instead of ", when possible. Note " ***/
  24. /*** should always be used in _( ) function calls. ***/
  25. /*** Thank you for your help making the SM code more readable. ***/
  26. /*****************************************************************/
  27. require_once( '../functions/page_header.php' );
  28. function is_logged_in () {
  29. global $squirrelmail_language;
  30. if ( session_is_registered('user_is_logged_in') )
  31. return;
  32. set_up_language($squirrelmail_language, true);
  33. displayHtmlHeader( 'SquirrelMail', '', FALSE );
  34. echo "<body bgcolor=\"ffffff\">\n" .
  35. '<br><br><center><b>'.
  36. _("You must be logged in to access this page.").'</b><br><br>'.
  37. "<a href=\"../src/login.php\" target=\"_top\">"._("Go to the login page")."</a>\n".
  38. "</center></body></html>\n";
  39. exit;
  40. }
  41. ?>