-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogout.php
More file actions
57 lines (46 loc) · 1.63 KB
/
Copy pathlogout.php
File metadata and controls
57 lines (46 loc) · 1.63 KB
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
48
49
50
51
52
53
54
55
56
57
<?php
/**
* Description of logout
*
* @author cir8
*/
include 'bootstrap.php';
run();
include $application->getDirConfig('controllers') . 'ApplicationWebBody.php';
include $application->getDirConfig('controllers') . 'ApplicationWebPage.php';
class logout {
private $app;
public function __construct($application) {
$this->app = $application;
}
public function countdownredirect() {
for ($i = 5; $i > 0; $i--) {
echo "$i..";
sleep(1);
}
header("refresh:5;url=wherever.php");
}
public function logoutpage() {
//unset user member type and set to guest
$this->app->setUserConfig('type', 'guest');
$this->app->setUserConfig('name', '');
$links = array('home.php' => 'Home', 'about.php' => 'About', 'search.php' => 'Search');
$currentLocation = array('account.php' => 'My Account');
$bodyContent = 'You have been logged out.... Come back again soon okay?
<br/><br/>
Would you like to go <a href="home.php">home?</a>.....
Tough, I\'m taking you there in 5 seconds anyway :D';
header("refresh:5;url=home.php");
$body = new ApplicationWebBody($this->app, 'Logged Out', $bodyContent);
$body->setCurrentBranch('account');
$body->setbreadArray($currentLocation);
$body->setRightContentLinks($links);
$page = new ApplicationWebPage($this->app);
echo $page->head('My Account');
echo $page->body($body);
echo $page->footer();
}
}
$s = new logout($application);
$s->logoutpage();
?>