11 include("GameEngine/Village.php");
14 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
17 <title
><?php
echo SERVER_NAME ?
> - Crop finder
</title
>
18 <link REL
="shortcut icon" HREF
="favicon.ico"/>
19 <meta http
-equiv
="cache-control" content
="max-age=0" />
20 <meta http
-equiv
="pragma" content
="no-cache" />
21 <meta http
-equiv
="expires" content
="0" />
22 <meta http
-equiv
="imagetoolbar" content
="no" />
23 <meta http
-equiv
="content-type" content
="text/html; charset=UTF-8" />
24 <script src
="mt-full.js?0faaa" type
="text/javascript"></script
>
25 <script src
="unx.js?0faaa" type
="text/javascript"></script
>
26 <script src
="new.js?0faaa" type
="text/javascript"></script
>
27 <link href
="<?php echo GP_LOCATE; ?>lang/en/compact.css?e21d2" rel
="stylesheet" type
="text/css" />
28 <link href
="<?php echo GP_LOCATE; ?>lang/en/lang.css?e21d2" rel
="stylesheet" type
="text/css" />
30 if($session->gpack
== null || GP_ENABLE
== false) {
32 <link href='".GP_LOCATE
."travian.css?e21d2' rel='stylesheet' type='text/css' />
33 <link href='".GP_LOCATE
."lang/en/lang.css?e21d2' rel='stylesheet' type='text/css' />";
36 <link href='".$session->gpack
."travian.css?e21d2' rel='stylesheet' type='text/css' />
37 <link href='".$session->gpack
."lang/en/lang.css?e21d2' rel='stylesheet' type='text/css' />";
40 <script type
="text/javascript">
41 window
.addEvent('domready', start
);
46 <body
class="v35 ie ie8">
48 <img style
="filter:chroma();" src
="img/x.gif" id
="msfilter" alt
="" />
49 <div id
="dynamic_header">
51 <?php
include("Templates/header.tpl"); ?
>
53 <?php
include("Templates/menu.tpl"); ?
>
54 <div id
="content" class="village1">
58 <img width
="150" src
="gpack/travian_default/img/g/f6.jpg" />
59 <img width
="150" src
="gpack/travian_default/img/g/f1.jpg" />
67 $thiscoor = mysql_Fetch_Assoc(mysql_query("SELECT x,y FROM ".TB_PREFIX
."wdata WHERE id = ".$village->wid
));
69 $x = "IF(ABS(x-".$thiscoor['x'].")<=".WORLD_MAX
.",ABS(x-".$thiscoor['x']."),".(WORLD_MAX
*2+
1)."-ABS(x-".$thiscoor['x']."))";
70 $y = "IF(ABS(y-".$thiscoor['y'].")<=".WORLD_MAX
.",ABS(y-".$thiscoor['y']."),".(WORLD_MAX
*2+
1)."-ABS(y-".$thiscoor['y']."))";
71 $DistanceCalc = "FORMAT(SQRT(POW(".$x.",2)+POW(".$y.",2)),1) AS Distance";
72 $q = "SELECT occupied,fieldtype,x,y,".$DistanceCalc." FROM ".TB_PREFIX
."wdata WHERE fieldtype=".$mc15." OR fieldtype=".$mc9." ORDER BY fieldtype DESC,ABS(Distance)";
73 $croppers = mysql_query($q);
75 echo "<table cellpadding='1' cellspacing='1' class='build_details' border='1' style='border-collapse:collapse'><thead>
76 <tr><td>Type</td><td>Occupied</td><td>Position</td><td>Distance</td></tr></thead>
79 while($row = mysql_fetch_assoc($croppers)){
80 echo "<tbody><tr><td>".($row['fieldtype']==6?
'15-cropper':'9-cropper')."</td><td>";
81 echo ($row['occupied'] == 1) ?
'Occupied' : 'Free';
82 echo "</td><td>".$row['x']."|".$row['y']."</td>
83 <td>".$row['Distance']."</td>
93 include("Templates/quest.tpl");
94 include("Templates/news.tpl");
95 include("Templates/multivillage.tpl");
96 include("Templates/links.tpl");
99 <div
class="clear"></div
>
101 <div
class="footer-stopper"></div
>
102 <div
class="clear"></div
>
105 include("Templates/footer.tpl");
106 include("Templates/res.tpl");
111 Calculated in
<b
><?php
112 echo round(($generator->pageLoadTimeEnd()-$start)*1000);
115 <br
/>Server time
: <span id
="tp1" class="b"><?php
echo date('H:i:s'); ?
></span
>