From b60d775e959820a8c936535a94972336db62bb40 Mon Sep 17 00:00:00 2001 From: Catalin Novgorodschi <1140613+Shadowss@users.noreply.github.com> Date: Mon, 11 Jun 2018 13:46:14 +0300 Subject: [PATCH 1/6] Winner text updated +post the second and third attacker +post the second and third deffender +text updated like real travian. --- winner.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/winner.php b/winner.php index 7495a983..0cd6cfb8 100644 --- a/winner.php +++ b/winner.php @@ -224,12 +224,14 @@ else { who recieves the title "Winner of this era"!

- "Total Population: ">" was the ruler over the largest personal empire, followed closely by "Total Population: ">" and "Total Population: ">".
- "Attack Points: ">" slew more than any other, and was the mightiest, most fearsome commander.
- "Defence Points: ">" was the most glorious defender, slaugtering enemies at the village gates, staining the lands around those villages with their blood. -

-

Congratulations to everyone.

-

+ "Total Population: ">" was the ruler over the largest personal empire, followed closely by "Total Population: ">" and "Total Population: ">".

+ Without requiring any introduction, "Attack Points: ">" was quickly recognized in the gathered crowd, with shades of awe and fear. Building a reputation for cunning and cruel tactics on the battlefield, he is known as the most ruthless of the attackers. Together, with glancing gaze and the glory of the won battles, there are "Attack Points: ">" and "Attack Points: ">" commanders of the second and third army of attack. Their skill in the battle will inspire legends in the coming era.

+ "Defence Points: ">" was greeted by the gathered, while following the procession to the top. A brilliant strategist and champion of the people, he is known throughout the world as the greatest defender ever to protect a city. Next to honor, "Defence Points: "> and "Defence Points: ">" the commanders of the second and third armies of brave defenders look proudly at the grateful crowd. +
+

Warriors, leaders, heroes, stood together, looking over the world they explored and conquered. Although the feast will end and people will go back to their daily lives again, this day will remain in their memory forever.

+
+

We, the Travian Romania Team, thank you and we look forward to a new adventure in a new Travian world.

+
Best Regards,
Team



(By: TravianZ team v8.3.4)

From 2cd42a3e4e0a744919fa42f2e677331c1fdc2752 Mon Sep 17 00:00:00 2001 From: Catalin Novgorodschi <1140613+Shadowss@users.noreply.github.com> Date: Mon, 11 Jun 2018 14:55:22 +0300 Subject: [PATCH 2/6] Ups something went wrong @iopietro a little forgot :)) --- Templates/Plus/3.tpl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Templates/Plus/3.tpl b/Templates/Plus/3.tpl index 0641bfb0..14fd9e8b 100644 --- a/Templates/Plus/3.tpl +++ b/Templates/Plus/3.tpl @@ -15,6 +15,7 @@ if(mysqli_num_rows($MyGold)){ if($session->gold == 0) echo "

You currently don't own gold.

"; else echo "

You currently have $session->gold gold

"; } + ?> @@ -55,7 +56,7 @@ $date2 = strtotime("NOW"); if ($datetimep == 0) echo "get PLUS
"; else -{ + if ($datetimep <= $date2) { print "Your PLUS advantage has ended.
"; mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set plus = '0' where `id`='".$session->uid."'") or die(mysqli_error($database->dblink)); @@ -477,9 +478,9 @@ if (mysqli_num_rows($MyGold)) { }} else { echo 'On';} } - ?> +?> - \ No newline at end of file + From 216537215aab49ec67213de9fc49949ee26a1155 Mon Sep 17 00:00:00 2001 From: iopietro Date: Mon, 11 Jun 2018 15:49:14 +0200 Subject: [PATCH 3/6] General fixes +Natars' account will now be excluded from the Top 3 Defenders in winner.php +Fixed a bug that showed the fourth attacker and defender of the server instead of the third one --- winner.php | 83 +++++++++++++++++++++++------------------------------- 1 file changed, 35 insertions(+), 48 deletions(-) diff --git a/winner.php b/winner.php index 0cd6cfb8..a96ac813 100644 --- a/winner.php +++ b/winner.php @@ -38,13 +38,12 @@ if(isset($_GET['newdid'])) { header("Location: ".$_SERVER['PHP_SELF']); exit; } -else { - $building->procBuild($_GET); -} +else $building->procBuild($_GET); + $sql = mysqli_query($database->dblink,"SELECT vref FROM ".TB_PREFIX."fdata WHERE f99 = '100' and f99t = '40'"); $winner = mysqli_num_rows($sql); - if($winner!=0){ + if($winner > 0){ ## Get Rankings for Ranking Section ## Top 3 Population @@ -64,16 +63,13 @@ else { AND " . TB_PREFIX . "users.id = userid )allitag FROM " . TB_PREFIX . "users - WHERE " . TB_PREFIX . "users.access < ".(INCLUDE_ADMIN ? "10" : "8")." AND " . TB_PREFIX . "users.id > 4 + WHERE " . TB_PREFIX . "users.access < ".(INCLUDE_ADMIN ? "10" : "8")." AND " . TB_PREFIX . "users.tribe <= 3 ORDER BY totalpop DESC, totalvillages DESC, username ASC"; $result = (mysqli_query($database->dblink,$q)); - while($row = mysqli_fetch_assoc($result)) - { - $datas[] = $row; - } - foreach($datas as $result) - { + while($row = mysqli_fetch_assoc($result)) $datas[] = $row; + + foreach($datas as $result){ $value['userid'] = $result['userid']; $value['username'] = $result['username']; $value['alliance'] = $result['alliance']; @@ -93,16 +89,13 @@ else { WHERE " . TB_PREFIX . "vdata.owner = userid )pop FROM " . TB_PREFIX . "users - WHERE " . TB_PREFIX . "users.apall >=0 AND " . TB_PREFIX . "users.access < " . (INCLUDE_ADMIN ? "10" : "8") . " AND " . TB_PREFIX . "users.tribe <= 3 + WHERE " . TB_PREFIX . "users.apall >= 0 AND " . TB_PREFIX . "users.access < " . (INCLUDE_ADMIN ? "10" : "8") . " AND " . TB_PREFIX . "users.tribe <= 3 ORDER BY " . TB_PREFIX . "users.apall DESC, pop DESC, username ASC"; - $result = mysqli_query($database->dblink,$q) or die(mysqli_error($database->dblink)); - while($row = mysqli_fetch_assoc($result)) - { - $attacker[] = $row; - } - foreach($attacker as $key => $row) - { + $result = mysqli_query($database->dblink,$q); + while($row = mysqli_fetch_assoc($result)) $attacker[] = $row; + + foreach($attacker as $key => $row){ $value['username'] = $row['username']; $value['totalvillages'] = $row['totalvillages']; $value['id'] = $row['userid']; @@ -111,25 +104,22 @@ else { } ## Top Defender $q = " - SELECT " . TB_PREFIX . "users.id userid, " . TB_PREFIX . "users.username username, " . TB_PREFIX . "users.dpall, ( - SELECT COUNT( " . TB_PREFIX . "vdata.wref ) - FROM " . TB_PREFIX . "vdata - WHERE " . TB_PREFIX . "vdata.owner = userid AND type != 99 + SELECT ".TB_PREFIX."users.id userid, ".TB_PREFIX."users.username username, ".TB_PREFIX."users.dpall, ( + SELECT COUNT(".TB_PREFIX."vdata.wref) + FROM ".TB_PREFIX."vdata + WHERE ".TB_PREFIX."vdata.owner = userid AND type != 99 )totalvillages, ( - SELECT SUM( " . TB_PREFIX . "vdata.pop ) - FROM " . TB_PREFIX . "vdata - WHERE " . TB_PREFIX . "vdata.owner = userid + SELECT SUM(".TB_PREFIX."vdata.pop) + FROM ". TB_PREFIX . "vdata + WHERE ". TB_PREFIX . "vdata.owner = userid )pop - FROM " . TB_PREFIX . "users - WHERE " . TB_PREFIX . "users.dpall >=0 AND " . TB_PREFIX . "users.access < " . (INCLUDE_ADMIN ? "10" : "8") . " - ORDER BY " . TB_PREFIX . "users.dpall DESC, pop DESC, username ASC"; - $result = mysqli_query($database->dblink,$q) or die(mysqli_error($database->dblink)); - while($row = mysqli_fetch_assoc($result)) - { - $defender[] = $row; - } - foreach($defender as $key => $row) - { + FROM ".TB_PREFIX."users + WHERE ". TB_PREFIX."users.dpall >= 0 AND ".TB_PREFIX."users.access < ".(INCLUDE_ADMIN ? "10" : "8")." AND ".TB_PREFIX."users.tribe <= 3 + ORDER BY ".TB_PREFIX."users.dpall DESC, pop DESC, username ASC"; + $result = mysqli_query($database->dblink,$q); + while($row = mysqli_fetch_assoc($result)) $defender[] = $row; + + foreach($defender as $key => $row){ $value['username'] = $row['username']; $value['totalvillages'] = $row['totalvillages']; $value['id'] = $row['userid']; @@ -144,16 +134,16 @@ else { $winningvillagename = $database->getVillage($vref)['name']; $owner = $database->getVillage($vref)['owner']; - $sql = mysqli_query($database->dblink,"SELECT username FROM ".TB_PREFIX."users WHERE id = '$owner'")or die(mysqli_error($database->dblink)); + $sql = mysqli_query($database->dblink,"SELECT username FROM ".TB_PREFIX."users WHERE id = '$owner'"); $username = mysqli_result($sql, 0); - $sql = mysqli_query($database->dblink,"SELECT alliance FROM ".TB_PREFIX."users WHERE id = '$owner'")or die(mysqli_error($database->dblink)); + $sql = mysqli_query($database->dblink,"SELECT alliance FROM ".TB_PREFIX."users WHERE id = '$owner'"); $allianceid = mysqli_result($sql, 0); - $sql = mysqli_query($database->dblink,"SELECT name, tag FROM ".TB_PREFIX."alidata WHERE id = '$allianceid'")or die(mysqli_error($database->dblink)); + $sql = mysqli_query($database->dblink,"SELECT name, tag FROM ".TB_PREFIX."alidata WHERE id = '$allianceid'"); $winningalliance = mysqli_result($sql, 0); - $sql = mysqli_query($database->dblink,"SELECT tag FROM ".TB_PREFIX."alidata WHERE id = '$allianceid'")or die(mysqli_error($database->dblink)); + $sql = mysqli_query($database->dblink,"SELECT tag FROM ".TB_PREFIX."alidata WHERE id = '$allianceid'"); $winningalliancetag = mysqli_result($sql, 0); $sql = mysqli_query($database->dblink,"SELECT ww_lastupdate FROM ".TB_PREFIX."fdata WHERE vref = '$vref'"); @@ -175,14 +165,11 @@ else { gpack == null || GP_ENABLE == false) - { + if($session->gpack == null || GP_ENABLE == false){ echo " "; - } - else - { + }else{ echo " "; @@ -225,12 +212,12 @@ else { "Total Population: ">" was the ruler over the largest personal empire, followed closely by "Total Population: ">" and "Total Population: ">".

