-
Notifications
You must be signed in to change notification settings - Fork 0
/
logout.php
executable file
·44 lines (42 loc) · 1.07 KB
/
logout.php
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
43
44
<?php
/*
Copyright © 2009,2015,2022 Siggi Bjarnason.
Licensed under GNU GPL v3 and later. Check out LICENSE.TXT for details
or see <https://www.gnu.org/licenses/gpl-3.0-standalone.html>
*/
$strReferer = $_SERVER["HTTP_REFERER"];
$strPageNameParts = explode("/",$strReferer);
$HowMany = count($strPageNameParts);
$LastIndex = $HowMany - 1;
$strReferPage = $strPageNameParts[$LastIndex];
if($strReferPage=="register.php")
{
$strReferPage = "index.php";
}
if($strReferPage=="delete.php")
{
$strReferPage = "index.php";
}
if($strReferPage=="update.php")
{
$strReferPage = "index.php";
}
if($strReferPage=="recover.php")
{
$strReferPage = "index.php";
}
if($strReferPage=="")
{
$strReferPage = "index.php";
}
if($strReferPage=="myprofile.php")
{
$strReferPage = "index.php";
}
require_once("DBCon.php");
require_once("KillSession.php");
$strReferPage = $ROOTPATH . $strReferPage;
header("Location: $strReferPage");
printPg("You have been successfully logged out.","h1");
require("footer.php");
?>