Fix ban_msg added name and reason, fix home from adminpanel, fix server_info from admin panel. Added credits
This commit is contained in:
Catalin Novgorodschi
2026-04-29 08:08:14 +03:00
parent 3607a566f9
commit 37f49aec6f
11 changed files with 242 additions and 172 deletions
+56 -28
View File
@@ -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'];
}
}
}
?>
<p></br>
Hello <?php echo $ban1['name']; ?>!
You have been banned due to a violation of the rules.
</br>
Your banning reason is <?php echo $ban1['reason']; ?>.
</br>
<p><br>
Hello <?php echo htmlspecialchars($name, ENT_QUOTES); ?>!
You have been banned due to a violation of the rules.
<br>
Your banning reason is <?php echo htmlspecialchars($reason, ENT_QUOTES); ?>.
<br>
<br><br>
To ensure that you won't get banned again in the future, you should read the rules carefully:
<br><br>
<center>
<a class="rules" href="rules.php">» Game rules</a>
</center>
<br><br><br>
</br></br> To ensure that you won't get banned again in the future, you should read the rules carefully:
</br></br><center> <?php echo "<a class=\"rules\" href=\"rules.php\">» Game rules</a>"; ?> </center>
</br></br></br>
To continue playing contact the Multihunter and put things straight with him/her
</br></br><center> <?php echo "<a class=\"rules\" href=\"nachrichten.php?t=1&id=5\">» Write Message</a>"; ?> </center>
</br></br>
Heed the following advice when writing your message:
</br></br>
● There is always a reason for a ban. <u>Try to think about possible reasons for this ban</u> and put things straight with the Multihunter.
</br>
● Multihunters can review enormous amounts of information about accounts. <u>Stick to the truth</u> and do not make excuses to justify your violation of the rules.
</br>
● Be cooperative and insightful, this might reduce the punishment.
</br>
● If the Multihunter does not answer immediately, then he/she is probably not online. The issue will not be resolved any faster by sending multiple messages, especially if he/she did not even read the first one yet.
</br>
● If you have really been banned unjustly, try to stay <u>calm and polite</u> while talking to the Multihunter and telling him/her about your point of view.
</p>
<br><br>
<center>
<a class="rules" href="nachrichten.php?t=1&id=5">» Write Message</a>
</center> </br>
</br> Heed the following advice when writing your message: </br></br>
</br> ● There is always a reason for a ban. <u>Try to think about possible reasons for this ban</u> and put things straight with the Multihunter. </br>
</br> ● Multihunters can review enormous amounts of information about accounts. <u>Stick to the truth</u> and do not make excuses to justify your violation of the rules. </br>
</br> ● Be cooperative and insightful, this might reduce the punishment. </br>
</br> ● If the Multihunter does not answer immediately, then he/she is probably not online. The issue will not be resolved any faster by sending multiple messages, especially if he/she did not even read the first one yet. </br>
</br> ● If you have really been banned unjustly, try to stay <u>calm and polite</u> while talking to the Multihunter and telling him/her about your point of view. </p>
+60 -30
View File
@@ -4,42 +4,72 @@
## --------------------------------------------------------------------------- ##
## Filename home.tpl ##
## Developed by: Dzoki ##
## Reworked: aggenekech ##
## Reworked: aggenekech ##
## License: TravianZ Project ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
## ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
#################################################################################
?>
<font size="3">
<b>
<center>
WELCOME TO
<?php
if($_SESSION['access'] == MULTIHUNTER)
{
echo 'MULTIHUNTER';
}
else if($_SESSION['access'] == ADMIN)
{
echo 'ADMINISTRATOR';
} ?>
CONTROL PANEL
</center>
</b>
</font>
<!-- HEADER -->
<div style="text-align:center; margin-top:20px;">
<div style="font-size:20px; font-weight:bold; color:#333;">
WELCOME TO
<?php
if ($_SESSION['access'] == MULTIHUNTER) {
echo 'MULTIHUNTER';
} else if ($_SESSION['access'] == ADMIN) {
echo 'ADMINISTRATOR';
} else {
echo 'CONTROL';
}
?>
CONTROL PANEL
</div>
</div>
<br /><br /><br /><br />
<br /><br />
Hello <b><?php echo $_SESSION['admin_username']; ?></b>, You are logged in as: <b><font color="Red">Administrator</font></b></center>
<br /><br /><br />
<!-- USER INFO -->
<?php
$role = '';
$color = '#2c3e50';
<br /><br /><br /><br /><br />
if ($_SESSION['access'] == MULTIHUNTER) {
$role = 'MultiHunter';
$color = '#e67e22';
} else if ($_SESSION['access'] == ADMIN) {
$role = 'Administrator';
$color = '#c0392b';
} else {
$role = 'User';
}
?>
<div style="text-align:center; font-size:13px; color:#444;">
Hello <b><?php echo $_SESSION['admin_username']; ?></b>,<br />
You are logged in as:
<b style="color:<?php echo $color; ?>">
<?php echo $role; ?>
</b>
</div>
<font color="#c5c5c5" size="1">
Credits: Akakori & Elmar<br />
Fixed, remade and new features added by <b>Dzoki</b><br />
Reworked by <b>aggenkeech</b>
Remaked by <b>Shadow</b>
</font>
<br /><br /><br />
<!-- SPACER -->
<div style="height:60px;"></div>
<!-- CREDITS -->
<div style="
margin-top:60px;
padding:12px;
border-top:1px solid #e5e5e5;
text-align:center;
color:#666;
font-size:11px;
line-height:18px;
">
Credits: Akakori & Elmar<br />
Fixed, remade and new features added by <b>Dzoki</b><br />
Reworked by <b>aggenkeech</b><br />
Remaked by <b>Shadow</b>
</div>
+66 -55
View File
@@ -10,6 +10,13 @@
## Improoved by: Shadow ##
#################################################################################
function formatNum($n) {
if ($n >= 1000000000) return round($n / 1000000000, 2).'B';
if ($n >= 1000000) return round($n / 1000000, 2).'M';
if ($n >= 1000) return round($n / 1000, 1).'K';
return $n;
}
$tribe1 = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE tribe = 1");
$tribe2 = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE tribe = 2");
$tribe3 = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE tribe = 3");
@@ -112,70 +119,74 @@ $users = mysqli_num_rows(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREF
</tbody>
</table>
</div>
<table id="member">
<thead>
<tr>
<th colspan="10">Troops on the Server</th>
</tr>
<?php
$cells = ['SUM(hero) as hero'];
for($i=1; $i<51; $i++) {
array_push($cells, 'SUM(u'.$i.') AS u'.$i);
}
<table id="member">
<thead>
<tr>
<th colspan="10">Troops on the Server</th>
</tr>
<?php
$cells = ['SUM(hero) as hero'];
for($i=1; $i<51; $i++) {
array_push($cells, 'SUM(u'.$i.') AS u'.$i);
}
$units_villages = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT ".implode(',', $cells)." FROM ".TB_PREFIX."units"));
$units_enforcements = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT ".implode(',', $cells)." FROM ".TB_PREFIX."enforcement"));
$units_villages = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT ".implode(',', $cells)." FROM ".TB_PREFIX."units"));
$units_enforcements = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT ".implode(',', $cells)." FROM ".TB_PREFIX."enforcement"));
for($i=1; $i<11; $i++) {
echo '<td class="on"><img src="../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
}
for($i=1; $i<11; $i++) {
echo '<td class="on"><img src="../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
}
echo '</thead><tbody>';
for($i=1; $i<11; $i++) {
echo '<td class="on">'.($units_villages['u'.$i] + $units_enforcements['u'.$i]).'</td>';
}
echo '</thead><tbody>';
for($i=1; $i<11; $i++) {
$total = ($units_villages['u'.$i] + $units_enforcements['u'.$i]);
echo '<td class="on" title="'.$total.'">'.formatNum($total).'</td>';
}
echo "</tr>";
for($i=11; $i<21; $i++) {
echo '<td class="on"><img src="../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
}
echo "</tr>";
for($i=11; $i<21; $i++) {
echo '<td class="on"><img src="../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
}
echo '</thead><tbody>';
for($i=11; $i<21; $i++) {
echo '<td class="on">'.($units_villages['u'.$i] + $units_enforcements['u'.$i]).'</td>';
}
echo '</tr><tr>';
for($i=11; $i<21; $i++) {
$total = ($units_villages['u'.$i] + $units_enforcements['u'.$i]);
echo '<td class="on" title="'.$total.'">'.formatNum($total).'</td>';
}
echo "</tr>";
for($i=21; $i<31; $i++) {
echo '<td class="on"><img src="../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
}
echo "</tr>";
for($i=21; $i<31; $i++) {
echo '<td class="on"><img src="../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
}
echo '</thead><tbody>';
for($i=21; $i<31; $i++) {
echo '<td class="on">'.($units_villages['u'.$i] + $units_enforcements['u'.$i]).'</td>';
}
echo '</tr><tr>';
for($i=21; $i<31; $i++) {
$total = ($units_villages['u'.$i] + $units_enforcements['u'.$i]);
echo '<td class="on" title="'.$total.'">'.formatNum($total).'</td>';
}
echo "</tr>";
for($i=31; $i<41; $i++) {
echo '<td class="on"><img src="../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
}
echo "</tr>";
for($i=31; $i<41; $i++) {
echo '<td class="on"><img src="../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
}
echo '</thead><tbody>';
for($i=31; $i<41; $i++) {
echo '<td class="on">'.($units_villages['u'.$i] + $units_enforcements['u'.$i]).'</td>';
}
echo '</tr><tr>';
for($i=31; $i<41; $i++) {
$total = ($units_villages['u'.$i] + $units_enforcements['u'.$i]);
echo '<td class="on" title="'.$total.'">'.formatNum($total).'</td>';
}
echo "</tr>";
for($i=41; $i<51; $i++) {
echo '<td class="on"><img src="../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
}
echo "</tr>";
for($i=41; $i<51; $i++) {
echo '<td class="on"><img src="../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
}
echo '</thead><tbody>';
for($i=41; $i<51; $i++) {
echo '<td class="on">'.($units_villages['u'.$i] + $units_enforcements['u'.$i]).'</td>';
}
?>
</tbody>
</table>
<div>
echo '</tr><tr>';
for($i=41; $i<51; $i++) {
$total = ($units_villages['u'.$i] + $units_enforcements['u'.$i]);
echo '<td class="on" title="'.$total.'">'.formatNum($total).'</td>';
}
?>
</tbody>
</table>
+3 -3
View File
@@ -6,7 +6,7 @@
## Version 8.0 ##
## Developed by: Dzoki and Dixie Edited by Advocaite ##
## License: TravianZ Project ##
## Copyright: TravianZ (c) 2013-2025. All rights reserved. ##
## Copyright: TravianZ (c) 2013-2026. All rights reserved. ##
## Modified by: Shadow and ronix ##
## ##
#################################################################################
@@ -365,8 +365,8 @@ $requse = 0;
## Filename config.php ##
## Version 4.8.5 ##
## Developed by: Dzoki and Dixie Edited by Advocaite ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## License: TravianZ Project ##
## Copyright: TravianZ (c) 2010-2026. All rights reserved. ##
## ##
#################################################################################
+15
View File
@@ -1,4 +1,19 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Project: TravianZ ##
## Filename accounts.php ##
## Developed by: Dzoki ##
## License: TravianZ Project ##
## Copyright: TravianZ (c) 2010-2026. All rights reserved. ##
## URLs: http://travian.shadowss.ro ##
## Source code: https://github.com/Shadowss/TravianZ ##
## ##
#################################################################################
// verify form
if (empty($_POST['mhpw']) || empty($_POST['spw'])) {
header("Location: ../index.php?s=4&err=1");
+5 -8
View File
@@ -3,15 +3,12 @@
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Project: TravianZ ##
## Version: 22.06.2015 ##
## Filename multihunter.tpl ##
## Developed by: Mr.php , Advocaite , brainiacX , yi12345 , Shadow , ronix ##
## Fixed by: Shadow - STARVATION , HERO FIXED COMPL. ##
## Fixed by: InCube - double troops ##
## Filename accounts.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 ##
## ##
#################################################################################
+12 -15
View File
@@ -1,20 +1,17 @@
<?php
##############################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## ---------------------------------------------------------------------------------------- ##
## Project: TravianZ ##
## Version: 22.06.2015 ##
## Filename config.tpl ##
## Developed by: Mr.php , Advocaite , brainiacX , yi12345 , Shadow , ronix, martinambrus ##
## Fixed by: Shadow - STARVATION , HERO FIXED COMPL. ##
## Fixed by: InCube - double troops ##
## License: TravianZ Project ##
## Copyright: TravianZ (c) 2010-2015. All rights reserved. ##
## URLs: http://travian.shadowss.ro ##
## Source code: https://github.com/Shadowss/TravianZ ##
## ##
##############################################################################################
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Project: TravianZ ##
## Filename config.php ##
## Developed by: Dzoki ##
## License: TravianZ Project ##
## Copyright: TravianZ (c) 2010-2026. All rights reserved. ##
## URLs: http://travian.shadowss.ro ##
## Source code: https://github.com/Shadowss/TravianZ ##
## ##
#################################################################################
if(isset($_GET['c']) && $_GET['c'] == 1) {
echo "<div class=\"headline\"><span class=\"f10 c5\">Error creating constant.php check cmod.</span></div><br>";
+7 -8
View File
@@ -1,19 +1,18 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Project: TravianZ ##
## Version: 22.06.2015 ##
## Filename dataform.tpl ##
## Developed by: Mr.php , Advocaite , brainiacX , yi12345 , Shadow , ronix ##
## Fixed by: Shadow - STARVATION , HERO FIXED COMPL. ##
## Fixed by: InCube - double troops ##
## 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 ##
## ##
#################################################################################
include_once('../GameEngine/config.php');
if(isset($_GET['c']) && $_GET['c'] == 1) {
+8 -8
View File
@@ -1,19 +1,19 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Project: TravianZ ##
## Version: 22.06.2015 ##
## Filename end.tpl ##
## Developed by: Mr.php , Advocaite , brainiacX , yi12345 , Shadow , ronix ##
## Fixed by: Shadow - STARVATION , HERO FIXED COMPL. ##
## Fixed by: InCube - double troops ##
## Filename end.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 ##
## ##
#################################################################################
?>
<p>
Thanks for installing TravianZ.
+5 -8
View File
@@ -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 ##
## ##
#################################################################################
+5 -9
View File
@@ -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 ##
## ##
#################################################################################