mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-05 04:14:22 +00:00
more fixes
This commit is contained in:
@@ -21,6 +21,7 @@ if(!$session->goldclub) {
|
||||
<?php include "Templates/goldClub/farmlist.tpl"; ?>
|
||||
</div>
|
||||
<br />
|
||||
<?php if($hideevasion == 0){ ?>
|
||||
<table cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -72,5 +73,6 @@ if(!$session->goldclub) {
|
||||
<div class="clear"></div><p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" tabindex="8" alt="OK" <?php if(!$market->merchantAvail()) { echo "DISABLED"; }?>/></p></form>
|
||||
</tr>
|
||||
</form>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
@@ -23,6 +23,8 @@ else if($_POST['dname']!=""){
|
||||
$getwref = $database->getVillageByName($_POST['dname']);
|
||||
$checkexist = $database->checkVilExist($getwref);
|
||||
}
|
||||
$villageOwner = $database->getVillageField($getwref,'owner');
|
||||
$userAccess = $database->getUserField($villageOwner,'access',0);
|
||||
$maxcarry = $market->maxcarry;
|
||||
$maxcarry *= $market->merchantAvail();
|
||||
if(isset($_POST['ft'])=='check' && $allres!=0 && $allres <= $maxcarry && ($_POST['x']!="" && $_POST['y']!="" or $_POST['dname']!="") && $checkexist){
|
||||
@@ -209,6 +211,9 @@ if(isset($_POST['ft'])=='check'){
|
||||
|
||||
if(!$checkexist){
|
||||
$error = '<span class="error"><b>No Coordinates selected</b></span>';
|
||||
}elseif($userAccess == '0' or $userAccess == '8' or $userAccess == '9'){
|
||||
$error = '<span class="error"><b>Player is Banned. You cannot send resources to him.</b></span>';
|
||||
}
|
||||
}elseif($_POST['r1']==0 && $_POST['r2']==0 && $_POST['r3']==0 && $_POST['r4']==0){
|
||||
$error = '<span class="error"><b>Resources not selected.</b></span>';
|
||||
}elseif(!$_POST['x'] && !$_POST['y'] && !$_POST['dname']){
|
||||
|
||||
@@ -504,12 +504,8 @@ if($type==18 or $type==19 or $type==20 or $type==21){
|
||||
$data1 = mysql_fetch_assoc($query1);
|
||||
$query2 = mysql_query('SELECT * FROM `' . TB_PREFIX . 'users` WHERE `id` = ' . $data1['owner']);
|
||||
$data2 = mysql_fetch_assoc($query2);
|
||||
if($data2['access']=='0') {
|
||||
echo "» Send troops. (Player is banned)";
|
||||
} else if($data2['access']=='8') {
|
||||
echo "» Send Troops. (Moderator)";
|
||||
} else if($data2['access']=='9') {
|
||||
echo "» Send Troops. (Administrator)";
|
||||
if($data2['access']=='0' or $data2['access']=='8' or $data2['access']=='9') {
|
||||
echo "» Send troops. (Player is banned)";
|
||||
} else if($data2['protect'] < time()) {
|
||||
echo $village->resarray['f39']? "<a href=\"a2b.php?z=".$_GET['d']."\">» Send troops." : "» Send troops. (build a rally point)";
|
||||
} else {
|
||||
@@ -517,11 +513,18 @@ if($type==18 or $type==19 or $type==20 or $type==21){
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="none"><?php echo $building->getTypeLevel(17)? "<a href=\"build.php?z=".$_GET['d']."&id=" . $building->getTypeField(17) . "\">» Send merchant(s)." : "» Send merchant(s). (build marketplace)"; ?></td>
|
||||
<td class="none">
|
||||
<?php
|
||||
if($data2['access']=='0' or $data2['access']=='8' or $data2['access']=='9') {
|
||||
echo "» Send merchant(s). (banned)";
|
||||
} else {
|
||||
echo $building->getTypeLevel(17)? "<a href=\"build.php?z=".$_GET['d']."&id=" . $building->getTypeField(17) . "\">» Send merchant(s)." : "» Send merchant(s). (build marketplace)";
|
||||
}
|
||||
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
<tr>
|
||||
<td>No.</td>
|
||||
<td>Alliance</td>
|
||||
<td>Ranks</td>
|
||||
<td>Population</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
$t1 = $row['t1'];$t2 = $row['t2'];$t3 = $row['t3'];$t4 = $row['t4'];$t5 = $row['t5'];
|
||||
$t6 = $row['t6'];$t7 = $row['t7'];$t8 = $row['t8'];$t9 = $row['t9'];$t10 = $row['t10'];
|
||||
$t11 = 0;
|
||||
$villageOwner = $database->getVillageField($wref,'owner');
|
||||
$userAccess = $database->getUserField($villageOwner,'access',0);
|
||||
if($userAccess != '0' && $userAccess != '8' && $userAccess != '9'){
|
||||
if($tribe == 1){ $uname = "u"; } elseif($tribe == 2){ $uname = "u1"; } elseif($tribe == 3){ $uname = "u2"; }elseif($tribe == 4){ $uname = "u3"; }else {$uname = "u4"; }
|
||||
if($tribe == 1){ $uname1 = "u1"; } elseif($tribe == 2){ $uname1 = "u2"; } elseif($tribe == 3){ $uname1 = "u3"; }elseif($tribe == 4){ $uname1 = "u4"; }else {$uname1 = "u5"; }
|
||||
if($tribe == 1){ $uname2 = ""; } elseif($tribe == 2){ $uname2 = "1"; } elseif($tribe == 3){ $uname2 = "2"; }elseif($tribe == 4){ $uname2 = "3"; }else {$uname2 = "4"; }
|
||||
@@ -79,5 +82,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
header("Location: build.php?id=39&t=99");
|
||||
?>
|
||||
@@ -360,9 +360,12 @@ $NUM1++;
|
||||
<?php } ?>
|
||||
|
||||
<?php if($create == 1){
|
||||
$hideevasion = 1;
|
||||
include("Templates/goldClub/farmlist_add.tpl");
|
||||
}else if($create == 2){
|
||||
$hideevasion = 1;
|
||||
include("Templates/goldClub/farmlist_addraid.tpl");
|
||||
}else if($create == 3){
|
||||
$hideevasion = 1;
|
||||
include("Templates/goldClub/farmlist_editraid.tpl");
|
||||
}
|
||||
@@ -13,8 +13,6 @@ $WrefY = $WrefCoor['y'];
|
||||
$type = $database->getVillageType2($Wref);
|
||||
$oasistype = $type['oasistype'];
|
||||
$vdata = $database->getVillage($Wref);
|
||||
$villageOwner = $database->getVillageField($Wref,'owner');
|
||||
$userAccess = $database->getUserField($villageOwner,'access',0);
|
||||
}elseif($_POST['x']!="" && $_POST['y']!="" && is_numeric($_POST['x']) && is_numeric($_POST['y'])){
|
||||
$Wref = $database->getVilWref($_POST['x'], $_POST['y']);
|
||||
$WrefX = $_POST['x'];
|
||||
@@ -22,15 +20,11 @@ $WrefY = $_POST['y'];
|
||||
$type = $database->getVillageType2($Wref);
|
||||
$oasistype = $type['oasistype'];
|
||||
$vdata = $database->getVillage($Wref);
|
||||
$villageOwner = $database->getVillageField($Wref,'owner');
|
||||
$userAccess = $database->getUserField($villageOwner,'access',0);
|
||||
}
|
||||
if($_POST['x']=="" && $_POST['y']=="" && $_POST['target_id'] == ""){
|
||||
$errormsg .= "Enter coordinates.";
|
||||
}elseif(($_POST['x']=="" || $_POST['y']=="") && $_POST['target_id'] == ""){
|
||||
$errormsg .= "Enter the correct coordinates.";
|
||||
}elseif($userAccess == '9'){
|
||||
$errormsg .= "Player is Admin. You can't attack him.";
|
||||
}elseif($oasistype == 0 && $vdata == 0){
|
||||
$errormsg .= "There is no village on those coordinates.";
|
||||
}elseif($troops == 0){
|
||||
|
||||
@@ -16,8 +16,6 @@ $WrefY = $WrefCoor['y'];
|
||||
$type = $database->getVillageType2($Wref);
|
||||
$oasistype = $type['oasistype'];
|
||||
$vdata = $database->getVillage($Wref);
|
||||
$villageOwner = $database->getVillageField($Wref,'owner');
|
||||
$userAccess = $database->getUserField($villageOwner,'access',0);
|
||||
}elseif($_POST['x']!="" && $_POST['y']!="" && is_numeric($_POST['x']) && is_numeric($_POST['y'])){
|
||||
$Wref = $database->getVilWref($_POST['x'], $_POST['y']);
|
||||
$WrefX = $_POST['x'];
|
||||
@@ -25,8 +23,6 @@ $WrefY = $_POST['y'];
|
||||
$type = $database->getVillageType2($Wref);
|
||||
$oasistype = $type['oasistype'];
|
||||
$vdata = $database->getVillage($Wref);
|
||||
$villageOwner = $database->getVillageField($Wref,'owner');
|
||||
$userAccess = $database->getUserField($villageOwner,'access',0);
|
||||
}
|
||||
$troops = "".$_POST['t1']."+".$_POST['t2']."+".$_POST['t3']."+".$_POST['t4']."+".$_POST['t5']."+".$_POST['t6']."+".$_POST['t7']."+".$_POST['t8']."+".$_POST['t9']."+".$_POST['t10']."";
|
||||
|
||||
@@ -34,8 +30,6 @@ $troops = "".$_POST['t1']."+".$_POST['t2']."+".$_POST['t3']."+".$_POST['t4']."+"
|
||||
$errormsg .= "Enter coordinates.";
|
||||
}elseif(($_POST['x']=="" || $_POST['y']=="") && $_POST['target_id'] == ""){
|
||||
$errormsg .= "Enter the correct coordinates.";
|
||||
}elseif($userAccess == '9'){
|
||||
$errormsg .= "Player is Admin. You can't attack him.";
|
||||
}elseif($oasistype == 0 && $vdata == 0){
|
||||
$errormsg .= "There is no village on those coordinates.";
|
||||
}elseif($troops == 0){
|
||||
|
||||
Reference in New Issue
Block a user