just a quick uncomment cause some just run and wonder why it dose nothing
[travianx.git] / build.php
blob2f7a4722b98764bb3765119a610789f88dfbd8b9
1 <?php
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. ##
10 ## ##
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'])){
33 $_GET['id'] = "1";
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">
51 <html>
52 <head>
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" />
66 <?php
67 if($session->gpack == null || GP_ENABLE == false) {
68 echo "
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' />";
71 } else {
72 echo "
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);
80 </script>
81 </head>
84 <body class="v35 ie ie8">
85 <div class="wrapper">
86 <img style="filter:chroma();" src="img/x.gif" id="msfilter" alt="" />
87 <div id="dynamic_header">
88 </div>
89 <?php include("Templates/header.tpl"); ?>
90 <div id="mid">
91 <?php include("Templates/menu.tpl"); ?>
92 <div id="content" class="build">
93 <?php
94 if(isset($_GET['id'])) {
95 if(isset($_GET['s']))
97 if (!ctype_digit($_GET['s'])) {
98 $_GET['s'] = null;
101 if(isset($_GET['t']))
103 if (!ctype_digit($_GET['t'])) {
104 $_GET['t'] = null;
107 if (!ctype_digit($_GET['id'])) {
108 $_GET['id'] = "1";
110 $id = $_GET['id'];
111 if($id=='99' AND $village->resarray['f99t'] == 40){
112 include("Templates/Build/ww.tpl");
113 } else
114 if($village->resarray['f'.$_GET['id'].'t'] == 0 && $_GET['id'] >= 19) {
115 include("Templates/Build/avaliable.tpl");
117 else {
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");
123 } else
124 if(isset($_GET['s'])) {
125 include("Templates/Build/".$village->resarray['f'.$_GET['id'].'t']."_".$_GET['s'].".tpl");
127 else {
128 include("Templates/Build/".$village->resarray['f'.$_GET['id'].'t'].".tpl");
134 </div>
136 <div id="side_info">
137 <?php
138 include("Templates/quest.tpl");
139 include("Templates/news.tpl");
140 include("Templates/multivillage.tpl");
141 include("Templates/links.tpl");
143 </div>
144 <div class="clear"></div>
146 <div class="footer-stopper"></div>
147 <div class="clear"></div>
149 <?php
150 include("Templates/footer.tpl");
151 include("Templates/res.tpl");
153 <div id="stime">
154 <div id="ltime">
155 <div id="ltimeWrap">
156 Calculated in <b><?php
157 echo round(($generator->pageLoadTimeEnd()-$start)*1000);
158 ?></b> ms
160 <br />Server time: <span id="tp1" class="b"><?php echo date('H:i:s'); ?></span>
161 </div>
162 </div>
163 </div>
165 <div id="ce"> </div>
166 </body>
167 </html>