mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-07 13:24:22 +00:00
more updates
This commit is contained in:
@@ -206,6 +206,7 @@ class Automation {
|
||||
$this->checkInvitedPlayes();
|
||||
$this->updateStore();
|
||||
$this->procClimbers();
|
||||
$this->CheckBan();
|
||||
}
|
||||
|
||||
private function loyaltyRegeneration() {
|
||||
@@ -3834,8 +3835,8 @@ $crannyimg = "<img src=\"".GP_LOCATE."img/g/g23.gif\" height=\"20\" width=\"15\"
|
||||
}
|
||||
}
|
||||
|
||||
private function procClimbers() {
|
||||
global $database, $ranking;
|
||||
private function procClimbers() {
|
||||
global $database, $ranking;
|
||||
$users = "SELECT * FROM " . TB_PREFIX . "users WHERE access < " . (INCLUDE_ADMIN ? "10" : "8") . "";
|
||||
$array = $database->query_return($users);
|
||||
$ranking->procRankArray();
|
||||
@@ -3890,7 +3891,19 @@ $crannyimg = "<img src=\"".GP_LOCATE."img/g/g23.gif\" height=\"20\" width=\"15\"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function checkBan() {
|
||||
global $database;
|
||||
$time = time();
|
||||
$q = "SELECT * FROM ".TB_PREFIX."banlist WHERE active = 1 and end < $time";
|
||||
$array = $database->query_return($q);
|
||||
foreach($array as $banlist) {
|
||||
mysql_query("UPDATE ".TB_PREFIX."banlist SET active = 0 WHERE id = ".$banlist['id']."");
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET access = 2 WHERE id = ".$banlist['uid']."");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
$automation = new Automation;
|
||||
?>
|
||||
@@ -312,6 +312,7 @@ class Building {
|
||||
}
|
||||
}
|
||||
$level = $database->getResourceLevel($village->wid);
|
||||
if($session->access!=BANNED){
|
||||
if($database->addBuilding($village->wid,$id,$village->resarray['f'.$id.'t'],$loop,$time+($loop==1?ceil(60/SPEED):0),0,$level['f'.$id] + 1 + count($database->getBuildingByField($village->wid,$id)))) {
|
||||
$database->modifyResource($village->wid,$uprequire['wood'],$uprequire['clay'],$uprequire['iron'],$uprequire['crop'],0);
|
||||
$logging->addBuildLog($village->wid,$this->procResType($village->resarray['f'.$id.'t']),($village->resarray['f'.$id]+($loopsame>0?2:1)),0);
|
||||
@@ -322,6 +323,9 @@ class Building {
|
||||
header("Location: dorf1.php");
|
||||
}
|
||||
}
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -352,11 +356,15 @@ class Building {
|
||||
$time = $this->buildArray[0]['timestamp'] + round($dataarray[$village->resarray['f'.$id]-1]['time'] / 4);
|
||||
}
|
||||
}
|
||||
if($session->access!=BANNED){
|
||||
$level = $database->getResourceLevel($village->wid);
|
||||
if($database->addBuilding($village->wid,$id,$village->resarray['f'.$id.'t'],$loop,$time,0,0,$level['f'.$id] + 1 + count($database->getBuildingByField($village->wid,$id)))) {
|
||||
$logging->addBuildLog($village->wid,$this->procResType($village->resarray['f'.$id.'t']),($village->resarray['f'.$id]-1),2);
|
||||
header("Location: dorf2.php");
|
||||
}
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -383,12 +391,16 @@ class Building {
|
||||
}
|
||||
}
|
||||
if($this->meetRequirement($tid)) {
|
||||
if($session->access!=BANNED){
|
||||
$level = $database->getResourceLevel($village->wid);
|
||||
if($database->addBuilding($village->wid,$id,$tid,$loop,$time,0,$level['f'.$id] + 1 + count($database->getBuildingByField($village->wid,$id)))) {
|
||||
$logging->addBuildLog($village->wid,$this->procResType($tid),($village->resarray['f'.$id]+1),1);
|
||||
$database->modifyResource($village->wid,$uprequire['wood'],$uprequire['clay'],$uprequire['iron'],$uprequire['crop'],0);
|
||||
header("Location: dorf2.php");
|
||||
}
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,6 +250,7 @@ class Units {
|
||||
header("Location: a2b.php");
|
||||
} else {
|
||||
|
||||
if($session->access != BANNED){
|
||||
|
||||
if($session->tribe == 1){ $u = ""; } elseif($session->tribe == 2){ $u = "1"; } elseif($session->tribe == 3){ $u = "2"; }elseif($session->tribe == 4){ $u = "3"; }else {$u = "4"; }
|
||||
|
||||
@@ -334,11 +335,14 @@ class Units {
|
||||
}
|
||||
header("Location: build.php?id=39");
|
||||
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
}}
|
||||
|
||||
private function sendTroopsBack($post) {
|
||||
global $form, $database, $village, $generator, $session, $technology;
|
||||
|
||||
if($session->access != BANNED){
|
||||
$enforce=$database->getEnforceArray($post['ckey'],0);
|
||||
if(($enforce['from']==$village->wid) || ($enforce['vref']==$village->wid)){
|
||||
$to = $database->getVillage($enforce['from']);
|
||||
@@ -459,6 +463,9 @@ class Units {
|
||||
header("Location: a2b.php");
|
||||
}
|
||||
}
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
}
|
||||
|
||||
public function Settlers($post) {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<th></th>
|
||||
<th>Subject</th>
|
||||
<th>Recipient</th>
|
||||
<th class="sent"><a href="nachrichten.php?s=0&t=2&o=1">Sent</a></th>
|
||||
<th class="sent"><a href="nachrichten.php?t=2&s=0&t=2&o=1">Sent</a></th>
|
||||
</tr></thead><tfoot><tr><th><?php
|
||||
$MyGold = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE `username`='".$session->username."'") or die(mysql_error());
|
||||
$golds = mysql_fetch_array($MyGold);
|
||||
@@ -34,17 +34,17 @@
|
||||
echo "«»";
|
||||
}
|
||||
else if (!isset($_GET['s']) && count($message->sent1) > 10) {
|
||||
echo "«<a href=\"?s=10&o=0\">»</a>";
|
||||
echo "«<a href=\"?t=2&s=10&o=0\">»</a>";
|
||||
}
|
||||
else if(isset($_GET['s']) && count($message->sent1) > $_GET['s']) {
|
||||
if(count($message->sent1) > ($_GET['s']+10) && $_GET['s']-10 < count($message->sent1) && $_GET['s'] != 0) {
|
||||
echo "<a href=\"?s=".($_GET['s']-10)."&o=0\">«</a><a href=\"?s=".($_GET['s']+10)."&o=0\">»</a>";
|
||||
echo "<a href=\"?t=2&s=".($_GET['s']-10)."&o=0\">«</a><a href=\"?t=2&s=".($_GET['s']+10)."&o=0\">»</a>";
|
||||
}
|
||||
else if(count($message->sent1) > $_GET['s']+10) {
|
||||
echo "«<a href=\"?s=".($_GET['s']+10)."&o=0\">»</a>";
|
||||
echo "«<a href=\"?t=2&s=".($_GET['s']+10)."&o=0\">»</a>";
|
||||
}
|
||||
else {
|
||||
echo "<a href=\"?s=".($_GET['s']-10)."&o=0\">«</a>»";
|
||||
echo "<a href=\"?t=2&s=".($_GET['s']-10)."&o=0\">«</a>»";
|
||||
}
|
||||
}
|
||||
?></th></tr></tfoot>
|
||||
|
||||
@@ -78,7 +78,6 @@ $end = ($tribe*10);
|
||||
?>
|
||||
|
||||
<h1><?php echo $actionType." to ".$process[1]; ?></h1>
|
||||
<?php if($session->access != BANNED){ ?>
|
||||
<form method="post" action="a2b.php">
|
||||
|
||||
<table id="short_info" cellpadding="1" cellspacing="1">
|
||||
@@ -434,7 +433,4 @@ class="dynamic_img " src="img/x.gif" alt="OK" type="image" onclick="if (this.dis
|
||||
|
||||
<?php } ?>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
else{header("Location: banned.php");}?>
|
||||
</div>
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
if($session->access != BANNED){
|
||||
$to = $database->getVillage($enforce['from']);
|
||||
$fromcoor = $database->getCoor($enforce['from']);
|
||||
$tocoor = $database->getCoor($enforce['vref']);
|
||||
@@ -178,7 +177,4 @@ $tocoor = $database->getCoor($enforce['vref']);
|
||||
<p class="btn"><input value="ok" name="s1" id="btn_ok" class="dynamic_img " src="img/x.gif" alt="OK" type="image" onclick="if (this.disabled==false) {document.getElementsByTagName('form')[0].submit();} this.disabled=true;" onLoad="this.disabled=false;"></p>
|
||||
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
else{header("Location: banned.php");}?>
|
||||
</div>
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
if($session->access != BANNED){
|
||||
$to = $database->getVillage($enforce['from']);
|
||||
$fromcoor = $database->getCoor($enforce['from']);
|
||||
$tocoor = $database->getCoor($enforce['vref']);
|
||||
@@ -179,7 +178,4 @@ $tocoor = $database->getCoor($enforce['vref']);
|
||||
<p class="btn"><input value="ok" name="s1" id="btn_ok" class="dynamic_img " src="img/x.gif" alt="OK" type="image" onclick="if (this.disabled==false) {document.getElementsByTagName('form')[0].submit();} this.disabled=true;" onLoad="this.disabled=false;"></p>
|
||||
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
else{header("Location: banned.php");}?>
|
||||
</div>
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
if($session->access != BANNED){
|
||||
$to = $database->getVillage($enforce['from']);
|
||||
$fromcoor = $database->getCoor($enforce['from']);
|
||||
$tocoor = $database->getCoor($enforce['vref']);
|
||||
@@ -178,7 +177,4 @@ $tocoor = $database->getCoor($enforce['vref']);
|
||||
<p class="btn"><input value="ok" name="s1" id="btn_ok" class="dynamic_img " src="img/x.gif" alt="OK" type="image" onclick="if (this.disabled==false) {document.getElementsByTagName('form')[0].submit();} this.disabled=true;" onLoad="this.disabled=false;"></p>
|
||||
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
else{header("Location: banned.php");}?>
|
||||
</div>
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
if($session->access != BANNED){
|
||||
$to = $database->getVillage($enforce['from']);
|
||||
$fromcoor = $database->getCoor($enforce['from']);
|
||||
$tocoor = $database->getCoor($enforce['vref']);
|
||||
@@ -179,7 +178,4 @@ $tocoor = $database->getCoor($enforce['vref']);
|
||||
<p class="btn"><input value="ok" name="s1" id="btn_ok" class="dynamic_img " src="img/x.gif" alt="OK" type="image" onclick="if (this.disabled==false) {document.getElementsByTagName('form')[0].submit();} this.disabled=true;" onLoad="this.disabled=false;"></p>
|
||||
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
else{header("Location: banned.php");}?>
|
||||
</div>
|
||||
@@ -163,7 +163,7 @@ if($routeaccess = 1){
|
||||
}
|
||||
}
|
||||
}
|
||||
if($session->goldclub == 1 && $session->access != BANNED){
|
||||
if($session->goldclub == 1){
|
||||
if(isset($_GET['t'])==99) {
|
||||
|
||||
if($_GET['action'] == 'addList') {
|
||||
@@ -191,7 +191,11 @@ if($session->goldclub == 1 && $session->access != BANNED){
|
||||
header("Location: build.php?id=39&t=99");
|
||||
}
|
||||
if($_POST['action'] == 'startRaid'){
|
||||
if($session->access != BANNED){
|
||||
include ("Templates/a2b/startRaid.tpl");
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_GET['slid']) && is_numeric($_GET['slid'])) {
|
||||
@@ -216,9 +220,6 @@ if($session->goldclub == 1 && $session->access != BANNED){
|
||||
}
|
||||
}else{
|
||||
$create = 0;
|
||||
if($session->access == BANNED){
|
||||
header("Location: banned.php");
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_POST['a']) == 533374 && isset($_POST['id']) == 39){
|
||||
|
||||
Reference in New Issue
Block a user