-
Notifications
You must be signed in to change notification settings - Fork 1
/
logout.php
47 lines (30 loc) · 1.17 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
45
46
47
<?php
/*
AMXBans v6.0
Copyright 2009, 2010 by SeToY & |PJ|ShOrTy
This file is part of AMXBans.
AMXBans is free software, but it's licensed under the
Creative Commons - Attribution-NonCommercial-ShareAlike 2.0
AMXBans 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.
You should have received a copy of the cc-nC-SA along with AMXBans.
If not, see <http://creativecommons.org/licenses/by-nc-sa/2.0/>.
*/
session_start();
include("include/config.inc.php");
setcookie($config->cookie,"delete",time()-(60*60*24*7),"",$_SERVER["HTTP_HOST"]);
if(isset($_SESSION["uid"])) @$query = mysql_query("UPDATE `".$config->db_prefix."_webadmins` SET `logcode`=NULL WHERE `id`=".(int)$_SESSION["uid"]) or die (mysql_error());
unset($_SESSION["uid"]);
unset($_SESSION["uname"]);
unset($_SESSION["email"]);
unset($_SESSION["level"]);
unset($_SESSION["sid"]);
unset($_SESSION["loggedin"]);
unset($_SESSION["logg3din"]);
$temp=$_SESSION["lang"];
session_destroy();
session_start();
$_SESSION["lang"]=$temp;
header("Location:index.php");
?>