more fixes

This commit is contained in:
unknown
2012-06-18 20:38:27 +03:00
parent 527316097b
commit 86dc4c1904
41 changed files with 2003 additions and 1399 deletions
+2
View File
@@ -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 } ?>
+5
View File
@@ -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']){
+12 -9
View File
@@ -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 "&raquo; Send troops. (Player is banned)";
} else if($data2['access']=='8') {
echo "&raquo; Send Troops. (Moderator)";
} else if($data2['access']=='9') {
echo "&raquo; Send Troops. (Administrator)";
if($data2['access']=='0' or $data2['access']=='8' or $data2['access']=='9') {
echo "&raquo; Send troops. (Player is banned)";
} 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)";
} 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) . "\">&raquo; Send merchant(s)." : "&raquo; Send merchant(s). (build marketplace)"; ?></td>
<td class="none">
<?php
if($data2['access']=='0' or $data2['access']=='8' or $data2['access']=='9') {
echo "&raquo; Send merchant(s). (banned)";
} 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)";
}
?>
</td>
</tr>
<?php } ?>
</tbody>
+1 -1
View File
@@ -136,7 +136,7 @@
<tr>
<td>No.</td>
<td>Alliance</td>
<td>Ranks</td>
<td>Population</td>
</tr>
</thead>
<tbody>
+4
View File
@@ -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");
?>
+3
View File
@@ -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");
}
-6
View File
@@ -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){
-6
View File
@@ -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){