forked from BikmullinDim/TravianT4Singleplayer
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy patha2b.php
156 lines (143 loc) · 4 KB
/
a2b.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<?php
include("GameEngine/Village.php");
include("GameEngine/Units.php");
$start = $generator->pageLoadTimeStart();
if(isset($_GET['newdid'])) {
$_SESSION['wid'] = $_GET['newdid'];
if(isset($_GET['w'])) {
header("Location: ".$_SERVER['PHP_SELF']."?w=".$_GET['w']);
}
else if(isset($_GET['r'])) {
header("Location: ".$_SERVER['PHP_SELF']."?r=".$_GET['r']);
}
else if(isset($_GET['o'])) {
header("Location: ".$_SERVER['PHP_SELF']."?o=".$_GET['o']);
}
else if(isset($_GET['z'])) {
header("Location: ".$_SERVER['PHP_SELF']."?z=".$_GET['z']);
}
else if($_GET['id']!=0){
header("Location: ".$_SERVER['PHP_SELF']);
}
}
else {
$building->procBuild($_GET);
}
if(isset($_GET['id'])) {
$id = $_GET['id'];
}
if(isset($_GET['bid'])) {
$bid = $_GET['bid'];
if($too['conqured'] == 0){$disabledr ="disabled=disabled";}else{
$disabledr ="";
}
$disabled ="disabled=disabled";
$checked ="checked=checked";
}
if(isset($_GET['w'])) {
$w = $_GET['w'];
}
if(isset($_GET['r'])) {
$r = $_GET['r'];
}
if(isset($_GET['o'])) {
$o = $_GET['o'];
$oid = $_GET['z'];
$too = $database->getOasisField($oid,"conqured");
if($too == 0){$disabledr ="disabled=disabled";}else{
$disabledr ="";
}
$disabled ="disabled=disabled";
$checked ="checked=checked";
}
$process = $units->procUnits($_POST);
$automation->isWinner();
include "Templates/html.tpl";
?>
<body class="v35 webkit chrome a2b">
<div id="wrapper">
<img id="staticElements" src="img/x.gif" alt="" />
<div id="logoutContainer">
<a id="logout" href="logout.php" title="<?php echo LOGOUT; ?>"> </a>
</div>
<div class="bodyWrapper">
<img style="filter:chroma();" src="img/x.gif" id="msfilter" alt="" />
<div id="header">
<div id="mtop">
<a id="logo" href="<?php echo HOMEPAGE; ?>" target="_blank" title="<?php echo SERVER_NAME ?>"></a>
<?php
include("Templates/navigation.tpl");
?>
<div class="clear"></div>
</div>
</div>
<div id="mid">
<div class="clear"></div>
<div id="contentOuterContainer">
<div class="contentTitle"> </div>
<div class="contentContainer">
<div id="content" class="a2b">
<?php
if(!empty($id)) {
if(isset($_GET['s'])){
include "Templates/a2b/newdorf.tpl";
}
if(isset($_GET['h'])){
include "Templates/a2b/adventure.tpl";
}
} else
if(isset($w)) {
$enforce = $database->getEnforceArray($w, 0);
if($enforce['from'] != 0) {
if($enforce['vref'] == $village->wid) {
$to = $database->getVillage($enforce['from']);
$ckey = $w;
include ("Templates/a2b/sendback.tpl");
} else {
include ("Templates/a2b/units_" . $session->tribe . ".tpl");
include ("Templates/a2b/search.tpl");
}
} else {
$database->deleteReinf($w);
header("Location: build.php?id=39");
}
} else
if(isset($r)) {
$enforce = $database->getEnforceArray($r, 0);
if($enforce['from'] == $village->wid) {
$to = $database->getVillage($enforce['from']);
$ckey = $r;
include ("Templates/a2b/sendback.tpl");
} else {
include ("Templates/a2b/units_" . $session->tribe . ".tpl");
include ("Templates/a2b/search.tpl");
}
} else {
if(isset($process['0'])) {
$coor = $database->getCoor($process['0']);
include ("Templates/a2b/attack.tpl");
} else {
include ("Templates/a2b/units_" . $session->tribe . ".tpl");
include ("Templates/a2b/search.tpl");
}
}
?>
<div class="clear"> </div>
</div>
<div class="clear"></div>
</div>
<div class="contentFooter"> </div>
</div>
<?php
include("Templates/sideinfo.tpl");
include("Templates/footer.tpl");
include("Templates/header.tpl");
include("Templates/res.tpl");
include("Templates/vname.tpl");
include("Templates/quest.tpl");
?>
</div>
<div id="ce"></div>
</div>
</body>
</html>