mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-10 06:36:07 +00:00
Merge branch 'master' of https://github.com/yi12345/TravianZ
Conflicts: Templates/Admin/menu.tpl correct conflict with update to <a href="?p=natarbuildingplan">Add WW Buildingplan Villages</a>
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename natarbuildingplan.php ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
include_once("../../Session.php");
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
if ($session->access < ADMIN) die("Access Denied: You are not Admin!");
|
||||
|
||||
$id = $_POST['id'];
|
||||
$amt = $_POST['vill_amount'];
|
||||
|
||||
for($i=1;$i<=$amt;$i++) {
|
||||
|
||||
$kid = rand(1,4);
|
||||
|
||||
$wid = $database->generateBase($kid);
|
||||
$database->setFieldTaken($wid);
|
||||
$time = time();
|
||||
$q = "insert into `s1_vdata`(`wref`,`owner`,`name`,`capital`,`pop`,`cp`,`celebration`,`type`,`wood`,`clay`,`iron`,`maxstore`,`crop`,`maxcrop`,`lastupdate`,`loyalty`,`exp1`,`exp2`,`exp3`,`created`) values ('$wid','3','WW Buildingplan',0,233,232,0,0,80000.00,80000.00,80000.00,80000,80000.00,80000,1314974534,100,0,0,0,1314968914)";
|
||||
mysql_query($q) or die(mysql_error());
|
||||
$q = "insert into ".TB_PREFIX."fdata (`vref`,`f1`,`f1t`,`f2`,`f2t`,`f3`,`f3t`,`f4`,`f4t`,`f5`,`f5t`,`f6`,`f6t`,`f7`,`f7t`,`f8`,`f8t`,`f9`,`f9t`,`f10`,`f10t`,`f11`,`f11t`,`f12`,`f12t`,`f13`,`f13t`,`f14`,`f14t`,`f15`,`f15t`,`f16`,`f16t`,`f17`,`f17t`,`f18`,`f18t`,`f19`,`f19t`,`f20`,`f20t`,`f21`,`f21t`,`f22`,`f22t`,`f23`,`f23t`,`f24`,`f24t`,`f25`,`f25t`,`f26`,`f26t`,`f27`,`f27t`,`f28`,`f28t`,`f29`,`f29t`,`f30`,`f30t`,`f31`,`f31t`,`f32`,`f32t`,`f33`,`f33t`,`f34`,`f34t`,`f35`,`f35t`,`f36`,`f36t`,`f37`,`f37t`,`f38`,`f38t`,`f39`,`f39t`,`f40`,`f40t`,`f99`,`f99t`,`wwname`) values ($wid,0,1,0,4,0,1,0,3,0,2,0,2,0,3,0,4,0,4,0,3,0,3,0,4,0,4,0,1,0,4,0,2,0,1,0,2,20,17,20,11,20,15,20,10,10,22,10,25,0,0,0,0,10,19,0,0,0,0,0,0,10,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,16,0,0,0,0,'World Wonder')";
|
||||
mysql_query($q);
|
||||
$database->addUnits($wid);
|
||||
$database->addTech($wid);
|
||||
$database->addABTech($wid);
|
||||
$q = "UPDATE ".TB_PREFIX."units SET u41 = u41 + '150000', u42 = u42 + '150000', u43 = u43 + '150000', u44 = u44 + '150000', u45 = u45 + '150000', u46 = u46 + '150000', u47 = u47 + '150000', u48 = u48 + '150000' , u49 = u49 + '150000', u50 = u50 + '150000' WHERE vref = '".$wid."'";
|
||||
mysql_query($q);
|
||||
}
|
||||
|
||||
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,$id,'Added <b>$amt</b> WW Buildingplan Villages',".time().")");
|
||||
|
||||
|
||||
header("Location: ../../../admin.php?p=natarbuildingplan&g");
|
||||
?>
|
||||
@@ -3,7 +3,7 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename gold.php ##
|
||||
## Filename natarend.php ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
@@ -24,7 +24,7 @@ for($i=1;$i<=$amt;$i++) {
|
||||
$wid = $database->generateBase($kid);
|
||||
$database->setFieldTaken($wid);
|
||||
$time = time();
|
||||
$q = "insert into `s1_vdata`(`wref`,`owner`,`name`,`capital`,`pop`,`cp`,`celebration`,`type`,`wood`,`clay`,`iron`,`maxstore`,`crop`,`maxcrop`,`lastupdate`,`loyalty`,`exp1`,`exp2`,`exp3`,`created`) values ('$wid','3','World Wonder',0,233,232,0,0,80000.00,80000.00,80000.00,80000,80000.00,80000,1314974534,100,0,0,0,1314968914)";
|
||||
$q = "insert into `s1_vdata`(`wref`,`owner`,`name`,`capital`,`pop`,`cp`,`celebration`,`type`,`wood`,`clay`,`iron`,`maxstore`,`crop`,`maxcrop`,`lastupdate`,`loyalty`,`exp1`,`exp2`,`exp3`,`created`) values ('$wid','3','WW village',0,233,232,0,0,80000.00,80000.00,80000.00,80000,80000.00,80000,1314974534,100,0,0,0,1314968914)";
|
||||
mysql_query($q) or die(mysql_error());
|
||||
$q = "insert into ".TB_PREFIX."fdata (`vref`,`f1`,`f1t`,`f2`,`f2t`,`f3`,`f3t`,`f4`,`f4t`,`f5`,`f5t`,`f6`,`f6t`,`f7`,`f7t`,`f8`,`f8t`,`f9`,`f9t`,`f10`,`f10t`,`f11`,`f11t`,`f12`,`f12t`,`f13`,`f13t`,`f14`,`f14t`,`f15`,`f15t`,`f16`,`f16t`,`f17`,`f17t`,`f18`,`f18t`,`f19`,`f19t`,`f20`,`f20t`,`f21`,`f21t`,`f22`,`f22t`,`f23`,`f23t`,`f24`,`f24t`,`f25`,`f25t`,`f26`,`f26t`,`f27`,`f27t`,`f28`,`f28t`,`f29`,`f29t`,`f30`,`f30t`,`f31`,`f31t`,`f32`,`f32t`,`f33`,`f33t`,`f34`,`f34t`,`f35`,`f35t`,`f36`,`f36t`,`f37`,`f37t`,`f38`,`f38t`,`f39`,`f39t`,`f40`,`f40t`,`f99`,`f99t`,`wwname`) values ($wid,0,1,0,4,0,1,0,3,0,2,0,2,0,3,0,4,0,4,0,3,0,3,0,4,0,4,0,1,0,4,0,2,0,1,0,2,20,17,20,11,20,15,20,10,10,22,10,25,0,0,0,0,10,19,0,0,0,0,0,0,10,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,16,0,0,1,40,'World Wonder')";
|
||||
mysql_query($q);
|
||||
@@ -39,5 +39,5 @@ for($i=1;$i<=$amt;$i++) {
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,$id,'Added <b>$amt</b> WW Villages',".time().")");
|
||||
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=natarend&g");
|
||||
header("Location: ../../../admin.php?p=natarend&g");
|
||||
?>
|
||||
@@ -1705,6 +1705,7 @@ private function loyaltyRegeneration() {
|
||||
$varray = $database->getProfileVillages($to['owner']);
|
||||
//kijken of laatste dorp is, of hoofddorp
|
||||
if(count($varray)!='1' AND $to['capital']!='1'){
|
||||
if($to['owenr']!=3 AND $to['name']!='WW Buildingplan'){
|
||||
//if there is no Palace/Residence
|
||||
for ($i=18; $i<39; $i++){
|
||||
if ($database->getFieldLevel($data['to'],"".$i."t")==25 or $database->getFieldLevel($data['to'],"".$i."t")==26){
|
||||
@@ -1762,6 +1763,9 @@ private function loyaltyRegeneration() {
|
||||
} else {
|
||||
$info_chief = "".$chief_pic.",You cant take over this village.";
|
||||
}
|
||||
} else {
|
||||
$info_chief = "".$chief_pic.",You cant take over this village.";
|
||||
}
|
||||
}
|
||||
|
||||
if($data['t11'] > 0){
|
||||
|
||||
@@ -593,6 +593,8 @@
|
||||
$dbarray = mysql_fetch_array($result);
|
||||
return $dbarray['fieldtype'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*****************************************
|
||||
Function to retrieve if is ocuped via ID
|
||||
@@ -1543,7 +1545,6 @@
|
||||
}
|
||||
|
||||
function getVillageByName($name) {
|
||||
$name = mysql_real_escape_string($name, $this->connection);
|
||||
$q = "SELECT wref FROM " . TB_PREFIX . "vdata where name = '$name' limit 1";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
$dbarray = mysql_fetch_array($result);
|
||||
|
||||
@@ -105,10 +105,13 @@ class Market {
|
||||
}
|
||||
if($database->getVillageState($id)) {
|
||||
$timetaken = $generator->procDistanceTime($coor,$village->coor,$session->tribe,0);
|
||||
$res = $resource[0]+$resource[1]+$resource[2]+$resource[3];
|
||||
if($res!=0){
|
||||
$reference = $database->sendResource($resource[0],$resource[1],$resource[2],$resource[3],$reqMerc,0);
|
||||
$database->modifyResource($village->wid,$resource[0],$resource[1],$resource[2],$resource[3],0);
|
||||
$database->addMovement(0,$village->wid,$id,$reference,time(),time()+$timetaken);
|
||||
$logging->addMarketLog($village->wid,1,array($resource[0],$resource[1],$resource[2],$resource[3],$id));
|
||||
}
|
||||
}
|
||||
}
|
||||
header("Location: build.php?id=".$post['id']);
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
Title : README
|
||||
Author : Advocaite
|
||||
TravianZ is based on TravianX v6.0.0 with some grapich changes from ZravianX.
|
||||
I will try to make the best from this version and I will add every fix that I will found to it.
|
||||
If you found fix to somthing please give it to me.
|
||||
|
||||
TravianX Brought to you by Advocaite & donn
|
||||
This clone has seen many authors allkori,dzoki,dixxie PLus many more
|
||||
the install process is fairly easy to do just make sure
|
||||
GameEngine/Config.php Dose not exsist if it dose exsist delete it
|
||||
Then run server in localhost you should be directed to a install page
|
||||
folow instructions then play and enjoy.
|
||||
|
||||
thankyou for you time
|
||||
* find 'magic_quotes_gpc = Off' and replace with 'magic_quotes_gpc = On' for better options with special characters (you need to restart your appache and mysql for make this change affective)
|
||||
@@ -42,7 +42,7 @@ include_once ("GameEngine/Ranking.php");
|
||||
<a href="massmessage.php">Mass message</a>
|
||||
<a href="sysmsg.php">System message</a>
|
||||
<a href="medals.php">Update top 10</a>
|
||||
<a href="?p=natarend">Add WW Villages</a>
|
||||
<a href="?p=natarbuildingplan">Add WW Buildingplan Villages</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="?p=admin_log"><font color="Red"><b>Admin Log</b></font></a>
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
|
||||
## --------------------------------------------------------------------------- ##
|
||||
|
||||
## Filename natarbuildingplan.php ##
|
||||
|
||||
## Developed by: advocaite ##
|
||||
|
||||
## License: TravianX Project ##
|
||||
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
|
||||
## ##
|
||||
|
||||
#################################################################################
|
||||
|
||||
|
||||
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<?php $id = $_SESSION['id']; ?>
|
||||
|
||||
<form action="../GameEngine/Admin/Mods/natarbuildingplan.php" method="POST">
|
||||
|
||||
<input type="hidden" name="id" id="id" value="<?php echo $id; ?>">
|
||||
|
||||
<br /><br /><br /><br /><br /><br /><br /><br /><br />
|
||||
|
||||
<center><b>Create WW Buildingplan villages?</b></center>
|
||||
|
||||
<center><br /><input class="give_gold" name="vill_amount" id="vill_amount" value="10" maxlength="4"> <font color="gray" size="1">insert number of Villages and press 'enter'</center></form>
|
||||
|
||||
<?php
|
||||
|
||||
if(isset($_GET['g'])) {
|
||||
|
||||
|
||||
|
||||
echo '<br /><br /><font color="Red"><b>WW Buidingplan villages Added</font></b>';
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
## --------------------------------------------------------------------------- ##
|
||||
|
||||
## Filename natarstart.php ##
|
||||
## Filename natarend.php ##
|
||||
|
||||
## Developed by: advocaite ##
|
||||
|
||||
@@ -36,7 +36,7 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
|
||||
<center><b>Create World Wonder villages?</b></center>
|
||||
|
||||
<center><br /><input class="give_gold" name="vill_amount" id="vill_amount" value="10" maxlength="4"> <img src="http://forum.ragezone.com/f583/img/admin/gold.gif" class="gold" alt="gold" title="gold"/> <font color="gray" size="1">insert number of Wonders and press 'enter'</center></form>
|
||||
<center><br /><input class="give_gold" name="vill_amount" id="vill_amount" value="10" maxlength="4"> <font color="gray" size="1">insert number of Wonders and press 'enter'</center></form>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
@@ -102,10 +102,14 @@ $image = ($donnees['map_occupied'] == 1 && $donnees['map_fieldtype'] > 0)?(($don
|
||||
|
||||
//Javascript map info
|
||||
if($yrow!=7){
|
||||
if($donnees['ville_user']==3 && $donnees['ville_name']=='WW Buildingplan'){
|
||||
$map_js .= "[".$donnees['map_x'].",".$donnees['map_y'].",".$donnees['map_fieldtype'].",". ((!empty($donnees['map_oasis'])) ? $donnees['map_oasis'] : 0) .",\"d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."\",\"o99\"";
|
||||
}else{
|
||||
$map_js .= "[".$donnees['map_x'].",".$donnees['map_y'].",".$donnees['map_fieldtype'].",". ((!empty($donnees['map_oasis'])) ? $donnees['map_oasis'] : 0) .",\"d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."\",\"".$image."\"";
|
||||
}
|
||||
if($donnees['map_occupied']){
|
||||
if($donnees['map_fieldtype'] != 0){
|
||||
$map_js.= ",\"".htmlspecialchars($donnees['ville_name'])."\",\"".htmlspecialchars($donnees['user_username'])."\",\"".$donnees['ville_pop']."\",\"".htmlspecialchars($donnees['aliance_name'])."\",\"".$donnees['user_tribe']."\"]\n";
|
||||
$map_js.= ",\"".$donnees['ville_name']."\",\"".$donnees['user_username']."\",\"".$donnees['ville_pop']."\",\"".$donnees['aliance_name']."\",\"".$donnees['user_tribe']."\"]\n";
|
||||
}
|
||||
}
|
||||
elseif($donnees['map_oasis'] != 0){
|
||||
|
||||
@@ -121,10 +121,14 @@ $image = ($donnees['map_occupied'] == 1 && $donnees['map_fieldtype'] > 0)?(($don
|
||||
|
||||
//Javascript map info
|
||||
if($yrow!=13){
|
||||
if($donnees['ville_user']==3 && $donnees['ville_name']=='WW Buildingplan'){
|
||||
$map_js .= "[".$donnees['map_x'].",".$donnees['map_y'].",".$donnees['map_fieldtype'].",". ((!empty($donnees['map_oasis'])) ? $donnees['map_oasis'] : 0) .",\"d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."\",\"o99\"";
|
||||
}else{
|
||||
$map_js .= "[".$donnees['map_x'].",".$donnees['map_y'].",".$donnees['map_fieldtype'].",". ((!empty($donnees['map_oasis'])) ? $donnees['map_oasis'] : 0) .",\"d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."\",\"".$image."\"";
|
||||
}
|
||||
if($donnees['map_occupied']){
|
||||
if($donnees['map_fieldtype'] != 0){
|
||||
$map_js.= ",\"".htmlspecialchars($donnees['ville_name'])."\",\"".htmlspecialchars($donnees['user_username'])."\",\"".$donnees['ville_pop']."\",\"".htmlspecialchars($donnees['aliance_name'])."\",\"".$donnees['user_tribe']."\"]\n";
|
||||
$map_js.= ",\"".$donnees['ville_name']."\",\"".$donnees['user_username']."\",\"".$donnees['ville_pop']."\",\"".$donnees['aliance_name']."\",\"".$donnees['user_tribe']."\"]\n";
|
||||
}
|
||||
}
|
||||
elseif($donnees['map_oasis'] != 0){
|
||||
|
||||
@@ -109,16 +109,20 @@ while ($donnees = mysql_fetch_assoc($result2)){
|
||||
$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)? (in_array($targetalliance,$friendarray)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b31': 'b21' :'b11' : 'b01') : (in_array($targetalliance,$enemyarray)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b32': 'b22' :'b12' : 'b02') : (in_array($targetalliance,$neutralarray)? ($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 content
|
||||
if($donnees['ville_user']==3 && $donnees['ville_name']=='WW Buildingplan'){
|
||||
$map_content .= "<div id='i_".$row."_".$i."' class='o99'></div>\r";
|
||||
}else{
|
||||
$map_content .= "<div id='i_".$row."_".$i."' class='".$image."'></div>\r";
|
||||
}
|
||||
//Map create
|
||||
$map_gen .= "<area id='a_".$row."_".$i."' shape='poly' coords='".$coorarray[$coorindex]."' title='".htmlspecialchars($donnees['ville_name'])."' href='karte.php?d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."' />\n";
|
||||
$map_gen .= "<area id='a_".$row."_".$i."' shape='poly' coords='".$coorarray[$coorindex]."' title='".$donnees['ville_name']."' href='karte.php?d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."' />\n";
|
||||
|
||||
//Javascript map info
|
||||
if($yrow!=7){
|
||||
$map_js .= "[".$donnees['map_x'].",".$donnees['map_y'].",".$donnees['map_fieldtype'].",". ((!empty($donnees['map_oasis'])) ? $donnees['map_oasis'] : 0) .",\"d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."\",\"".$image."\"";
|
||||
if($donnees['map_occupied']){
|
||||
if($donnees['map_fieldtype'] != 0){
|
||||
$map_js.= ",\"".htmlspecialchars($donnees['ville_name'])."\",\"".htmlspecialchars($donnees['user_username'])."\",\"".$donnees['ville_pop']."\",\"".htmlspecialchars($donnees['aliance_name'])."\",\"".$donnees['user_tribe']."\"]\n";
|
||||
$map_js.= ",\"".$donnees['ville_name']."\",\"".$donnees['user_username']."\",\"".$donnees['ville_pop']."\",\"".$donnees['aliance_name']."\",\"".$donnees['user_tribe']."\"]\n";
|
||||
}
|
||||
}
|
||||
elseif($donnees['map_oasis'] != 0){
|
||||
|
||||
@@ -184,16 +184,20 @@ while ($donnees = mysql_fetch_assoc($result2)){
|
||||
$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)? (in_array($targetalliance,$friendarray)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b31': 'b21' :'b11' : 'b01') : (in_array($targetalliance,$enemyarray)? ($donnees['ville_pop']>=100? $donnees['ville_pop']>= 250?$donnees['ville_pop']>=500? 'b32': 'b22' :'b12' : 'b02') : (in_array($targetalliance,$neutralarray)? ($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 content
|
||||
if($donnees['ville_user']==3 && $donnees['ville_name']=='WW Buildingplan'){
|
||||
$map_content .= "<div id='i_".$row."_".$i."' class='o99'></div>\r";
|
||||
}else{
|
||||
$map_content .= "<div id='i_".$row."_".$i."' class='".$image."'></div>\r";
|
||||
}
|
||||
//Map create
|
||||
$map_gen .= "<area id='a_".$row."_".$i."' shape='poly' coords='".$coorarray[$coorindex]."' title='".htmlspecialchars($donnees['ville_name'])."' href='karte.php?d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."' target='_parent' />\n";
|
||||
$map_gen .= "<area id='a_".$row."_".$i."' shape='poly' coords='".$coorarray[$coorindex]."' title='".$donnees['ville_name']."' href='karte.php?d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."' target='_parent' />\n";
|
||||
|
||||
//Javascript map info
|
||||
if($yrow!=13){
|
||||
$map_js .= "[".$donnees['map_x'].",".$donnees['map_y'].",".$donnees['map_fieldtype'].",". ((!empty($donnees['map_oasis'])) ? $donnees['map_oasis'] : 0) .",\"d=".$donnees['map_id']."&c=".$generator->getMapCheck($donnees['map_id'])."\",\"".$image."\"";
|
||||
if($donnees['map_occupied']){
|
||||
if($donnees['map_fieldtype'] != 0){
|
||||
$map_js.= ",\"".htmlspecialchars($donnees['ville_name'])."\",\"".htmlspecialchars($donnees['user_username'])."\",\"".$donnees['ville_pop']."\",\"".htmlspecialchars($donnees['aliance_name'])."\",\"".$donnees['user_tribe']."\"]\n";
|
||||
$map_js.= ",\"".$donnees['ville_name']."\",\"".$donnees['user_username']."\",\"".$donnees['ville_pop']."\",\"".$donnees['aliance_name']."\",\"".$donnees['user_tribe']."\"]\n";
|
||||
}
|
||||
}
|
||||
elseif($donnees['map_oasis'] != 0){
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<div id="content" class="map">
|
||||
<?php
|
||||
$basearray = $database->getMInfo($_GET['d']);
|
||||
$uinfo = $database->getVillage($basearray['id']);
|
||||
$oasis1 = mysql_query('SELECT * FROM `' . TB_PREFIX . 'odata` WHERE `wref` = ' . mysql_escape_string($_GET['d']));
|
||||
$oasis = mysql_fetch_assoc($oasis1);
|
||||
?>
|
||||
@@ -9,8 +10,11 @@ echo !$basearray['occupied']? $basearray['fieldtype']? "Abandoned valley" : "Uno
|
||||
}else{
|
||||
echo $oasis['name']; echo " (".$basearray['x']."|".$basearray['y'].")";
|
||||
} ?></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'){
|
||||
?>
|
||||
<img src="img/x.gif" id="detailed_map" class="f99" alt="WW buildingplan" />
|
||||
<?php }else{ ?>
|
||||
<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']) {
|
||||
case 1:
|
||||
@@ -95,7 +99,7 @@ break;
|
||||
}
|
||||
echo $tt."\"";
|
||||
$landd = explode("-",$tt);?> />
|
||||
|
||||
<?php } ?>
|
||||
<div id="map_details">
|
||||
<?php if($basearray['fieldtype'] == 0) {
|
||||
if($oasis['owner'] == 2){
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
if(WW==True){
|
||||
$result = mysql_query("select ".TB_PREFIX."users.id, ".TB_PREFIX."users.username,".TB_PREFIX."users.alliance, ".TB_PREFIX."fdata.wwname, ".TB_PREFIX."fdata.f99, ".TB_PREFIX."vdata.name
|
||||
FROM ".TB_PREFIX."users
|
||||
INNER JOIN ".TB_PREFIX."vdata ON ".TB_PREFIX."users.id = ".TB_PREFIX."vdata.owner
|
||||
@@ -39,5 +39,7 @@
|
||||
|
||||
|
||||
</tr>
|
||||
<?php }
|
||||
<?php }}else{
|
||||
header("Location: statistiken.php");
|
||||
}
|
||||
?>
|
||||
+17
-11
@@ -18,7 +18,7 @@ if(isset($_GET['w'])) {
|
||||
for($i=1;$i<=count($session->villages);++$i){echo'
|
||||
<tr>
|
||||
<td class="dot '.(($_SESSION['wid'] == $returnVillageArray[$i-1]['wref'] ) ? 'hl':'').'">●</td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&w=".$_GET['w']).'">'.htmlspecialchars($returnVillageArray[$i-1]['name']).'</a></td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&w=".$_GET['w']).'">'.$returnVillageArray[$i-1]['name'].'</a></td>
|
||||
<td class="aligned_coords"><div class="cox">('.$returnVillageArray[$i-1]['x'].'</div><div class="pi">|</div><div class="coy">'.$returnVillageArray[$i-1]['y'].')</div></td></tr>';
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ else if(isset($_GET['r'])) {
|
||||
for($i=1;$i<=count($session->villages);++$i){echo'
|
||||
<tr>
|
||||
<td class="dot '.(($_SESSION['wid'] == $returnVillageArray[$i-1]['wref'] ) ? 'hl':'').'">●</td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&r=".$_GET['r']).'">'.htmlspecialchars($returnVillageArray[$i-1]['name']).'</a></td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&r=".$_GET['r']).'">'.$returnVillageArray[$i-1]['name'].'</a></td>
|
||||
<td class="aligned_coords"><div class="cox">('.$returnVillageArray[$i-1]['x'].'</div><div class="pi">|</div><div class="coy">'.$returnVillageArray[$i-1]['y'].')</div></td></tr>';
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ else if(isset($_GET['o'])) {
|
||||
for($i=1;$i<=count($session->villages);++$i){echo'
|
||||
<tr>
|
||||
<td class="dot '.(($_SESSION['wid'] == $returnVillageArray[$i-1]['wref'] ) ? 'hl':'').'">●</td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&o=".$_GET['o']).'">'.htmlspecialchars($returnVillageArray[$i-1]['name']).'</a></td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&o=".$_GET['o']).'">'.$returnVillageArray[$i-1]['name'].'</a></td>
|
||||
<td class="aligned_coords"><div class="cox">('.$returnVillageArray[$i-1]['x'].'</div><div class="pi">|</div><div class="coy">'.$returnVillageArray[$i-1]['y'].')</div></td></tr>';
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,7 @@ else if(isset($_GET['z'])) {
|
||||
for($i=1;$i<=count($session->villages);++$i){echo'
|
||||
<tr>
|
||||
<td class="dot '.(($_SESSION['wid'] == $returnVillageArray[$i-1]['wref'] ) ? 'hl':'').'">●</td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&z=".$_GET['z']).'">'.htmlspecialchars($returnVillageArray[$i-1]['name']).'</a></td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&z=".$_GET['z']).'">'.$returnVillageArray[$i-1]['name'].'</a></td>
|
||||
<td class="aligned_coords"><div class="cox">('.$returnVillageArray[$i-1]['x'].'</div><div class="pi">|</div><div class="coy">'.$returnVillageArray[$i-1]['y'].')</div></td></tr>';
|
||||
}
|
||||
}
|
||||
@@ -50,7 +50,7 @@ else if(isset($_GET['s'])) {
|
||||
for($i=1;$i<=count($session->villages);++$i){echo'
|
||||
<tr>
|
||||
<td class="dot '.(($_SESSION['wid'] == $returnVillageArray[$i-1]['wref'] ) ? 'hl':'').'">●</td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&s=".$_GET['s']).'">'.htmlspecialchars($returnVillageArray[$i-1]['name']).'</a></td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&s=".$_GET['s']).'">'.$returnVillageArray[$i-1]['name'].'</a></td>
|
||||
<td class="aligned_coords"><div class="cox">('.$returnVillageArray[$i-1]['x'].'</div><div class="pi">|</div><div class="coy">'.$returnVillageArray[$i-1]['y'].')</div></td></tr>';
|
||||
}
|
||||
}
|
||||
@@ -58,7 +58,7 @@ else if(isset($_GET['c'])) {
|
||||
for($i=1;$i<=count($session->villages);++$i){echo'
|
||||
<tr>
|
||||
<td class="dot '.(($_SESSION['wid'] == $returnVillageArray[$i-1]['wref'] ) ? 'hl':'').'">●</td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&d=".$_GET['d']).(($id>=19) ? "&id=".$id : "&c=".$_GET['c']).'">'.htmlspecialchars($returnVillageArray[$i-1]['name']).'</a></td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&d=".$_GET['d']).(($id>=19) ? "&id=".$id : "&c=".$_GET['c']).'">'.$returnVillageArray[$i-1]['name'].'</a></td>
|
||||
<td class="aligned_coords"><div class="cox">('.$returnVillageArray[$i-1]['x'].'</div><div class="pi">|</div><div class="coy">'.$returnVillageArray[$i-1]['y'].')</div></td></tr>';
|
||||
}
|
||||
}
|
||||
@@ -66,7 +66,7 @@ else if(isset($_GET['t'])) {
|
||||
for($i=1;$i<=count($session->villages);++$i){echo'
|
||||
<tr>
|
||||
<td class="dot '.(($_SESSION['wid'] == $returnVillageArray[$i-1]['wref'] ) ? 'hl':'').'">●</td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&t=".$_GET['t']).'">'.htmlspecialchars($returnVillageArray[$i-1]['name']).'</a></td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&t=".$_GET['t']).'">'.$returnVillageArray[$i-1]['name'].'</a></td>
|
||||
<td class="aligned_coords"><div class="cox">('.$returnVillageArray[$i-1]['x'].'</div><div class="pi">|</div><div class="coy">'.$returnVillageArray[$i-1]['y'].')</div></td></tr>';
|
||||
}
|
||||
}
|
||||
@@ -74,7 +74,7 @@ else if(isset($_GET['d'])) {
|
||||
for($i=1;$i<=count($session->villages);++$i){echo'
|
||||
<tr>
|
||||
<td class="dot '.(($_SESSION['wid'] == $returnVillageArray[$i-1]['wref'] ) ? 'hl':'').'">●</td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&d=".$_GET['d']).'">'.htmlspecialchars($returnVillageArray[$i-1]['name']).'</a></td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&d=".$_GET['d']).'">'.$returnVillageArray[$i-1]['name'].'</a></td>
|
||||
<td class="aligned_coords"><div class="cox">('.$returnVillageArray[$i-1]['x'].'</div><div class="pi">|</div><div class="coy">'.$returnVillageArray[$i-1]['y'].')</div></td></tr>';
|
||||
}
|
||||
}
|
||||
@@ -82,7 +82,7 @@ else if(isset($_GET['aid'])) {
|
||||
for($i=1;$i<=count($session->villages);++$i){echo'
|
||||
<tr>
|
||||
<td class="dot '.(($_SESSION['wid'] == $returnVillageArray[$i-1]['wref'] ) ? 'hl':'').'">●</td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&aid=".$_GET['aid']).'">'.htmlspecialchars($returnVillageArray[$i-1]['name']).'</a></td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&aid=".$_GET['aid']).'">'.$returnVillageArray[$i-1]['name'].'</a></td>
|
||||
<td class="aligned_coords"><div class="cox">('.$returnVillageArray[$i-1]['x'].'</div><div class="pi">|</div><div class="coy">'.$returnVillageArray[$i-1]['y'].')</div></td></tr>';
|
||||
}
|
||||
}
|
||||
@@ -90,7 +90,7 @@ else if(isset($_GET['uid'])) {
|
||||
for($i=1;$i<=count($session->villages);++$i){echo'
|
||||
<tr>
|
||||
<td class="dot '.(($_SESSION['wid'] == $returnVillageArray[$i-1]['wref'] ) ? 'hl':'').'">●</td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&uid=".$_GET['uid']).'">'.htmlspecialchars($returnVillageArray[$i-1]['name']).'</a></td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&uid=".$_GET['uid']).'">'.$returnVillageArray[$i-1]['name'].'</a></td>
|
||||
<td class="aligned_coords"><div class="cox">('.$returnVillageArray[$i-1]['x'].'</div><div class="pi">|</div><div class="coy">'.$returnVillageArray[$i-1]['y'].')</div></td></tr>';
|
||||
}
|
||||
}
|
||||
@@ -98,7 +98,13 @@ else if(isset($_GET['vill']) && isset($_GET['id'])) {
|
||||
for($i=1;$i<=count($session->villages);++$i){echo'
|
||||
<tr>
|
||||
<td class="dot '.(($_SESSION['wid'] == $returnVillageArray[$i-1]['wref'] ) ? 'hl':'').'">●</td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&id=".$_GET['id'])."&vill=".$_GET['vill'].'">'.htmlspecialchars($returnVillageArray[$i-1]['name']).'</a></td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&id=".$_GET['id'])."&vill=".$_GET['vill'].'">'.$returnVillageArray[$i-1]['name'].'</a></td>
|
||||
<td class="aligned_coords"><div class="cox">('.$returnVillageArray[$i-1]['x'].'</div><div class="pi">|</div><div class="coy">'.$returnVillageArray[$i-1]['y'].')</div></td></tr>';
|
||||
}}else{
|
||||
for($i=1;$i<=count($session->villages);++$i){echo'
|
||||
<tr>
|
||||
<td class="dot '.(($_SESSION['wid'] == $returnVillageArray[$i-1]['wref'] ) ? 'hl':'').'">●</td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&id=".$_GET['id'])."&vill=".$_GET['vill'].'">'.$returnVillageArray[$i-1]['name'].'</a></td>
|
||||
<td class="aligned_coords"><div class="cox">('.$returnVillageArray[$i-1]['x'].'</div><div class="pi">|</div><div class="coy">'.$returnVillageArray[$i-1]['y'].')</div></td></tr>';
|
||||
}}?>
|
||||
</tbody>
|
||||
|
||||
+44
@@ -78,6 +78,50 @@ if($_GET['aid'] or $session->alliance!=0){
|
||||
<script type="text/javascript">
|
||||
|
||||
window.addEvent('domready', start);
|
||||
function getMouseCoords(e) {
|
||||
var coords = {};
|
||||
if (!e) var e = window.event;
|
||||
if (e.pageX || e.pageY) {
|
||||
coords.x = e.pageX;
|
||||
coords.y = e.pageY;
|
||||
}
|
||||
else if (e.clientX || e.clientY) {
|
||||
coords.x = e.clientX + document.body.scrollLeft
|
||||
+ document.documentElement.scrollLeft;
|
||||
coords.y = e.clientY + document.body.scrollTop
|
||||
+ document.documentElement.scrollTop;
|
||||
}
|
||||
return coords;
|
||||
}
|
||||
|
||||
function med_mouseMoveHandler(e, desc_string){
|
||||
var coords = getMouseCoords(e);
|
||||
med_showDescription(coords, desc_string);
|
||||
}
|
||||
|
||||
function med_closeDescription(){
|
||||
var layer = document.getElementById("medal_mouseover");
|
||||
layer.className = "hide";
|
||||
}
|
||||
|
||||
function init_local(){
|
||||
med_init();
|
||||
}
|
||||
|
||||
function med_init(){
|
||||
layer = document.createElement("div");
|
||||
layer.id = "medal_mouseover";
|
||||
layer.className = "hide";
|
||||
document.body.appendChild(layer);
|
||||
}
|
||||
|
||||
function med_showDescription(coords, desc_string){
|
||||
var layer = document.getElementById("medal_mouseover");
|
||||
layer.style.top = (coords.y + 25)+ "px";
|
||||
layer.style.left = (coords.x - 20) + "px";
|
||||
layer.className = "";
|
||||
layer.innerHTML = desc_string;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user