forked from H3Gi/tatar-wars
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathactivate.php
More file actions
60 lines (43 loc) · 1.08 KB
/
Copy pathactivate.php
File metadata and controls
60 lines (43 loc) · 1.08 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
58
59
60
<?php
require( '.' . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'boot.php' );
require_once( MODEL_PATH . 'activate.php' );
class GPage extends GamePage {
var $playerStatus = -1;
var $uid = null;
var $uname = null;
function GPage() {
parent::gamepage();
$this->viewFile = 'activate.phtml';
$this->contentCssClass = 'activate';
}
function load() {
parent::load();
$m = new ActivateModel();
if (isset( $_GET['id'] )) {
$this->playerStatus = ($m->doActivation( $_GET['id'] ) ? 1 : 2);
}
else {
if (isset( $_GET['uid'] )) {
$this->uid = intval( $_GET['uid'] );
$row = $m->getPlayerData( $this->uid );
if ($row == NULL) {
$this->uid = 0 - 1;
}
else {
$this->uname = $row['name'];
if ($this->isPost()) {
if (( isset( $_POST['pw'] ) && md5( $_POST['pw'] ) == $row['pwd'] )) {
$mj = new QueueJobModel();
$mj->deletePlayer( $this->uid );
$this->playerStatus = 3;
}
}
}
}
}
$m->dispose();
}
}
$p = new GPage();
$p->run();
?>