forked from H3Gi/tatar-wars
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogout.php
43 lines (30 loc) · 795 Bytes
/
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
<?php
require( '.' . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'boot.php' );
class GPage extends SecureGamePage {
function GPage() {
parent::securegamepage();
$this->viewFile = 'logout.phtml';
$this->contentCssClass = 'logout';
}
function load() {
if ($this->player->isSpy) {
$gameStatus = $this->player->gameStatus;
$uid = $this->player->prevPlayerId;
$this->player = new Player();
$this->player->playerId = $uid;
$this->player->isAgent = FALSE;
$this->player->gameStatus = $gameStatus;
$this->player->save();
$this->redirect( 'village1.php' );
return null;
}
$this->player->logout();
unset( $_SESSION );
$this->player = NULL;
}
function preRender() {
}
}
$p = new GPage();
$p->run();
?>