-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy patha2b.php
78 lines (77 loc) · 3.08 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
<?php
#################################################################################
## ##
## -= YOU MUST NOT REMOVE OR CHANGE THIS NOTICE =- ##
## ##
## --------------------------------------------------------------------------- ##
## ##
## Project: ZravianX ##
## Version: 2011.11.30 ##
## Filename: a2b.php ##
## Developed by: Dzoki ##
## Reworked by: ZZJHONS ##
## License: Creative Commons BY-NC-SA 3.0 ##
## Copyright: ZravianX (c) 2011 - All rights reserved ##
## URLs: http://zravianx.zzjhons.com ##
## Source code: http://www.github.com/ZZJHONS/ZravianX ##
## ##
#################################################################################
include("GameEngine/Village.php");
include("GameEngine/Units.php");
$start = $generator->pageLoadTimeStart();
if(isset($_GET['newdid'])) {
$_SESSION['wid'] = $_GET['newdid'];
header("Location: ".$_SERVER['PHP_SELF']);
} else {
$building->procBuild($_GET);
}
if(isset($_GET['id'])) {
$id = $_GET['id'];
}
if(isset($_GET['w'])) {
$w = $_GET['w'];
}
if(isset($_GET['r'])) {
$r = $_GET['r'];
}
$process = $units->procUnits($_POST);
include ("Templates/head.tpl");
include ("Templates/body.tpl");
?>
<div id="content" class="a2b">
<?php
if(!empty($id)){
include("Templates/a2b/newdorf.tpl");
} else if (isset($w)){
$enforce=$database->getEnforceArray($w,0);
if($enforce['vref']==$village->wid){
$to = $database->getVillage($enforce['from']); $ckey=$w;
include("Templates/a2b/sendback_".$database->getUserField($to['owner'],'tribe',0).".tpl");
} else {
include("Templates/a2b/units_".$session->tribe.".tpl");
include("Templates/a2b/search.tpl");
}
} 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_".$database->getUserField($to['owner'],'tribe',0).".tpl");
} else {
include("Templates/a2b/units_".$session->tribe.".tpl");
include("Templates/a2b/search.tpl");
}
} else {
if (isset($process['0'])){
$coor = $database->getCoor($process['0']);
if($session->tribe == 5){
include("Templates/a2b/attack_5.tpl");
} else {
include("Templates/a2b/attack.tpl");
}
}else{
include("Templates/a2b/units_".$session->tribe.".tpl");
include("Templates/a2b/search.tpl");
}
}
include ("Templates/end.tpl");
?>