forked from deliciousbrains/sqlbuddy
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlogout.php
More file actions
41 lines (29 loc) · 731 Bytes
/
logout.php
File metadata and controls
41 lines (29 loc) · 731 Bytes
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
<?php
/*
SQL Buddy - Web based MySQL administration
http://www.sqlbuddy.com/
logout.php
- end a session
MIT license
2008 Calvin Lough <http://calv.in>
*/
if (!session_id())
session_start();
if (isset($_SESSION['SB_LOGIN'])) {
$_SESSION['SB_LOGIN'] = null;
unset($GLOBALS['_SESSION']['SB_LOGIN']);
}
if (isset($_SESSION['SB_LOGIN_STRING'])) {
$_SESSION['SB_LOGIN_STRING'] = null;
unset($GLOBALS['_SESSION']['SB_LOGIN_STRING']);
}
if (isset($_SESSION['SB_LOGIN_USER'])) {
$_SESSION['SB_LOGIN_USER'] = null;
unset($GLOBALS['_SESSION']['SB_LOGIN_USER']);
}
if (isset($_SESSION['SB_LOGIN_PASS'])) {
$_SESSION['SB_LOGIN_PASS'] = null;
unset($GLOBALS['_SESSION']['SB_LOGIN_PASS']);
}
header("Location: login.php");
?>