logout.php 1004 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. require_once "sessions.php";
  3. require_once "config.php";
  4. require_once "functions.php";
  5. logout_user();
  6. if (!USE_HTTP_AUTH) {
  7. $url_path = get_script_urlpath();
  8. if (ENABLE_LOGIN_SSL) {
  9. $protocol = "https";
  10. } else {
  11. $protocol = "http";
  12. }
  13. $redirect_base = "$protocol://" . $_SERVER["SERVER_NAME"] . $url_path;
  14. header("Location: $redirect_base/login.php");
  15. } else { ?>
  16. <html>
  17. <head>
  18. <title>Tiny Tiny RSS : Logout</title>
  19. <link rel="stylesheet" type="text/css" href="tt-rss.css">
  20. <body class="logoutBody">
  21. <div class="logoutContent">
  22. <h1>You have been logged out.</h1>
  23. <p><span class="logoutWarning">Warning:</span>
  24. As there is no way to reliably clear HTTP Authentication
  25. credentials from your browser, it is recommended for you to close
  26. this browser window, otherwise your browser could automatically
  27. authenticate again using previously supplied credentials, which
  28. is a security risk.</p>
  29. </div>
  30. </body>
  31. </html>
  32. <?php } ?>