- Without requiring any introduction, "Attack Points: ">" was quickly recognized in the gathered crowd, with shades of awe and fear. Building a reputation for cunning and cruel tactics on the battlefield, he is known as the most ruthless of the attackers. Together, with glancing gaze and the glory of the won battles, there are "Attack Points: ">" and "Attack Points: ">" commanders of the second and third army of attack. Their skill in the battle will inspire legends in the coming era.

- "Defence Points: ">" was greeted by the gathered, while following the procession to the top. A brilliant strategist and champion of the people, he is known throughout the world as the greatest defender ever to protect a city. Next to honor, "Defence Points: "> and "Defence Points: ">" the commanders of the second and third armies of brave defenders look proudly at the grateful crowd. + Without requiring any introduction, "Attack Points: ">" was quickly recognized in the gathered crowd, with shades of awe and fear. Building a reputation for cunning and cruel tactics on the battlefield, he is known as the most ruthless of the attackers. Together, with glancing gaze and the glory of the won battles, there are "Attack Points: ">" and "Attack Points: ">" commanders of the second and third army of attack. Their skill in the battle will inspire legends in the coming era.

+ "Defence Points: ">" was greeted by the gathered, while following the procession to the top. A brilliant strategist and champion of the people, he is known throughout the world as the greatest defender ever to protect a city. Next to honor, "Defence Points: "> and "Defence Points: ">" the commanders of the second and third armies of brave defenders look proudly at the grateful crowd.

