auth.php 603 B

1234567891011121314151617181920212223242526272829
  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. if (session_is_registered('user_is_logged_in'))
  14. return;
  15. echo "<html><body bgcolor=\"ffffff\">\n";
  16. echo "<br><br>";
  17. echo "<center>";
  18. echo "<b>"._("You must be logged in to access this page.")."</b><br>";
  19. echo "<a href=\"../src/login.php\">"._("Go to the login page")."</a>\n";
  20. echo "</center>";
  21. echo "</body></html>\n";
  22. exit;
  23. }
  24. ?>