View sourcecode

The following files exists in this folder. Click to view.

logout.php

24 lines ASCII Unix (LF)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
    session_start
();
    if(isset(
$_GET['action'])){
    switch(
$_GET['action']){
        case 
'logout':
            
session_unset();
            
session_destroy();
            
header('location: index.php?mess=logout');
            exit();
        case 
'cookie':
            
session_unset();
            
session_destroy();
            
setcookie('remember'''time() - 1);
            
header('location: index.php?mess=logout');
            exit();
        case 
'password_change':
            
session_unset();
            
session_destroy();
            
setcookie('remember'''time() - 1);
            
header('location: index.php?action=login&mess=passwordchange');
            exit();
    }
}
?>