check_logfiles: 3.7.5.1
[omd.git] / packages / omd / logout.php
blob48bd1dbf1404d5faa0d9a69cfa4a7a03c855aa73
1 <?php
2 $site_parts = array_slice(explode('/' ,dirname($_SERVER["SCRIPT_FILENAME"])), 0, -3);
3 $OMD_SITE = $site_parts[count($site_parts)-1];
5 if(!isset($_COOKIE['omd_logout'])) {
6 header("WWW-Authenticate: Basic realm=\"OMD Monitoring Site ".$OMD_SITE."\"");
7 header("HTTP/1.1 401 Unauthorized");
8 setcookie('omd_logout', '1', time()+3600);
9 exit(1);
10 } else {
11 setcookie('omd_logout', '', -1);
14 <html>
15 <head>
16 <title>Redirecting...</title>
17 <meta http-equiv="REFRESH" content="0;url=/<?php echo $OMD_SITE; ?>/omd/index.py">
18 </head>
19 </html>