2013-06-19 13:27:14 +02:00
|
|
|
<?php
|
2017-01-30 21:36:44 +01:00
|
|
|
/* μlogger
|
2013-06-19 13:27:14 +02:00
|
|
|
*
|
2017-01-30 21:36:44 +01:00
|
|
|
* Copyright(C) 2017 Bartek Fabiszewski (www.fabiszewski.net)
|
2013-06-19 13:27:14 +02:00
|
|
|
*
|
|
|
|
* This is free software; you can redistribute it and/or modify it under
|
2017-04-07 00:05:28 +02:00
|
|
|
* the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2013-06-19 13:27:14 +02:00
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
2017-04-07 00:05:28 +02:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
2013-06-19 13:27:14 +02:00
|
|
|
*/
|
2017-04-07 00:05:28 +02:00
|
|
|
|
2017-01-30 21:36:44 +01:00
|
|
|
session_name('ulogger');
|
2013-06-19 13:27:14 +02:00
|
|
|
session_start();
|
|
|
|
$_SESSION = NULL;
|
2017-01-30 21:36:44 +01:00
|
|
|
if (isset($_COOKIE[session_name('ulogger')])) {
|
|
|
|
setcookie(session_name('ulogger'),'',time()-42000,'/');
|
2013-06-19 13:27:14 +02:00
|
|
|
}
|
2016-10-29 14:05:13 +02:00
|
|
|
session_destroy();
|
2014-03-05 20:12:36 +01:00
|
|
|
$ssl = ((!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "" || $_SERVER['HTTPS'] == "off") ? "http" : "https");
|
2013-06-19 13:27:14 +02:00
|
|
|
$url = str_replace("//", "/", $_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])."/index.php");
|
|
|
|
header("Location: $ssl://$url");
|
|
|
|
?>
|