lang update

This commit is contained in:
Shadow
2014-02-17 08:11:54 +02:00
parent 64b32ed26a
commit 0231274907
4 changed files with 171 additions and 149 deletions
+39
View File
@@ -483,6 +483,45 @@ define("UNDERATTACK","The village is under attack");
define("OASISATTACK","The Oasis is under attack"); define("OASISATTACK","The Oasis is under attack");
define("OASISATTACKS","Oasis Att."); define("OASISATTACKS","Oasis Att.");
//SEND TROOP
define("REINFORCE","Reinforcement");
define("NORMALATTACK","Normal Attack");
define("RAID","Raid");
define("OR","or");
define("SENDTROOP","Send troops");
define("TROOP","Troops");
define("NOTROOP","no troops");
//map
define("DETAIL","Details");
define("ABANDVALLEY","Abandoned valley");
define("UNOCCUOASIS","Unoccupied oasis");
define("OCCUOASIS","Occupied oasis");
define("THERENOINFO","There is no<br>information available.");
define("LANDDIST","Land distribution");
define("TRIBE","Tribe");
define("ALLIANCE","Alliance");
define("OWNER","Owner");
define("POP","Population");
define("REPORT","Report");
define("OPTION","Options");
define("CENTREMAP","Centre map");
define("FNEWVILLAGE","Found new village");
define("CULTUREPOINT","culture points");
define("BUILDRALLY","build a rally point");
define("SETTLERSAVAIL","settlers available");
define("BEGINPRO","beginners protection");
define("SENDMERC","Send merchant(s)");
define("BAN","Player is banned");
define("BUILDMARKET","Build marketplace");
define("PERHOUR","per hour");
define("BONUS","Bonus");
//other
define("VILLAGE","Village");
define("OASIS","Oasis");
define("PLAYER","Player");
//LOGIN.php //LOGIN.php
define("COOKIES","You must have cookies enabled to be able to log in. If you share this computer with other people you should log out after each session for your own safety."); define("COOKIES","You must have cookies enabled to be able to log in. If you share this computer with other people you should log out after each session for your own safety.");
+29 -21
View File
@@ -17,6 +17,7 @@
################################################################################# #################################################################################
if(isset($_GET['z'])) { if(isset($_GET['z'])) {
$currentcoor = $database->getCoor($_GET['z']);++$requse2; $currentcoor = $database->getCoor($_GET['z']);++$requse2;
$y = $currentcoor['y']; $y = $currentcoor['y'];
@@ -117,6 +118,7 @@ $neutralarray = array();
$friendarray = array(); $friendarray = array();
$enemyarray = array(); $enemyarray = array();
$i=0; $i=0;
$i2=0;
//Load coor array //Load coor array
$coorarray = array("53, 137, 90, 157, 53, 177, 16, 157","89, 117, 126, 137, 89, 157, 52, 137","125, 97, 162, 117, 125, 137, 88, 117","161, 77, 198, 97, 161, 117, 124, 97","197, 57, 234, 77, 197, 97, 160, 77","233, 37, 270, 57, 233, 77, 196, 57","269, 17, 306, 37, 269, 57, 232, 37","90, 157, 127, 177, 90, 197, 53, 177","126, 137, 163, 157, 126, 177, 89, 157","162, 117, 199, 137, 162, 157, 125, 137","198, 97, 235, 117, 198, 137, 161, 117","234, 77, 271, 97, 234, 117, 197, 97","270, 57, 307, 77, 270, 97, 233, 77","306, 37, 343, 57, 306, 77, 269, 57","127, 177, 164, 197, 127, 217, 90, 197","163, 157, 200, 177, 163, 197, 126, 177","199, 137, 236, 157, 199, 177, 162, 157","235, 117, 272, 137, 235, 157, 198, 137","271, 97, 308, 117, 271, 137, 234, 117","307, 77, 344, 97, 307, 117, 270, 97","343, 57, 380, 77, 343, 97, 306, 77","164, 197, 201, 217, 164, 237, 127, 217","200, 177, 237, 197, 200, 217, 163, 197","236, 157, 273, 177, 236, 197, 199, 177","272, 137, 309, 157, 272, 177, 235, 157","308, 117, 345, 137, 308, 157, 271, 137","344, 97, 381, 117, 344, 137, 307, 117","380, 77, 417, 97, 380, 117, 343, 97","201, 217, 238, 237, 201, 257, 164, 237","237, 197, 274, 217, 237, 237, 200, 217","273, 177, 310, 197, 273, 217, 236, 197","309, 157, 346, 177, 309, 197, 272, 177","345, 137, 382, 157, 345, 177, 308, 157","381, 117, 418, 137, 381, 157, 344, 137","417, 97, 454, 117, 417, 137, 380, 117","238, 237, 275, 257, 238, 277, 201, 257","274, 217, 311, 237, 274, 257, 237, 237","310, 197, 347, 217, 310, 237, 273, 217","346, 177, 383, 197, 346, 217, 309, 197","382, 157, 419, 177, 382, 197, 345, 177","418, 137, 455, 157, 418, 177, 381, 157","454, 117, 491, 137, 454, 157, 417, 137","275, 257, 312, 277, 275, 297, 238, 277","311, 237, 348, 257, 311, 277, 274, 257","347, 217, 384, 237, 347, 257, 310, 237","383, 197, 420, 217, 383, 237, 346, 217","419, 177, 456, 197, 419, 217, 382, 197","455, 157, 492, 177, 455, 197, 418, 177","491, 137, 528, 157, 491, 177, 454, 157"); $coorarray = array("53, 137, 90, 157, 53, 177, 16, 157","89, 117, 126, 137, 89, 157, 52, 137","125, 97, 162, 117, 125, 137, 88, 117","161, 77, 198, 97, 161, 117, 124, 97","197, 57, 234, 77, 197, 97, 160, 77","233, 37, 270, 57, 233, 77, 196, 57","269, 17, 306, 37, 269, 57, 232, 37","90, 157, 127, 177, 90, 197, 53, 177","126, 137, 163, 157, 126, 177, 89, 157","162, 117, 199, 137, 162, 157, 125, 137","198, 97, 235, 117, 198, 137, 161, 117","234, 77, 271, 97, 234, 117, 197, 97","270, 57, 307, 77, 270, 97, 233, 77","306, 37, 343, 57, 306, 77, 269, 57","127, 177, 164, 197, 127, 217, 90, 197","163, 157, 200, 177, 163, 197, 126, 177","199, 137, 236, 157, 199, 177, 162, 157","235, 117, 272, 137, 235, 157, 198, 137","271, 97, 308, 117, 271, 137, 234, 117","307, 77, 344, 97, 307, 117, 270, 97","343, 57, 380, 77, 343, 97, 306, 77","164, 197, 201, 217, 164, 237, 127, 217","200, 177, 237, 197, 200, 217, 163, 197","236, 157, 273, 177, 236, 197, 199, 177","272, 137, 309, 157, 272, 177, 235, 157","308, 117, 345, 137, 308, 157, 271, 137","344, 97, 381, 117, 344, 137, 307, 117","380, 77, 417, 97, 380, 117, 343, 97","201, 217, 238, 237, 201, 257, 164, 237","237, 197, 274, 217, 237, 237, 200, 217","273, 177, 310, 197, 273, 217, 236, 197","309, 157, 346, 177, 309, 197, 272, 177","345, 137, 382, 157, 345, 177, 308, 157","381, 117, 418, 137, 381, 157, 344, 137","417, 97, 454, 117, 417, 137, 380, 117","238, 237, 275, 257, 238, 277, 201, 257","274, 217, 311, 237, 274, 257, 237, 237","310, 197, 347, 217, 310, 237, 273, 217","346, 177, 383, 197, 346, 217, 309, 197","382, 157, 419, 177, 382, 197, 345, 177","418, 137, 455, 157, 418, 177, 381, 157","454, 117, 491, 137, 454, 157, 417, 137","275, 257, 312, 277, 275, 297, 238, 277","311, 237, 348, 257, 311, 277, 274, 257","347, 217, 384, 237, 347, 257, 310, 237","383, 197, 420, 217, 383, 237, 346, 217","419, 177, 456, 197, 419, 217, 382, 197","455, 157, 492, 177, 455, 197, 418, 177","491, 137, 528, 157, 491, 177, 454, 157");
$yrow = 0; $yrow = 0;
@@ -124,6 +126,8 @@ $yrow = 0;
$row = 0; $row = 0;
$coorindex = 0; $coorindex = 0;
$map_js =''; $map_js ='';
$map_gen='';
$map_content='';
while ($donnees = mysql_fetch_assoc($result2)){ while ($donnees = mysql_fetch_assoc($result2)){
@@ -132,14 +136,17 @@ $friendarray=$database->getAllianceAlly($donnees["aliance_id"],1);
$neutralarray=$database->getAllianceAlly($donnees["aliance_id"],2); $neutralarray=$database->getAllianceAlly($donnees["aliance_id"],2);
$enemyarray=$database->getAllianceWar2($donnees["aliance_id"]); $enemyarray=$database->getAllianceWar2($donnees["aliance_id"]);
//var_dump($friendarray); //var_dump($friendarray);
//echo "(".$friendarray[0]['alli1'].">0 or ".$donnees["aliance_id"].">0) and (".$friendarray[0]['alli1']."==".$donnees["aliance_id"]." or ".$friendarray[0]['alli2']."==".$donnees["aliance_id"].") and (".$session->alliance." != ".$targetalliance." and ".$session->alliance." and ".$targetalliance.")<br>\n"; //echo "(".$friendarray[0]['alli1'].">0 or ".$donnees["aliance_id"].">0) and (".$friendarray[0]['alli1']."==".$donnees["aliance_id"]." or ".$friendarray[0]['alli2']."==".$donnees["aliance_id"].") and (".$session->alliance." != ".$targetalliance." and ".$session->alliance." and ".$targetalliance.")<br>\n";
if (isset($friendarray[0])) {
$friend = (($friendarray[0]['alli1']>0 and $friendarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($friendarray[0]['alli1']==$session->alliance or $friendarray[0]['alli2']==$session->alliance) and ($session->alliance != $targetalliance and $session->alliance and $targetalliance)) ? '1':'0'; $friend = (($friendarray[0]['alli1']>0 and $friendarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($friendarray[0]['alli1']==$session->alliance or $friendarray[0]['alli2']==$session->alliance) and ($session->alliance != $targetalliance and $session->alliance and $targetalliance)) ? '1':'0';
}else $friend='0';
$war = (($enemyarray[0]['alli1']>0 and $enemyarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($enemyarray[0]['alli1']==$session->alliance or $enemyarray[0]['alli2']==$session->alliance) and ($session->alliance != $targetalliance and $session->alliance and $targetalliance)) ? '1':'0'; if (isset($enemyarray[0])) {
$war = (($enemyarray[0]['alli1']>0 and $enemyarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($enemyarray[0]['alli1']==$session->alliance or $enemyarray[0]['alli2']==$session->alliance) and ($session->alliance != $targetalliance and $session->alliance and $targetalliance)) ? '1':'0';
$neutral = (($neutralarray[0]['alli1']>0 and $neutralarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($neutralarray[0]['alli1']==$session->alliance or $neutralarray[0]['alli2']==$session->alliance) and ($session->alliance != $targetalliance and $session->alliance and $targetalliance)) ? '1':'0'; }else $war='0';
if (isset($neutralarray[0])) {
$neutral = (($neutralarray[0]['alli1']>0 and $neutralarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($neutralarray[0]['alli1']==$session->alliance or $neutralarray[0]['alli2']==$session->alliance) and ($session->alliance != $targetalliance and $session->alliance and $targetalliance)) ? '1':'0';
}else $neutral='0';
//echo $targetalliance.">>"; //echo $targetalliance.">>";
//var_dump($friendarray); //var_dump($friendarray);
//echo"|||<br>"; //echo"|||<br>";
@@ -163,8 +170,9 @@ $neutral = (($neutralarray[0]['alli1']>0 and $neutralarray[0]['alli2']>0 and $do
} }
} }
// Map content // Map content
if($donnees['ville_user']==3 && $donnees['ville_name']=='WW Buildingplan'){ if($donnees['ville_user']==3 && $donnees['ville_name']==PLANVILLAGE){
$map_content .= "<div id='i_".$row."_".$i."' class='o99'>$att</div>\r"; $map_content .= "<div id='i_".$row."_".$i."' class='o99'>$att</div>\r";
}else{ }else{
$map_content .= "<div id='i_".$row."_".$i."' class='".$image."'>$att</div>\r"; $map_content .= "<div id='i_".$row."_".$i."' class='".$image."'>$att</div>\r";
@@ -200,7 +208,7 @@ $neutral = (($neutralarray[0]['alli1']>0 and $neutralarray[0]['alli2']>0 and $do
if($yrow == 6 && $i2 == 6) {$map_js .= "]\n";} if($yrow == 6 && $i2 == 6) {$map_js .= "]\n";}
else {$map_js .= ",";} else {$map_js .= ",";}
} }
$regcount += 1; //$regcount += 1;
} }
else {$map_js .= "]";} else {$map_js .= "]";}
@@ -215,18 +223,18 @@ $neutral = (($neutralarray[0]['alli1']>0 and $neutralarray[0]['alli2']>0 and $do
<div id="map"> <div id="map">
<script type="text/javascript"> <script type="text/javascript">
var text_k = {} var text_k = {}
text_k.details = 'Details'; text_k.details = '<?php echo DETAIL;?>';
text_k.spieler = 'Player'; text_k.spieler = '<?php echo PLAYER;?>';
text_k.einwohner = 'Population'; text_k.einwohner = '<?php echo POP;?>';
text_k.allianz = 'Alliance'; text_k.allianz = '<?php echo ALLIANCE;?>';
text_k.verlassenes_tal = 'Abandoned valley'; text_k.verlassenes_tal = '<?php echo ABANDVALLEY;?>';
text_k.besetztes_tal = 'Occupied oasis'; text_k.besetztes_tal = '<?php echo OCCUOASIS;?>';
text_k.freie_oase = 'Unoccupied oasis'; text_k.freie_oase = '<?php echo UNOCCUOASIS;?>';
var text_x = {} var text_x = {}
text_x.r1 = 'Lumber'; text_x.r1 = '<?php echo LUMBER;?>';
text_x.r2 = 'Clay'; text_x.r2 = '<?php echo CLAY;?>';
text_x.r3 = 'Iron'; text_x.r3 = '<?php echo IRON;?>';
text_x.r4 = 'Crop'; text_x.r4 = '<?php echo CROP;?>';
</script> </script>
<div id="map_content"><?php echo $map_content;?></div> <div id="map_content"><?php echo $map_content;?></div>
<div id="map_rulers"><?php <div id="map_rulers"><?php
@@ -270,6 +278,6 @@ $neutral = (($neutralarray[0]['alli1']>0 and $neutralarray[0]['alli2']>0 and $do
<?php if($session->goldclub != 0){echo "<a href=\"crop_finder.php\"><img src=\"".GP_LOCATE."img/misc/cropfinder.gif\" /> Crop Finder</a>";}?> <?php if($session->goldclub != 0){echo "<a href=\"crop_finder.php\"><img src=\"".GP_LOCATE."img/misc/cropfinder.gif\" /> Crop Finder</a>";}?>
</form> </form>
</div> </div>
<table cellpadding="1" cellspacing="1" id="map_infobox" class="default"><thead><tr><th colspan="2">Details</th></tr></thead><tbody><tr><th>Player</th><td>-</td></tr><tr><th>Population</th><td>-</td></tr><tr><th>Alliance</th><td></td></tr></tbody></table> <table cellpadding="1" cellspacing="1" id="map_infobox" class="default"><thead><tr><th colspan="2"><?php echo DETAIL;?></th></tr></thead><tbody><tr><th><?php echo PLAYER;?></th><td>-</td></tr><tr><th><?php echo POP;?></th><td>-</td></tr><tr><th><?php echo ALLIANCE;?></th><td></td></tr></tbody></table>
</div> </div>
</div> </div>
+28 -22
View File
@@ -133,6 +133,8 @@ $yrow = 0;
$row = 0; $row = 0;
$coorindex = 0; $coorindex = 0;
$map_js =''; $map_js ='';
$map_content='';
$map_gen='';
$coorarray = array( $coorarray = array(
"48, 253, 85, 273, 48, 293, 11, 273" "48, 253, 85, 273, 48, 293, 11, 273"
,"84, 233, 121, 253, 84, 273, 47, 253" ,"84, 233, 121, 253, 84, 273, 47, 253"
@@ -313,12 +315,15 @@ $neutralarray=$database->getAllianceAlly($donnees["aliance_id"],2);
$enemyarray=$database->getAllianceWar2($donnees["aliance_id"]); $enemyarray=$database->getAllianceWar2($donnees["aliance_id"]);
//var_dump($friendarray); //var_dump($friendarray);
//echo "(".$friendarray[0]['alli1'].">0 or ".$donnees["aliance_id"].">0) and (".$friendarray[0]['alli1']."==".$donnees["aliance_id"]." or ".$friendarray[0]['alli2']."==".$donnees["aliance_id"].") and (".$session->alliance." != ".$targetalliance." and ".$session->alliance." and ".$targetalliance.")<br>\n"; //echo "(".$friendarray[0]['alli1'].">0 or ".$donnees["aliance_id"].">0) and (".$friendarray[0]['alli1']."==".$donnees["aliance_id"]." or ".$friendarray[0]['alli2']."==".$donnees["aliance_id"].") and (".$session->alliance." != ".$targetalliance." and ".$session->alliance." and ".$targetalliance.")<br>\n";
if (isset($friendarray[0])) {
$friend = (($friendarray[0]['alli1']>0 and $friendarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($friendarray[0]['alli1']==$session->alliance or $friendarray[0]['alli2']==$session->alliance) and ($session->alliance != $targetalliance and $session->alliance and $targetalliance)) ? '1':'0'; $friend = (($friendarray[0]['alli1']>0 and $friendarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($friendarray[0]['alli1']==$session->alliance or $friendarray[0]['alli2']==$session->alliance) and ($session->alliance != $targetalliance and $session->alliance and $targetalliance)) ? '1':'0';
}else $friend='0';
$war = (($enemyarray[0]['alli1']>0 and $enemyarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($enemyarray[0]['alli1']==$session->alliance or $enemyarray[0]['alli2']==$session->alliance) and ($session->alliance != $targetalliance and $session->alliance and $targetalliance)) ? '1':'0'; if (isset($enemyarray[0])) {
$war = (($enemyarray[0]['alli1']>0 and $enemyarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($enemyarray[0]['alli1']==$session->alliance or $enemyarray[0]['alli2']==$session->alliance) and ($session->alliance != $targetalliance and $session->alliance and $targetalliance)) ? '1':'0';
$neutral = (($neutralarray[0]['alli1']>0 and $neutralarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($neutralarray[0]['alli1']==$session->alliance or $neutralarray[0]['alli2']==$session->alliance) and ($session->alliance != $targetalliance and $session->alliance and $targetalliance)) ? '1':'0'; }else $war='0';
if (isset($neutralarray[0])) {
$neutral = (($neutralarray[0]['alli1']>0 and $neutralarray[0]['alli2']>0 and $donnees["aliance_id"]>0) and ($neutralarray[0]['alli1']==$session->alliance or $neutralarray[0]['alli2']==$session->alliance) and ($session->alliance != $targetalliance and $session->alliance and $targetalliance)) ? '1':'0';
}else $neutral='0';
//echo $targetalliance.">>"; //echo $targetalliance.">>";
//var_dump($friendarray); //var_dump($friendarray);
@@ -327,8 +332,7 @@ $neutral = (($neutralarray[0]['alli1']>0 and $neutralarray[0]['alli2']>0 and $do
//echo in_array($targetalliance,$friendarray); //echo in_array($targetalliance,$friendarray);
$image = ($donnees['map_occupied'] == 1 && $donnees['map_fieldtype'] > 0)?(($donnees['ville_user'] == $session->uid)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b30': 'b20' :'b10' : 'b00') : (($targetalliance != 0)? ($friend==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b31': 'b21' :'b11' : 'b01') : ($war==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b32': 'b22' :'b12' : 'b02') : ($neutral==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b35': 'b25' :'b15' : 'b05') : ($targetalliance == $session->alliance? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b33': 'b23' :'b13' : 'b03') : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))))) : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))) : $donnees['map_image']; $image = ($donnees['map_occupied'] == 1 && $donnees['map_fieldtype'] > 0)?(($donnees['ville_user'] == $session->uid)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b30': 'b20' :'b10' : 'b00') : (($targetalliance != 0)? ($friend==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b31': 'b21' :'b11' : 'b01') : ($war==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b32': 'b22' :'b12' : 'b02') : ($neutral==1? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b35': 'b25' :'b15' : 'b05') : ($targetalliance == $session->alliance? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b33': 'b23' :'b13' : 'b03') : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))))) : ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b34': 'b24' :'b14' : 'b04'))) : $donnees['map_image'];
// Map Attacks by Shadow and MisterX // Map Attacks by Shadow and MisterX
$att = ''; $att = '';
if($session->plus) { if($session->plus) {
$wref = $village->wid; $wref = $village->wid;
@@ -342,7 +346,8 @@ $neutral = (($neutralarray[0]['alli1']>0 and $neutralarray[0]['alli2']>0 and $do
$att = '<span class=\'m6\' ></span>'; $att = '<span class=\'m6\' ></span>';
} }
} }
// Map content // Map content
if($donnees['ville_user']==3 && $donnees['ville_name']=='WW Buildingplan'){ if($donnees['ville_user']==3 && $donnees['ville_name']=='WW Buildingplan'){
$map_content .= "<div id='i_".$row."_".$i."' class='o99'>$att</div>\r"; $map_content .= "<div id='i_".$row."_".$i."' class='o99'>$att</div>\r";
@@ -380,7 +385,7 @@ $neutral = (($neutralarray[0]['alli1']>0 and $neutralarray[0]['alli2']>0 and $do
if($yrow == 12 && $i2 == 12) {$map_js .= "]\n";} if($yrow == 12 && $i2 == 12) {$map_js .= "]\n";}
else {$map_js .= ",";} else {$map_js .= ",";}
} }
$regcount += 1; //$regcount += 1;
} }
else {$map_js .= "]";} else {$map_js .= "]";}
@@ -401,21 +406,22 @@ $neutral = (($neutralarray[0]['alli1']>0 and $neutralarray[0]['alli2']>0 and $do
<div id="map"> <div id="map">
<script type="text/javascript"> <script type="text/javascript">
var text_k = {} var text_k = {}
text_k.details = 'Details'; text_k.details = '<?php echo DETAIL;?>';
text_k.spieler = 'Player'; text_k.spieler = '<?php echo PLAYER;?>';
text_k.einwohner = 'Population'; text_k.einwohner = '<?php echo POP;?>';
text_k.allianz = 'Alliance'; text_k.allianz = '<?php echo ALLIANCE;?>';
text_k.verlassenes_tal = 'Abandoned valley'; text_k.verlassenes_tal = '<?php echo ABANDVALLEY;?>';
text_k.besetztes_tal = 'Occupied oasis'; text_k.besetztes_tal = '<?php echo OCCUOASIS;?>';
text_k.freie_oase = 'Unoccupied oasis'; text_k.freie_oase = '<?php echo UNOCCUOASIS;?>';
var text_x = {} var text_x = {}
text_x.r1 = 'Lumber'; text_x.r1 = '<?php echo LUMBER;?>';
text_x.r2 = 'Clay'; text_x.r2 = '<?php echo CLAY;?>';
text_x.r3 = 'Iron'; text_x.r3 = '<?php echo IRON;?>';
text_x.r4 = 'Crop'; text_x.r4 = '<?php echo CROP;?>';
</script> </script>
<div id="map_content"> <div id="map_content">
<?php echo $map_content;?> <?php echo $map_content;?>
</div> </div>
<div id="map_rulers"><?php <div id="map_rulers"><?php
for($i=0;$i<=12;$i++){ for($i=0;$i<=12;$i++){
@@ -454,7 +460,7 @@ $neutral = (($neutralarray[0]['alli1']>0 and $neutralarray[0]['alli2']>0 and $do
<input type="image" id="btn_ok" class="dynamic_img" value="ok" name="s1" src="img/x.gif" alt="OK" /> <input type="image" id="btn_ok" class="dynamic_img" value="ok" name="s1" src="img/x.gif" alt="OK" />
</form> </form>
</div> </div>
<table cellpadding="1" cellspacing="1" id="map_infobox" class="default"><thead><tr><th colspan="2">Details</th></tr></thead><tbody><tr><th>Player</th><td>-</td></tr><tr><th>Population</th><td>-</td></tr><tr><th>Alliance</th><td>-</td></tr></tbody></table> <table cellpadding="1" cellspacing="1" id="map_infobox" class="default"><thead><tr><th colspan="2"><?php echo DETAIL;?></th></tr></thead><tbody><tr><th><?php echo PLAYER;?></th><td>-</td></tr><tr><th><?php echo POP;?></th><td>-</td></tr><tr><th><?php echo ALLIANCE;?></th><td></td></tr></tbody></table>
</div> </div>
</div> </div>
</div> </div>
+75 -106
View File
@@ -1,35 +1,21 @@
<div id="content" class="map"> <div id="content" class="map">
<?php <?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Project: TravianZ ##
## Version: 01.09.2013 ##
## Filename vilview.php ##
## Developed by: Advocaite , yi12345 , Shadow ##
## Fixed by: Shadow - Tribe Names , correct view resource ##
## License: TravianZ Project ##
## Copyright: TravianZ (c) 2010-2013. All rights reserved. ##
## URLs: http://travian.shadowss.ro ##
## Source code: http://github.com/Shadowss/TravianZ-by-Shadow/ ##
## ##
#################################################################################
$basearray = $database->getMInfo($_GET['d']); $basearray = $database->getMInfo($_GET['d']);
$uinfo = $database->getVillage($basearray['id']); $uinfo = $database->getVillage($basearray['id']);
$oasis1 = mysql_query('SELECT * FROM `' . TB_PREFIX . 'odata` WHERE `wref` = ' . mysql_real_escape_string($_GET['d'])); $oasis1 = mysql_query('SELECT * FROM `' . TB_PREFIX . 'odata` WHERE `wref` = ' . mysql_real_escape_string($_GET['d']));
$oasis = mysql_fetch_assoc($oasis1); $oasis = mysql_fetch_assoc($oasis1);
$access=$session->access;
?> ?>
<h1><?php if($basearray['fieldtype']!=0){ <h1><?php if($basearray['fieldtype']!=0){
echo !$basearray['occupied']? $basearray['fieldtype']? "Abandoned valley" : "Unoccupied oasis" : $basearray['name']; echo " (".$basearray['x']."|".$basearray['y'].")"; echo !$basearray['occupied']? ABANDVALLEY : $basearray['name']; echo " (".$basearray['x']."|".$basearray['y'].")";
}else{ }else{
echo $oasis['name']; echo " (".$basearray['x']."|".$basearray['y'].")"; echo !$oasis['conqured']? UNOCCUOASIS : OCCUOASIS; echo " (".$basearray['x']."|".$basearray['y'].")";
$otext = !$oasis['conqured']? UNOCCUOASIS : OCCUOASIS;
} ?></h1> } ?></h1>
<?php if($basearray['occupied'] && $basearray['capital']) { echo "<div id=\"dmain\">(capital)</div>"; } <?php if($basearray['occupied'] && $basearray['capital']) { echo "<div id=\"dmain\">(capital)</div>"; }
if($uinfo['owner']==3 && $uinfo['name']=='WW Buildingplan'){ if($uinfo['owner']==3 && $uinfo['name']==PLANVILLAGE){
?> ?>
<img src="img/x.gif" id="detailed_map" class="f99" alt="WW buildingplan" /> <img src="img/x.gif" id="detailed_map" class="f99" alt="<?php echo PLANVILLAGE;?>" />
<?php }else{ ?> <?php }else{ ?>
<img src="img/x.gif" id="detailed_map" class="<?php echo ($basearray['fieldtype'] == 0)? 'w'.$basearray['oasistype'] : 'f'.$basearray['fieldtype'] ?>" alt="<?php <img src="img/x.gif" id="detailed_map" class="<?php echo ($basearray['fieldtype'] == 0)? 'w'.$basearray['oasistype'] : 'f'.$basearray['fieldtype'] ?>" alt="<?php
switch($basearray['fieldtype']) { switch($basearray['fieldtype']) {
@@ -73,41 +59,41 @@ case 0:
switch($basearray['oasistype']) { switch($basearray['oasistype']) {
case 1: case 1:
case 2: case 2:
$tt = "+25% lumber per hour\" title=\"+25% lumber per hour"; $tt = "+25% ".LUMBER." ".PERHOUR."\" title=\"+25% ".LUMBER." ".PERHOUR;
$ttt = "<td class=\"ico\"><img class=\"r1\" src=\"img/x.gif\" title=\"".LUMBER."\"> 25% ".LUMBER."</td>"; $ttt = "<td class=\"ico\"><img class=\"r1\" src=\"img/x.gif\" title=\"".LUMBER."\"> 25% ".LUMBER."</td>";
break; break;
case 3: case 3:
$tt = "+25% lumber and +25% crop per hour\" title=\"+25% lumber and +25% crop per hour"; $tt = "+25% ".LUMBER." and +25% ".CROP." ".PERHOUR."\" title=\"+25% ".LUMBER." and +25% ".CROP." ".PERHOUR;
$ttt = "<td class=\"ico\"><img class=\"r1\" src=\"img/x.gif\" title=\"".LUMBER."\"> 25% ".LUMBER."</td> $ttt = "<td class=\"ico\"><img class=\"r1\" src=\"img/x.gif\" title=\"".LUMBER."\"> 25% ".LUMBER."</td>
<tr><td class=\"ico\"><img class=\"r4\" src=\"img/x.gif\" title=\"".CROP."\"> 25% ".CROP."</td></tr>"; <tr><td class=\"ico\"><img class=\"r4\" src=\"img/x.gif\" title=\"".CROP."\"> 25% ".CROP."</td></tr>";
break; break;
case 4: case 4:
case 5: case 5:
$tt = "+25% clay per hour\" title=\"+25% clay per hour"; $tt = "+25% ".CLAY." ".PERHOUR."\" title=\"+25% ".CLAY." ".PERHOUR;
$ttt = "<td class=\"ico\"><img class=\"r2\" src=\"img/x.gif\" title=\"".CLAY."\"> 25% ".CLAY."</td>"; $ttt = "<td class=\"ico\"><img class=\"r2\" src=\"img/x.gif\" title=\"".CLAY."\"> 25% ".CLAY."</td>";
break; break;
case 6: case 6:
$tt = "+25% clay and +25% crop per hour\" title=\"+25% clay and +25% crop per hour"; $tt = "+25% ".CLAY." and +25% ".CROP." ".PERHOUR."\" title=\"+25% ".CLAY." and +25% ".CROP." ".PERHOUR;
$ttt = "<td class=\"ico\"><img class=\"r2\" src=\"img/x.gif\" title=\"".CLAY."\"> 25% ".CLAY."</td> $ttt = "<td class=\"ico\"><img class=\"r2\" src=\"img/x.gif\" title=\"".CLAY."\"> 25% ".CLAY."</td>
<tr><td class=\"ico\"><img class=\"r4\" src=\"img/x.gif\" title=\"".CROP."\"> 25% ".CROP."</td></tr>"; <tr><td class=\"ico\"><img class=\"r4\" src=\"img/x.gif\" title=\"".CROP."\"> 25% ".CROP."</td></tr>";
break; break;
case 7: case 7:
case 8: case 8:
$tt = "+25% iron per hour\" title=\"+25% iron per hour"; $tt = "+25% ".IRON." ".PERHOUR."\" title=\"+25% ".IRON." ".PERHOUR;
$ttt = "<td class=\"ico\"><img class=\"r3\" src=\"img/x.gif\" title=\"".IRON."\"> 25% ".IRON."</td>"; $ttt = "<td class=\"ico\"><img class=\"r3\" src=\"img/x.gif\" title=\"".IRON."\"> 25% ".IRON."</td>";
break; break;
case 9: case 9:
$tt = "+25% iron and +25% crop per hour\" title=\"+25% iron and +25% crop per hour"; $tt = "+25% ".IRON." and +25% ".CROP." ".PERHOUR."\" title=\"+25% ".IRON." and +25% ".CROP." ".PERHOUR;
$ttt = "<td class=\"ico\"><img class=\"r3\" src=\"img/x.gif\" title=\"".IRON."\"> 25% ".IRON."</td> $ttt = "<td class=\"ico\"><img class=\"r3\" src=\"img/x.gif\" title=\"".IRON."\"> 25% ".IRON."</td>
<tr><td class=\"ico\"><img class=\"r4\" src=\"img/x.gif\" title=\"".CROP."\"> 25% ".CROP."</td></tr>"; <tr><td class=\"ico\"><img class=\"r4\" src=\"img/x.gif\" title=\"".CROP."\"> 25% ".CROP."</td></tr>";
break; break;
case 10: case 10:
case 11: case 11:
$tt = "+25% crop per hour\" title=\"+25% crop per hour"; $tt = "+25% ".CROP." ".PERHOUR."\" title=\"+25% ".CROP." ".PERHOUR;
$ttt = "<td class=\"ico\"><img class=\"r4\" src=\"img/x.gif\" title=\"".CROP."\"> 25% ".CROP."</td>"; $ttt = "<td class=\"ico\"><img class=\"r4\" src=\"img/x.gif\" title=\"".CROP."\"> 25% ".CROP."</td>";
break; break;
case 12: case 12:
$tt = "+50% crop per hour\" title=\"+50% crop per hour"; $tt = "+50% ".CROP." ".PERHOUR."\" title=\"+50% ".CROP." ".PERHOUR;
$ttt = "<td class=\"ico\"><img class=\"r4\" src=\"img/x.gif\" title=\"".CROP."\"> 50% ".CROP."</td>"; $ttt = "<td class=\"ico\"><img class=\"r4\" src=\"img/x.gif\" title=\"".CROP."\"> 50% ".CROP."</td>";
break; break;
} }
@@ -133,12 +119,12 @@ if($oasis['owner'] == 2){
<table cellpadding="1" cellspacing="1" id="troop_info" class="tableNone"> <table cellpadding="1" cellspacing="1" id="troop_info" class="tableNone">
<thead><tr> <thead><tr>
<th colspan="3">Troops:</th> <th colspan="3"><?php echo TROOP;?>:</th>
</tr></thead> </tr></thead>
<tbody> <tbody>
<?php <?php
$unit = $database->getUnit($_GET['d']); $unit = $database->getUnit($_GET['d']);
$unarray = array(31=>"Rat","Spider","Snake","Bat","Wild Boar","Wolf","Bear","Crocodile","Tiger","Elephant"); $unarray = array(31=>U31,U32,U33,U34,U35,U36,U37,U38,U39,U40);
$a = 0; $a = 0;
for ($i = 31; $i <= 40; $i++) { for ($i = 31; $i <= 40; $i++) {
if($unit['u'.$i]){ if($unit['u'.$i]){
@@ -152,7 +138,7 @@ if($oasis['owner'] == 2){
} }
} }
if($a == 10){ if($a == 10){
echo '<tr><td>no troops</td></tr>'; echo '<tr><td><?php echo NOTROOP;?></td></tr>';
} }
@@ -162,7 +148,7 @@ if($oasis['owner'] == 2){
<table cellpadding="1" cellspacing="1" id="troop_info" class="tableNone rep"> <table cellpadding="1" cellspacing="1" id="troop_info" class="tableNone rep">
<thead><tr> <thead><tr>
<th>Reports:</th> <th><?php echo REPORT;?>:</th>
</tr></thead> </tr></thead>
<tbody> <tbody>
<?php <?php
@@ -192,8 +178,7 @@ if($type==18 or $type==19 or $type==20 or $type==21){
} }
}else{ ?> }else{ ?>
<tr> <tr>
<td>There is no <td><?php echo THERENOINFO;?></td>
<br>information available.</td>
</tr> </tr>
<?php } <?php }
@@ -204,6 +189,7 @@ if($query != 0){
while($row = mysql_fetch_array($result)){ while($row = mysql_fetch_array($result)){
$dataarray = explode(",",$row['data']); $dataarray = explode(",",$row['data']);
$type = $row['ntype']; $type = $row['ntype'];
$topic=$row['topic'];
echo "<tr><td>"; echo "<tr><td>";
if($type==18 or $type==19 or $type==20 or $type==21){ if($type==18 or $type==19 or $type==20 or $type==21){
echo "<img src=\"gpack/travian_default/img/scouts/$type.gif\" alt=\"".$topic."\" title=\"".$topic."\" />"; echo "<img src=\"gpack/travian_default/img/scouts/$type.gif\" alt=\"".$topic."\" title=\"".$topic."\" />";
@@ -216,8 +202,7 @@ if($type==18 or $type==19 or $type==20 or $type==21){
} }
}else{ ?> }else{ ?>
<tr> <tr>
<td>There is no <td><?php echo THERENOINFO;?></td>
<br>information available.</td>
</tr> </tr>
<?php }} ?> <?php }} ?>
</tbody> </tbody>
@@ -230,7 +215,7 @@ if($type==18 or $type==19 or $type==20 or $type==21){
$uinfo = $database->getUserArray($oasis['owner'],1); ?> $uinfo = $database->getUserArray($oasis['owner'],1); ?>
<tbody><tr> <tbody><tr>
<th>Tribe</th> <th>Tribe</th>
<td><?php switch($uinfo['tribe']) { case 1: echo Romans; break; case 2: echo Teutons; break; case 3: echo Gauls; break; case 4: echo Nature; break; case 5: echo Natars; break;} ?></td> <td><?php switch($uinfo['tribe']) { case 1: echo TRIBE1; break; case 2: echo TRIBE2; break; case 3: echo TRIBE3; break; case 4: echo TRIBE4; break; case 5: echo TRIBE5; break;} ?></td>
</tr> </tr>
<tr> <tr>
<th>Alliance</th> <th>Alliance</th>
@@ -279,6 +264,7 @@ if($query != 0){
while($row = mysql_fetch_array($result)){ while($row = mysql_fetch_array($result)){
$dataarray = explode(",",$row['data']); $dataarray = explode(",",$row['data']);
$type = $row['ntype']; $type = $row['ntype'];
$topic=$row['topic'];
echo "<tr><td>"; echo "<tr><td>";
if($type==18 or $type==19 or $type==20 or $type==21){ if($type==18 or $type==19 or $type==20 or $type==21){
echo "<img src=\"gpack/travian_default/img/scouts/$type.gif\" alt=\"".$topic."\" title=\"".$topic."\" />"; echo "<img src=\"gpack/travian_default/img/scouts/$type.gif\" alt=\"".$topic."\" title=\"".$topic."\" />";
@@ -291,8 +277,7 @@ if($type==18 or $type==19 or $type==20 or $type==21){
} }
}else{ ?> }else{ ?>
<tr> <tr>
<td>There is no <td><?php echo THERENOINFO;?></td>
<br>information available.</td>
</tr> </tr>
<?php } <?php }
@@ -303,6 +288,7 @@ if($query != 0){
while($row = mysql_fetch_array($result)){ while($row = mysql_fetch_array($result)){
$dataarray = explode(",",$row['data']); $dataarray = explode(",",$row['data']);
$type = $row['ntype']; $type = $row['ntype'];
$topic=$row['topic'];
echo "<tr><td>"; echo "<tr><td>";
if($type==18 or $type==19 or $type==20 or $type==21){ if($type==18 or $type==19 or $type==20 or $type==21){
echo "<img src=\"gpack/travian_default/img/scouts/$type.gif\" alt=\"".$topic."\" title=\"".$topic."\" />"; echo "<img src=\"gpack/travian_default/img/scouts/$type.gif\" alt=\"".$topic."\" title=\"".$topic."\" />";
@@ -315,8 +301,7 @@ if($type==18 or $type==19 or $type==20 or $type==21){
} }
}else{ ?> }else{ ?>
<tr> <tr>
<td>There is no <td><?php echo THERENOINFO;?></td>
<br>information available.</td>
</tr> </tr>
<?php }} ?> <?php }} ?>
</tbody> </tbody>
@@ -327,30 +312,30 @@ if($type==18 or $type==19 or $type==20 or $type==21){
<table cellpadding="1" cellspacing="1" id="distribution" class="tableNone"> <table cellpadding="1" cellspacing="1" id="distribution" class="tableNone">
<thead><tr> <thead><tr>
<th colspan="3">Land distribution</th> <th colspan="3"><?php echo LANDDIST;?></th>
</tr></thead> </tr></thead>
<tbody> <tbody>
<tr> <tr>
<td class="ico"><img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /></td> <td class="ico"><img class="r1" src="img/x.gif" alt="<?php echo LUMBER;?>" title="<?php echo LUMBER;?>" /></td>
<td class="val"><?php echo $landd['0']; ?></td> <td class="val"><?php echo $landd['0']; ?></td>
<td class="desc">Woodcutters</td> <td class="desc"><?php echo WOODCUTTER;?></td>
</tr> </tr>
<tr> <tr>
<td class="ico"><img class="r2" src="img/x.gif" alt="Clay" title="Clay" /></td> <td class="ico"><img class="r2" src="img/x.gif" alt="<?php echo CLAY;?>" title="<?php echo CLAY;?>" /></td>
<td class="val"><?php echo $landd['1']; ?></td> <td class="val"><?php echo $landd['1']; ?></td>
<td class="desc">Clay Pits</td> <td class="desc"><?php echo CLAYPIT;?></td>
</tr> </tr>
<tr> <tr>
<td class="ico"><img class="r3" src="img/x.gif" alt="Iron" title="Iron" /></td> <td class="ico"><img class="r3" src="img/x.gif" alt="<?php echo IRON;?>" title="<?php echo IRON;?>" /></td>
<td class="val"><?php echo $landd['2']; ?></td> <td class="val"><?php echo $landd['2']; ?></td>
<td class="desc">Iron Mines</td> <td class="desc"><?php echo IRONMINE;?></td>
</tr> </tr>
<tr> <tr>
<td class="ico"><img class="r4" src="img/x.gif" alt="Crop" title="Crop" /></td> <td class="ico"><img class="r4" src="img/x.gif" alt="<?php echo CROP;?>" title="<?php echo CROP;?>" /></td>
<td class="val"><?php echo $landd['3']; ?></td> <td class="val"><?php echo $landd['3']; ?></td>
<td class="desc">Croplands</td> <td class="desc"><?php echo CROPLAND;?></td>
</tr> </tr>
</tbody> </tbody>
@@ -360,35 +345,35 @@ if($type==18 or $type==19 or $type==20 or $type==21){
else { else {
?> ?>
<table cellpadding="1" cellspacing="1" id="village_info" class="tableNone"> <table cellpadding="1" cellspacing="1" id="village_info" class="tableNone">
<thead><tr> <!--<thead>
<th colspan="2"><div><?php echo $basearray['name']; ?></div>&nbsp;(<?php echo $basearray['x']; ?>|<?php echo $basearray['y']; ?>)</th> <th colspan="2"><div><?php echo $basearray['name']; ?></div>&nbsp;(<?php echo $basearray['x']; ?>|<?php echo $basearray['y']; ?>)</th>
</tr></thead> </tr></thead>-->
<?php <?php
$uinfo = $database->getUserArray($basearray['owner'],1); ?> $uinfo = $database->getUserArray($basearray['owner'],1); ?>
<tbody><tr> <tbody><tr>
<th>Tribe</th> <th><?php echo TRIBE;?></th>
<td><?php switch($uinfo['tribe']) { case 1: echo Romans; break; case 2: echo Teutons; break; case 3: echo Gauls; break; case 4: echo Nature; break; case 5: echo Natars; break;} ?></td> <td><?php switch($uinfo['tribe']) { case 1: echo TRIBE1; break; case 2: echo TRIBE2; break; case 3: echo TRIBE3; break; case 4: echo TRIBE4; break; case 5: echo TRIBE5; break;} ?></td>
</tr> </tr>
<tr> <tr>
<th>Alliance</th> <th><?php echo ALLIANCE;?></th>
<?php if($uinfo['alliance'] == 0){ <?php if($uinfo['alliance'] == 0){
echo '<td>-</td>'; echo '<td>-</td>';
} else echo ' } else echo '
<td><a href="allianz.php?aid='.$uinfo['alliance'].' ">'.$database->getUserAlliance($basearray['owner']).'</a></td>'; ?> <td><a href="allianz.php?aid='.$uinfo['alliance'].' ">'.$database->getUserAlliance($basearray['owner']).'</a></td>'; ?>
</tr> </tr>
<tr> <tr>
<th>Owner</th> <th><?php echo OWNER;?></th>
<td><a href="spieler.php?uid=<?php echo $basearray['owner']; ?>"><?php echo $database->getUserField($basearray['owner'],'username',0); ?></a></td> <td><a href="spieler.php?uid=<?php echo $basearray['owner']; ?>"><?php echo $database->getUserField($basearray['owner'],'username',0); ?></a></td>
</tr> </tr>
<tr> <tr>
<th>Population</th> <th><?php echo POP;?></th>
<td><?php echo $basearray['pop']; ?></td> <td><?php echo $basearray['pop']; ?></td>
</tr></tbody> </tr></tbody>
</table> </table>
<table cellpadding="1" cellspacing="1" id="troop_info" class="tableNone rep"> <table cellpadding="1" cellspacing="1" id="troop_info" class="tableNone rep">
<thead><tr> <thead><tr>
<th>Reports:</th> <th><?php echo REPORT;?>:</th>
</tr></thead> </tr></thead>
<tbody> <tbody>
<?php <?php
@@ -405,6 +390,7 @@ if($query != 0){
while($row = mysql_fetch_array($result)){ while($row = mysql_fetch_array($result)){
$dataarray = explode(",",$row['data']); $dataarray = explode(",",$row['data']);
$type = $row['ntype']; $type = $row['ntype'];
$topic=$row['topic'];
echo "<tr><td>"; echo "<tr><td>";
if($type==18 or $type==19 or $type==20 or $type==21 or $type==22){ if($type==18 or $type==19 or $type==20 or $type==21 or $type==22){
echo "<img src=\"gpack/travian_default/img/scouts/$type.gif\" alt=\"".$topic."\" title=\"".$topic."\" />"; echo "<img src=\"gpack/travian_default/img/scouts/$type.gif\" alt=\"".$topic."\" title=\"".$topic."\" />";
@@ -412,26 +398,12 @@ if($type==18 or $type==19 or $type==20 or $type==21 or $type==22){
echo "<img src=\"img/x.gif\" class=\"iReport iReport".$row['ntype']."\" title=\"".$topic."\"> "; echo "<img src=\"img/x.gif\" class=\"iReport iReport".$row['ntype']."\" title=\"".$topic."\"> ";
} }
$date = $generator->procMtime($row['time']); $date = $generator->procMtime($row['time']);
echo "<a href=\"berichte.php?id=".$row['id']."&vill=".$row['id']."\">".$date[0]." ".date('H:i',$row['time'])."</a> "; echo "<a href=\"berichte.php?id=".$row['id']."&vill=".$row['id']."\" title=\"".$topic."\">".$date[0]." ".date('H:i',$row['time'])."</a> ";
echo "</td></tr>";
}
while($row = mysql_fetch_array($result)){
$dataarray = explode(",",$row['data']);
$type = $row['ntype'];
echo "<tr><td>";
if($type==18 or $type==19 or $type==20 or $type==21 or $type==22){
echo "<img src=\"gpack/travian_default/img/scouts/$type.gif\" alt=\"".$topic."\" title=\"".$topic."\" />";
}else{
echo "<img src=\"img/x.gif\" class=\"iReport iReport".$row['ntype']."\" title=\"".$topic."\"> ";
}
$date = $generator->procMtime($row['time']);
echo "<a href=\"berichte.php?id=".$row['id']."&vill=".$row['id']."\">".$date[0]." ".date('H:i',$row['time'])."</a> ";
echo "</td></tr>"; echo "</td></tr>";
} }
}else{ ?> }else{ ?>
<tr> <tr>
<td>There is no <td><?php echo THERENOINFO;?></td>
<br>information available.</td>
</tr> </tr>
<?php } <?php }
@@ -442,6 +414,7 @@ if($query != 0){
while($row = mysql_fetch_array($result)){ while($row = mysql_fetch_array($result)){
$dataarray = explode(",",$row['data']); $dataarray = explode(",",$row['data']);
$type = $row['ntype']; $type = $row['ntype'];
$topic=$row['topic'];
echo "<tr><td>"; echo "<tr><td>";
if($type==18 or $type==19 or $type==20 or $type==21){ if($type==18 or $type==19 or $type==20 or $type==21){
echo "<img src=\"gpack/travian_default/img/scouts/$type.gif\" alt=\"".$topic."\" title=\"".$topic."\" />"; echo "<img src=\"gpack/travian_default/img/scouts/$type.gif\" alt=\"".$topic."\" title=\"".$topic."\" />";
@@ -454,8 +427,7 @@ if($type==18 or $type==19 or $type==20 or $type==21){
} }
}else{ ?> }else{ ?>
<tr> <tr>
<td>There is no <td><?php echo THERENOINFO;?></td>
<br>information available.</td>
</tr> </tr>
<?php }} ?> <?php }} ?>
@@ -465,16 +437,16 @@ if($type==18 or $type==19 or $type==20 or $type==21){
</div> </div>
<table cellpadding="1" cellspacing="1" id="options" class="tableNone"> <table cellpadding="1" cellspacing="1" id="options" class="tableNone">
<thead><tr> <thead><tr>
<th>Options</th> <th><?php echo OPTION;?></th>
</tr></thead> </tr></thead>
<tbody><tr> <tbody><tr>
<td><a href="karte.php?z=<?php echo $_GET['d']; ?>">&raquo; Centre map.</a></td> <td><a href="karte.php?z=<?php echo $_GET['d']; ?>">&raquo; <?php echo CENTREMAP;?>.</a></td>
</tr> </tr>
<?php if(!$basearray['occupied']) { <?php if(!$basearray['occupied']) { ?>
?>
<tr> <tr>
<td class="none"><?php <td class="none"><?php
$mode = CP; $mode = CP;
$total = count($database->getProfileVillages($session->uid)); $total = count($database->getProfileVillages($session->uid));
$need_cps = ${'cp'.$mode}[$total+1]; $need_cps = ${'cp'.$mode}[$total+1];
@@ -486,29 +458,26 @@ if($type==18 or $type==19 or $type==20 or $type==21){
$enough_cp = false; $enough_cp = false;
} }
$otext = ($oasis['name']);
if($village->unitarray['u'.$session->tribe.'0'] >= 3 AND $enough_cp AND $village->resarray['f39']) { if($village->unitarray['u'.$session->tribe.'0'] >= 3 AND $enough_cp AND $village->resarray['f39']) {
$test = "<a href=\"a2b.php?id=".$_GET['d']."&amp;s=1\">&raquo; Found new village.</a>"; $test = "<a href=\"a2b.php?id=".$_GET['d']."&amp;s=1\">&raquo; ".FNEWVILLAGE."</a>";
} elseif($village->unitarray['u'.$session->tribe.'0'] >= 3 AND !$enough_cp) { } elseif($village->unitarray['u'.$session->tribe.'0'] >= 3 AND !$enough_cp) {
$test = "&raquo; Found new village. ($cps/$need_cps culture points)"; $test = "&raquo; ".FNEWVILLAGE." ($cps/$need_cps ".CULTUREPOINT.")";
} elseif(!$village->resarray['f39']) { } elseif(!$village->resarray['f39']) {
$test = "&raquo; Found new village. (build a rally point)"; $test = "&raquo; ".FNEWVILLAGE." (".BUILDRALLY.")";
} else { } else {
$test = "&raquo; Found new village. (".$village->unitarray['u'.$session->tribe.'0']."/3 settlers available)"; $test = "&raquo; ".FNEWVILLAGE." (".$village->unitarray['u'.$session->tribe.'0']."/3 ".SETTLERSAVAIL.")";
} }
echo ($basearray['fieldtype']==0)? echo ($basearray['fieldtype']==0)?
($village->resarray['f39']==0)? ($village->resarray['f39']==0)?
($basearray['owner'] == $session->uid)? ($basearray['owner'] == $session->uid)?
"<a href=\"build.php?id=39\">&raquo; ".RAID." $otext ".OASIS." (".BUILDRALLY.")</a>" :
"<a href=\"build.php?id=39\">&raquo; Raid $otext oasis. (build a rally point)</a>" : "&raquo; ".RAID." $otext ".OASIS." (".BUILDRALLY.")" :
"&raquo; Raid $otext oasis. (build a rally point)" : "<a href=\"a2b.php?z=".$_GET['d']."&o\">&raquo; ".RAID." $otext</a>" :
"<a href=\"a2b.php?z=".$_GET['d']."&o\">&raquo; Raid $otext.</a>" :
"$test" "$test"
?> ?>
</tr> </tr>
<?php } <?php }
else if ($basearray['occupied'] && $basearray['wref'] != $_SESSION['wid']) {?> else if ($basearray['occupied'] && $basearray['wref'] != $_SESSION['wid']) {?>
@@ -524,11 +493,11 @@ if($type==18 or $type==19 or $type==20 or $type==21){
$query2 = mysql_query('SELECT * FROM `' . TB_PREFIX . 'users` WHERE `id` = ' . $data1['owner']); $query2 = mysql_query('SELECT * FROM `' . TB_PREFIX . 'users` WHERE `id` = ' . $data1['owner']);
$data2 = mysql_fetch_assoc($query2); $data2 = mysql_fetch_assoc($query2);
if($data2['access']=='0' or $data2['access']=='8' or $data2['access']=='9') { if($data2['access']=='0' or $data2['access']=='8' or $data2['access']=='9') {
echo "&raquo; Send troops. (Player is banned)"; echo "&raquo; ".SENDTROOP." (".BAN.")";
} else if($data2['protect'] < time()) { } else if($data2['protect'] < time()) {
echo $village->resarray['f39']? "<a href=\"a2b.php?z=".$_GET['d']."\">&raquo; Send troops." : "&raquo; Send troops. (build a rally point)"; echo $village->resarray['f39']? "<a href=\"a2b.php?s=2&z=".$_GET['d']."\">&raquo; ".SENDTROOP : "&raquo; ".SENDTROOP." (".BUILDRALLY.")";
} else { } else {
echo "&raquo; Send troops. (beginners protection)"; echo "&raquo; ".SENDTROOP." (".BEGINPRO.")";
} }
?> ?>
</td> </td>
@@ -536,10 +505,10 @@ if($type==18 or $type==19 or $type==20 or $type==21){
<tr> <tr>
<td class="none"> <td class="none">
<?php <?php
if($data2['access']=='0' or $data2['access']=='8' or $data2['access']=='9') { if($data2['access']=='0' or $data2['access']=='8' or $data2['access']=='9') {
echo "&raquo; Send merchant(s). (banned)"; echo "&raquo; ".SENDMERC." (".BAN.")";
} else { } else {
echo $building->getTypeLevel(17)? "<a href=\"build.php?z=".$_GET['d']."&id=" . $building->getTypeField(17) . "\">&raquo; Send merchant(s)." : "&raquo; Send merchant(s). (build marketplace)"; echo $building->getTypeLevel(17)? "<a href=\"build.php?z=".$_GET['d']."&id=" . $building->getTypeField(17) . "\">&raquo; ".SENDMERC : "&raquo; ".SENDMERC ."(".BUILDMARKET.")";
} }
?> ?>
@@ -549,4 +518,4 @@ if($type==18 or $type==19 or $type==20 or $type==21){
</tbody> </tbody>
</table> </table>
</div> </div>