Warriors, leaders, heroes, stood together, looking over the world they explored and conquered. Although the feast will end and people will go back to their daily lives again, this day will remain in their memory forever.


-

We, the Travian Romania Team, thank you and we look forward to a new adventure in a new Travian world.

+

We, the TravianZ Team, thank you and we look forward to a new adventure in a new TravianZ world.


Best Regards,
Team



From 365e56addf925552a118bc6635b534bde3ed8de6 Mon Sep 17 00:00:00 2001 From: iopietro Date: Mon, 11 Jun 2018 16:01:37 +0200 Subject: [PATCH 4/6] A little forgetfulness --- Templates/Plus/3.tpl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Templates/Plus/3.tpl b/Templates/Plus/3.tpl index 14fd9e8b..fd9eabe9 100644 --- a/Templates/Plus/3.tpl +++ b/Templates/Plus/3.tpl @@ -17,9 +17,6 @@ if(mysqli_num_rows($MyGold)){ } ?> - - - @@ -56,7 +53,7 @@ $date2 = strtotime("NOW"); if ($datetimep == 0) echo "get PLUS
"; else - +{ if ($datetimep <= $date2) { print "Your PLUS advantage has ended.
"; mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set plus = '0' where `id`='".$session->uid."'") or die(mysqli_error($database->dblink)); @@ -100,6 +97,7 @@ if (mysqli_num_rows($MyGold)) { } else { echo 'too little gold';} +} } ?> @@ -339,7 +337,7 @@ echo " ".($holdmr4). " mins"; echo ''.(PLUS_PRODUCTION/3600).' Hours'; } ?> - + + + + + + + + + + + + +
Gold5 + access != BANNED){ if (mysqli_num_rows($MyGold)) { From 048b0d9589a7e897e7bc1df1b65631ee6c80c5d0 Mon Sep 17 00:00:00 2001 From: iopietro Date: Mon, 11 Jun 2018 16:03:54 +0200 Subject: [PATCH 5/6] General fixes +Better indentation, why doesn't anyone use arrays :( --- Templates/Plus/3.tpl | 792 ++++++++++++++++++++++--------------------- 1 file changed, 408 insertions(+), 384 deletions(-) diff --git a/Templates/Plus/3.tpl b/Templates/Plus/3.tpl index fd9eabe9..348eb151 100644 --- a/Templates/Plus/3.tpl +++ b/Templates/Plus/3.tpl @@ -1,43 +1,45 @@ dblink,"SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink)); +//TODO: Reduce this file by a lot, by using arrays +$MyGold = mysqli_query($database->dblink, "SELECT * FROM " . TB_PREFIX . "users WHERE `id`='" . $session->uid . "'") or die(mysqli_error($database->dblink)); $golds = mysqli_fetch_array($MyGold); -include("Templates/Plus/pmenu.tpl"); +include ("Templates/Plus/pmenu.tpl"); - -$MyGold = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink)); +$MyGold = mysqli_query($database->dblink, "SELECT * FROM " . TB_PREFIX . "users WHERE `id`='" . $session->uid . "'") or die(mysqli_error($database->dblink)); $golds = mysqli_fetch_array($MyGold); $today = date("mdHi"); -if(mysqli_num_rows($MyGold)){ - if($session->gold == 0) echo "

You currently don't own gold.

"; - else echo "

You currently have $session->gold gold

"; +if (mysqli_num_rows($MyGold)) { + if ($session->gold == 0) + echo "

You currently don't own gold.

"; + else + echo "

You currently have $session->gold gold

"; } - ?> - - - - - - - +?> +
Plus function
+ + + + + + - - - - - - - + + + + + + + - - - + + + - - - + - +?> + + + - - + + - - - - + + + - - - + + + - + - - + + - - - + + + + + '; + } + } } else { - echo 'too little gold';} + if (mysqli_num_rows($MyGold)) { + if ($golds['gold'] > 4 && $tl_b2 < $date2) { + echo 'Activate'; + } elseif ($golds['gold'] > 4 && $tl_b2 > $date2) { + echo ' Extend'; + } else { + echo 'too little gold'; + } + } } -} else { -if (mysqli_num_rows($MyGold)) { - if($golds['gold'] > 4 && $tl_b2 < $date2) { - echo 'Activate'; -}elseif - ($golds['gold'] > 4 && $tl_b2 > $date2) { - echo ' Extend'; -} else { - echo 'too little gold';} -} -} - ?> +?> - + + + - - - + + - - - + + + - + - + - - + - - - + + + - + - - - - + + + + - - - - - + + + + - - - - - - - - - - - - -
Plus function
DescriptionDurationGoldAction
DescriptionDurationGoldAction
- Plus Account
- +
Plus Account
"; -else +else { if ($datetimep <= $date2) { print "Your PLUS advantage has ended.
"; - mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set plus = '0' where `id`='".$session->uid."'") or die(mysqli_error($database->dblink)); + mysqli_query($database->dblink, "UPDATE " . TB_PREFIX . "users set plus = '0' where `id`='" . $session->uid . "'") or die(mysqli_error($database->dblink)); } else { - -$holdtotmin=(($datetimep-$date2)/60); -$holdtothr=(($datetimep-$date2)/3600); -$holdtotday=intval(($datetimep-$date2)/86400); - echo "Remaining: ".$holdtotday. " days"; - -$holdhr=intval($holdtothr-($holdtotday*24)); - echo " ".($holdhr). " hours "; - -$holdmr=intval($holdtotmin-(($holdhr*60)+($holdtotday*1440))); - echo " ".($holdmr). " mins"; - } -?> -
+ + $holdtotmin = (($datetimep - $date2) / 60); + $holdtothr = (($datetimep - $date2) / 3600); + $holdtotday = intval(($datetimep - $date2) / 86400); + echo "Remaining: " . $holdtotday . " days"; + + $holdhr = intval($holdtothr - ($holdtotday * 24)); + echo " " . ($holdhr) . " hours "; + + $holdmr = intval($holdtotmin - (($holdhr * 60) + ($holdtotday * 1440))); + echo " " . ($holdmr) . " mins"; + } + ?> +
= 86400) { + echo '' . (PLUS_TIME / 86400) . ' Days'; + } else if (PLUS_TIME < 86400) { + echo '' . (PLUS_TIME / 3600) . ' Hours'; + } + ?> = 86400){ - echo ''.(PLUS_TIME/86400).' Days'; - } else if(PLUS_TIME < 86400){ - echo ''.(PLUS_TIME/3600).' Hours'; - } ?> - Gold10 + Gold10 dblink,"SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink)); + $MyGold = mysqli_query($database->dblink, "SELECT * FROM " . TB_PREFIX . "users WHERE `id`='" . $session->uid . "'") or die(mysqli_error($database->dblink)); $golds = mysqli_fetch_array($MyGold); - -if (mysqli_num_rows($MyGold)) { - if($golds['gold'] > 9 && $datetimep < $date2) { - echo ' + + if (mysqli_num_rows($MyGold)) { + if ($golds['gold'] > 9 && $datetimep < $date2) { + echo ' Activate'; -}elseif - ($golds['gold'] > 9 && $datetimep > $date2) { - echo ' + } elseif ($golds['gold'] > 9 && $datetimep > $date2) { + echo ' Extend'; - -} else { - echo 'too little gold';} + } else { + echo 'too little gold'; + } + } } -} - ?> -
- +25% Lumber Production: Lumber
- +
+25% Lumber Production: Lumber
Remaining ".$holdtotday1. " days "; -echo " ".($holdhr1). " hours "; -echo " ".($holdmr1). " mins "; - - } +if ($tl_b1 < $date2) { + print " "; +} else { + + echo "Remaining " . $holdtotday1 . " days "; + echo " " . ($holdhr1) . " hours "; + echo " " . ($holdmr1) . " mins "; +} ?>   -
= 86400){ - echo ''.(PLUS_PRODUCTION/86400).' Days'; - } else if(PLUS_PRODUCTION < 86400){ - echo ''.(PLUS_PRODUCTION/3600).' Hours'; - } ?>Gold5 + = 86400) { + echo '' . (PLUS_PRODUCTION / 86400) . ' Days'; +} else if (PLUS_PRODUCTION < 86400) { + echo '' . (PLUS_PRODUCTION / 3600) . ' Hours'; +} +?>Gold5 access != BANNED){ -if (mysqli_num_rows($MyGold)) { - if($golds['gold'] > 4 && $tl_b1 < $date2) { - echo 'Activate'; -}elseif - ($golds['gold'] > 4 && $datetime1 > $date2) { - echo ' Extend'; +if ($session->access != BANNED) { + if (mysqli_num_rows($MyGold)) { + if ($golds['gold'] > 4 && $tl_b1 < $date2) { + echo 'Activate'; + } elseif ($golds['gold'] > 4 && $datetime1 > $date2) { + echo ' Extend'; + } else { + echo 'too little gold'; + } + } } else { - echo 'too little gold';} -} -} else { -if (mysqli_num_rows($MyGold)) { - if($golds['gold'] > 4 && $tl_b1 < $date2) { - echo 'Activate'; -}elseif - ($golds['gold'] > 4 && $datetime1 > $date2) { - echo ' Extend'; -} else { - echo 'too little gold';} -} + if (mysqli_num_rows($MyGold)) { + if ($golds['gold'] > 4 && $tl_b1 < $date2) { + echo 'Activate'; + } elseif ($golds['gold'] > 4 && $datetime1 > $date2) { + echo ' Extend'; + } else { + echo 'too little gold'; + } + } } ?>
- +25% Clay Production: Clay
- +
+25% Clay Production: Clay
Remaining: ".$holdtotday2. " days "; -echo " ".($holdhr2). " hours "; -echo " ".($holdmr2). " mins"; - - } +if ($tl_b2 < $date2) { + print " "; +} else { + + echo "Remaining: " . $holdtotday2 . " days "; + echo " " . ($holdhr2) . " hours "; + echo " " . ($holdmr2) . " mins"; +} ?>   -
= 86400){ - echo ''.(PLUS_PRODUCTION/86400).' Days'; - } else if(PLUS_PRODUCTION < 86400){ - echo ''.(PLUS_PRODUCTION/3600).' Hours'; - } ?>Gold5 +if (PLUS_PRODUCTION >= 86400) { + echo '' . (PLUS_PRODUCTION / 86400) . ' Days'; +} else if (PLUS_PRODUCTION < 86400) { + echo '' . (PLUS_PRODUCTION / 3600) . ' Hours'; +} +?>Gold5 access != BANNED){ -if (mysqli_num_rows($MyGold)) { - if($golds['gold'] > 4 && $tl_b2 < $date2) { - echo 'Activate'; -}elseif - ($golds['gold'] > 4 && $tl_b2 > $date2) { - echo ' Extend'; +if ($session->access != BANNED) { + if (mysqli_num_rows($MyGold)) { + if ($golds['gold'] > 4 && $tl_b2 < $date2) { + echo 'Activate'; + } elseif ($golds['gold'] > 4 && $tl_b2 > $date2) { + echo ' Extend'; + } else { + echo 'too little gold
- +25% Iron Production: Iron
- +
+25% Iron Production: Iron
Remaining: ".$holdtotday3. " days "; -echo " ".($holdhr3). " hours "; -echo " ".($holdmr3). " mins"; - - } +if ($tl_b3 < $date2) { + print " "; +} else { + + echo "Remaining: " . $holdtotday3 . " days "; + echo " " . ($holdhr3) . " hours "; + echo " " . ($holdmr3) . " mins"; +} ?>   -
= 86400){ - echo ''.(PLUS_PRODUCTION/86400).' Days'; - } else if(PLUS_PRODUCTION < 86400){ - echo ''.(PLUS_PRODUCTION/3600).' Hours'; - } ?>Gold5 + = 86400) { + echo '' . (PLUS_PRODUCTION / 86400) . ' Days'; +} else if (PLUS_PRODUCTION < 86400) { + echo '' . (PLUS_PRODUCTION / 3600) . ' Hours'; +} +?>Gold5 access != BANNED){ -if (mysqli_num_rows($MyGold)) { - if($golds['gold'] > 4 && $tl_b3 < $date2) { - echo 'Activate'; -}elseif - ($golds['gold'] > 4 && $tl_b3 > $date2) { - echo ' Extend'; -} else { - echo 'too little gold';} -} +if ($session->access != BANNED) { + if (mysqli_num_rows($MyGold)) { + if ($golds['gold'] > 4 && $tl_b3 < $date2) { + echo 'Activate'; + } elseif ($golds['gold'] > 4 && $tl_b3 > $date2) { + echo ' Extend'; + } else { + echo 'too little gold'; + } + } } else { -if (mysqli_num_rows($MyGold)) { - if($golds['gold'] > 4 && $tl_b3 < $date2) { - echo 'Activate'; -}elseif - ($golds['gold'] > 4 && $tl_b3 > $date2) { - echo ' Extend'; -} else { - echo 'too little gold';} + if (mysqli_num_rows($MyGold)) { + if ($golds['gold'] > 4 && $tl_b3 < $date2) { + echo 'Activate'; + } elseif ($golds['gold'] > 4 && $tl_b3 > $date2) { + echo ' Extend'; + } else { + echo 'too little gold'; + } + } } -} - ?> +?>  
- +25% Crop Production: Crop
- +
+25% Crop Production: Crop
Remaining: ".$holdtotday4. " days "; -echo " ".($holdhr4). " hours "; -echo " ".($holdmr4). " mins"; - } +if ($tl_b4 < $date2) { + print " "; +} else { + + echo "Remaining: " . $holdtotday4 . " days "; + echo " " . ($holdhr4) . " hours "; + echo " " . ($holdmr4) . " mins"; +} ?> - 
= 86400){ - echo ''.(PLUS_PRODUCTION/86400).' Days'; - } else if(PLUS_PRODUCTION < 86400){ - echo ''.(PLUS_PRODUCTION/3600).' Hours'; - } ?>Gold5 + = 86400) { + echo '' . (PLUS_PRODUCTION / 86400) . ' Days'; +} else if (PLUS_PRODUCTION < 86400) { + echo '' . (PLUS_PRODUCTION / 3600) . ' Hours'; +} +?>Gold5 access != BANNED){ -if (mysqli_num_rows($MyGold)) { - if($golds['gold'] > 4 && $tl_b4 < $date2) { - echo 'Activate'; -}elseif - ($golds['gold'] > 4 && $tl_b4 > $date2) { - echo ' Extend'; +if ($session->access != BANNED) { + if (mysqli_num_rows($MyGold)) { + if ($golds['gold'] > 4 && $tl_b4 < $date2) { + echo 'Activate'; + } elseif ($golds['gold'] > 4 && $tl_b4 > $date2) { + echo ' Extend'; + } else { + echo 'too little gold'; + } + } } else { - echo 'too little gold';} -} -} else { -if (mysqli_num_rows($MyGold)) { - if($golds['gold'] > 4 && $tl_b4 < $date2) { - echo 'Activate'; -}elseif - ($golds['gold'] > 4 && $tl_b4 > $date2) { - echo ' Extend'; -} else { - echo 'too little gold';} -} + if (mysqli_num_rows($MyGold)) { + if ($golds['gold'] > 4 && $tl_b4 < $date2) { + echo 'Activate'; + } elseif ($golds['gold'] > 4 && $tl_b4 > $date2) { + echo ' Extend'; + } else { + echo 'too little gold'; + } + } } ?>
Complete construction orders and researches in this village now (does not work for Palace and Residence).nowGold2 + Complete construction orders and researches in this + village now (does not work for Palace and Residence).nowGold2 access != BANNED){ -if (mysqli_num_rows($MyGold)) { - if($golds['gold'] > 1) { - echo ' +if ($session->access != BANNED) { + if (mysqli_num_rows($MyGold)) { + if ($golds['gold'] > 1) { + echo ' On'; -} else { - echo 'too little gold'; + } else { + echo 'too little gold'; + } } -} } else { -if (mysqli_num_rows($MyGold)) { - if($golds['gold'] > 1) { - echo ' + if (mysqli_num_rows($MyGold)) { + if ($golds['gold'] > 1) { + echo ' On'; -} else { - echo 'too little gold'; + } else { + echo 'too little gold'; + } } } -} - ?> -
1:1 Trade with the NPC merchantnowGold3 - -access != BANNED){ -if (mysqli_num_rows($MyGold)) { - if($golds['gold'] > 2) { - echo ' NPC'; -} else { - echo 'too little gold'; - } -} -} else { -if (mysqli_num_rows($MyGold)) { - if($golds['gold'] > 2) { - echo ' NPC'; -} else { - echo 'too little gold'; - } -} -} - ?> - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Travian Gold Club
DescriptionDurationGoldAction
-Gold Club
- - -
Whole game round - Gold100 - -dblink,"SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink)); - $golds = mysqli_fetch_array($MyGold); - -if (mysqli_num_rows($MyGold)) { - if($golds['goldclub']==0){ - if($golds['gold'] > 99) { - echo ' - Activate'; -}else{ - echo ' - too little gold'; - -}} else { - echo 'On';} -} ?> -
+
1:1 Trade with the NPC merchantnowGold3 + +access != BANNED) { + if (mysqli_num_rows($MyGold)) { + if ($golds['gold'] > 2) { + echo ' NPC'; + } else { + echo 'too little gold'; + } + } +} else { + if (mysqli_num_rows($MyGold)) { + if ($golds['gold'] > 2) { + echo ' NPC'; + } else { + echo 'too little gold'; + } + } +} +?> +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Travian Gold Club
DescriptionDurationGoldAction
Gold Club
Whole game roundGold100 + +dblink, "SELECT * FROM " . TB_PREFIX . "users WHERE `id`='" . $session->uid . "'") or die(mysqli_error($database->dblink)); +$golds = mysqli_fetch_array($MyGold); + +if (mysqli_num_rows($MyGold)) { + if ($golds['goldclub'] == 0) { + if ($golds['gold'] > 99) { + echo ' + Activate'; + } else { + echo ' + too little gold'; + } + } else { + echo 'On'; + } +} +?> + +
From b7f8eade3461d8050f8ce90f836dc5476c539cf7 Mon Sep 17 00:00:00 2001 From: iopietro Date: Mon, 11 Jun 2018 16:06:40 +0200 Subject: [PATCH 6/6] General building +Starting a building would be nonsense, if the server has already been finished --- winner.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/winner.php b/winner.php index a96ac813..44f5bbeb 100644 --- a/winner.php +++ b/winner.php @@ -23,7 +23,7 @@ $start_timer = $generator->pageLoadTimeStart(); use App\Utils\AccessLogger; if (!function_exists('mysqli_result')) { - function mysqli_result($res, $row, $field=0) { + function mysqli_result($res, $row, $field = 0) { $res->data_seek($row); $datarow = $res->fetch_array(); return $datarow[$field]; @@ -38,7 +38,6 @@ if(isset($_GET['newdid'])) { header("Location: ".$_SERVER['PHP_SELF']); exit; } -else $building->procBuild($_GET); $sql = mysqli_query($database->dblink,"SELECT vref FROM ".TB_PREFIX."fdata WHERE f99 = '100' and f99t = '40'"); $winner = mysqli_num_rows($sql);