3 #################################################################################
4 ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
5 ## --------------------------------------------------------------------------- ##
6 ## Filename build.php ##
7 ## Developed by: Dzoki ##
8 ## License: TravianX Project ##
9 ## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
11 #################################################################################
13 include("GameEngine/Village.php");
14 include("GameEngine/Units.php");
15 if(isset($_GET['newdid'])) {
16 $_SESSION['wid'] = $_GET['newdid'];
17 header("Location: ".$_SERVER['PHP_SELF']);
19 $start = $generator->pageLoadTimeStart();
20 $alliance->procAlliForm($_POST);
21 $technology->procTech($_POST);
22 $market->procMarket($_POST);
23 if(isset($_GET['gid'])) {
24 $_GET['id'] = strval($building->getTypeField($_GET['gid']));
25 } else if(isset($_POST['id'])) {
26 $_GET['id'] = $_POST['id'];
28 if(isset($_POST['t'])){
29 $_GET['t'] = $_POST['t'];
31 if(isset($_GET['id'])) {
32 if (!ctype_digit($_GET['id'])){
35 if($village->resarray
['f'.$_GET['id'].'t'] == 17) {
36 $market->procRemove($_GET);
38 if($village->resarray
['f'.$_GET['id'].'t'] == 18) {
39 $alliance->procAlliance($_GET);
41 if($village->resarray
['f'.$_GET['id'].'t'] == 12 ||
$village->resarray
['f'.$_GET['id'].'t'] == 13 ||
$village->resarray
['f'.$_GET['id'].'t'] == 22) {
42 $technology->procTechno($_GET);
46 if (isset($_POST['a']) == 533374 && isset($_POST['id']) == 39){
47 $units->Settlers($_POST);
50 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
53 <title
><?php
echo SERVER_NAME ?
></title
>
54 <link REL
="shortcut icon" HREF
="favicon.ico"/>
55 <meta http
-equiv
="cache-control" content
="max-age=0" />
56 <meta http
-equiv
="pragma" content
="no-cache" />
57 <meta http
-equiv
="expires" content
="0" />
58 <meta http
-equiv
="imagetoolbar" content
="no" />
59 <meta http
-equiv
="content-type" content
="text/html; charset=UTF-8" />
61 <script src
="mt-full.js?ebe79" type
="text/javascript"></script
>
62 <script src
="unx.js?ebe79" type
="text/javascript"></script
>
63 <script src
="new.js?ebe79" type
="text/javascript"></script
>
64 <link href
="<?php echo GP_LOCATE; ?>lang/en/lang.css?f4b7c" rel
="stylesheet" type
="text/css" />
65 <link href
="<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7c" rel
="stylesheet" type
="text/css" />
67 if($session->gpack
== null || GP_ENABLE
== false) {
69 <link href='".GP_LOCATE
."travian.css?e21d2' rel='stylesheet' type='text/css' />
70 <link href='".GP_LOCATE
."lang/en/lang.css?e21d2' rel='stylesheet' type='text/css' />";
73 <link href='".$session->gpack
."travian.css?e21d2' rel='stylesheet' type='text/css' />
74 <link href='".$session->gpack
."lang/en/lang.css?e21d2' rel='stylesheet' type='text/css' />";
77 <script type
="text/javascript">
79 window
.addEvent('domready', start
);
84 <body
class="v35 ie ie8">
86 <img style
="filter:chroma();" src
="img/x.gif" id
="msfilter" alt
="" />
87 <div id
="dynamic_header">
89 <?php
include("Templates/header.tpl"); ?
>
91 <?php
include("Templates/menu.tpl"); ?
>
92 <div id
="content" class="build">
94 if(isset($_GET['id'])) {
97 if (!ctype_digit($_GET['s'])) {
101 if(isset($_GET['t']))
103 if (!ctype_digit($_GET['t'])) {
107 if (!ctype_digit($_GET['id'])) {
111 if($id=='99' AND $village->resarray
['f99t'] == 40){
112 include("Templates/Build/ww.tpl");
114 if($village->resarray
['f'.$_GET['id'].'t'] == 0 && $_GET['id'] >= 19) {
115 include("Templates/Build/avaliable.tpl");
118 if(isset($_GET['t'])) {
119 if($_GET['t'] == 1) {
120 $_SESSION['loadMarket'] = 1;
122 include("Templates/Build/".$village->resarray
['f'.$_GET['id'].'t']."_".$_GET['t'].".tpl");
124 if(isset($_GET['s'])) {
125 include("Templates/Build/".$village->resarray
['f'.$_GET['id'].'t']."_".$_GET['s'].".tpl");
128 include("Templates/Build/".$village->resarray
['f'.$_GET['id'].'t'].".tpl");
138 include("Templates/quest.tpl");
139 include("Templates/news.tpl");
140 include("Templates/multivillage.tpl");
141 include("Templates/links.tpl");
144 <div
class="clear"></div
>
146 <div
class="footer-stopper"></div
>
147 <div
class="clear"></div
>
150 include("Templates/footer.tpl");
151 include("Templates/res.tpl");
156 Calculated in
<b
><?php
157 echo round(($generator->pageLoadTimeEnd()-$start)*1000);
160 <br
/>Server time
: <span id
="tp1" class="b"><?php
echo date('H:i:s'); ?
></span
>