From 37f49aec6f9075692d73f64ec2d547d220fa1dab Mon Sep 17 00:00:00 2001 From: Catalin Novgorodschi <1140613+Shadowss@users.noreply.github.com> Date: Wed, 29 Apr 2026 08:08:14 +0300 Subject: [PATCH] Fix bugs Fix ban_msg added name and reason, fix home from adminpanel, fix server_info from admin panel. Added credits --- Admin/Templates/ban_msg.tpl | 84 ++++++++++++++------- Admin/Templates/home.tpl | 90 +++++++++++++++-------- Admin/Templates/server_info.tpl | 121 +++++++++++++++++-------------- install/data/constant_format.tpl | 6 +- install/include/accounts.php | 15 ++++ install/templates/accounts.tpl | 13 ++-- install/templates/config.tpl | 27 +++---- install/templates/dataform.tpl | 15 ++-- install/templates/end.tpl | 16 ++-- install/templates/menu.tpl | 13 ++-- install/templates/wdata.tpl | 14 ++-- 11 files changed, 242 insertions(+), 172 deletions(-) diff --git a/Admin/Templates/ban_msg.tpl b/Admin/Templates/ban_msg.tpl index 8f9e0e05..2ca46a69 100644 --- a/Admin/Templates/ban_msg.tpl +++ b/Admin/Templates/ban_msg.tpl @@ -2,38 +2,66 @@ ################################################################################# ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## --------------------------------------------------------------------------- ## -## Filename ban_msq.tpl ## +## Filename ban_msg.tpl ## ## Developed by: yi12345 ## -## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## +## Reworked: Shadow ## +## License: TravianZ Project ## +## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## ## ## ################################################################################# -$time = time(); -$ban = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."banlist WHERE `uid` = '".(int) $session->uid."' and active = 1"); -$ban1 = mysqli_fetch_array($ban); + +$uid = isset($session->uid) ? (int)$session->uid : 0; +$name = isset($session->username) ? $session->username : 'Unknown'; +$reason = 'No reason specified'; + + + /* ========================= + DB CONNECTION SAFE CHECK + ========================= */ + +if($uid > 0){ + + $query = "SELECT reason FROM ".TB_PREFIX."banlist WHERE uid = $uid LIMIT 1"; + + // ๐ฅ AICI E FIXUL IMPORTANT + $res = mysqli_query($database->dblink, $query); + + if($res && mysqli_num_rows($res) > 0){ + $row = mysqli_fetch_assoc($res); + if(!empty($row['reason'])){ + $reason = $row['reason']; + } + } +} ?> -
-Hello ! -You have been banned due to a violation of the rules. - -Your banning reason is . - +
+
+Hello !
+You have been banned due to a violation of the rules.
+
+Your banning reason is .
+
+
+
+To ensure that you won't get banned again in the future, you should read the rules carefully:
+
+
+
| Troops on the Server | -|||||||||
|---|---|---|---|---|---|---|---|---|---|
| Troops on the Server | +![]() | ';
+ }
- echo '';
- for($i=1; $i<11; $i++) {
- echo ''.($units_villages['u'.$i] + $units_enforcements['u'.$i]).' | '; - } + echo ''; + for($i=1; $i<11; $i++) { + $total = ($units_villages['u'.$i] + $units_enforcements['u'.$i]); + echo ''.formatNum($total).' | '; + } - echo ""; - for($i=11; $i<21; $i++) { - echo '![]() | ';
- }
+ echo "";
+ for($i=11; $i<21; $i++) {
+ echo '![]() | ';
+ }
- echo '';
- for($i=11; $i<21; $i++) {
- echo ''.($units_villages['u'.$i] + $units_enforcements['u'.$i]).' | '; - } + echo '|||
| '.formatNum($total).' | '; + } - echo "![]() | ';
- }
+ echo "";
+ for($i=21; $i<31; $i++) {
+ echo '![]() | ';
+ }
- echo '';
- for($i=21; $i<31; $i++) {
- echo ''.($units_villages['u'.$i] + $units_enforcements['u'.$i]).' | '; - } + echo '||||||
| '.formatNum($total).' | '; + } - echo "![]() | ';
- }
+ echo "";
+ for($i=31; $i<41; $i++) {
+ echo '![]() | ';
+ }
- echo '';
- for($i=31; $i<41; $i++) {
- echo ''.($units_villages['u'.$i] + $units_enforcements['u'.$i]).' | '; - } + echo '||||||
| '.formatNum($total).' | '; + } - echo "![]() | ';
- }
+ echo "";
+ for($i=41; $i<51; $i++) {
+ echo '![]() | ';
+ }
- echo '';
- for($i=41; $i<51; $i++) {
- echo ''.($units_villages['u'.$i] + $units_enforcements['u'.$i]).' | '; - } - ?> - -||||||
Thanks for installing TravianZ. diff --git a/install/templates/menu.tpl b/install/templates/menu.tpl index 24977125..821f4f6e 100644 --- a/install/templates/menu.tpl +++ b/install/templates/menu.tpl @@ -5,15 +5,12 @@ ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## --------------------------------------------------------------------------- ## ## Project: TravianZ ## -## Version: 22.06.2015 ## -## Filename menu.tpl ## -## Developed by: Mr.php , Advocaite , brainiacX , yi12345 , Shadow , ronix ## -## Fixed by: Shadow - STARVATION , HERO FIXED COMPL. ## -## Fixed by: InCube - double troops ## +## Filename menu.php ## +## Developed by: Dzoki ## ## License: TravianZ Project ## -## Copyright: TravianZ (c) 2010-2015. All rights reserved. ## -## URLs: http://travian.shadowss.ro ## -## Source code: https://github.com/Shadowss/TravianZ ## +## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## +## URLs: http://travian.shadowss.ro ## +## Source code: https://github.com/Shadowss/TravianZ ## ## ## ################################################################################# diff --git a/install/templates/wdata.tpl b/install/templates/wdata.tpl index f7bc384d..06ed63c9 100644 --- a/install/templates/wdata.tpl +++ b/install/templates/wdata.tpl @@ -4,16 +4,12 @@ ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## --------------------------------------------------------------------------- ## ## Project: TravianZ ## -## Version: 28.10.2025 ## -## Filename wdata.tpl ## -## Developed by: Mr.php , Advocaite , brainiacX , yi12345 , Shadow , ronix ## -## Fixed by: Shadow - STARVATION , HERO FIXED COMPL. ## -## Fixed by: InCube - double troops ## -## Fixed by: lietuvis10 - crop finder ## +## Filename dataform.php ## +## Developed by: Dzoki ## ## License: TravianZ Project ## -## Copyright: TravianZ (c) 2010-2015. All rights reserved. ## -## URLs: http://travian.shadowss.ro ## -## Source code: https://github.com/Shadowss/TravianZ ## +## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## +## URLs: http://travian.shadowss.ro ## +## Source code: https://github.com/Shadowss/TravianZ ## ## ## #################################################################################