summaryrefslogtreecommitdiff
path: root/logout.php
blob: f3987d853963b323aa8e4451aa06d90c1b783517 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
	require_once "sessions.php";

	require_once "config.php";
	require_once "functions.php";

	logout_user();

	if (!USE_HTTP_AUTH) {
		$url_path = get_script_urlpath();

		if (ENABLE_LOGIN_SSL) {
			$protocol = "https";
		} else {
			$protocol = "http";
		}		

		$redirect_base = "$protocol://" . $_SERVER["SERVER_NAME"] . $url_path;

		header("Location: $redirect_base/login.php");
	} else { ?>
	
	<html>
		<head>
			<title>Tiny Tiny RSS : Logout</title>
			<link rel="stylesheet" type="text/css" href="tt-rss.css">
	<body class="logoutBody">
		<div class="logoutContent">	
		
			<h1>You have been logged out.</h1>

			<p><span class="logoutWarning">Warning:</span>
			As there is no way to reliably clear HTTP Authentication 
			credentials from your browser, it is recommended for you to close
			this browser window, otherwise your browser could automatically
			authenticate again using previously supplied credentials, which
			is a security risk.</p>
			
		</div>
	</body>
	</html>
<?php	} ?>