Redesign Admin Panel

Full frontend & backend redesign and refactor
This commit is contained in:
novgorodschi catalin
2026-05-25 10:23:39 +03:00
parent 8e3f4e16a9
commit a4e2c506a8
105 changed files with 5780 additions and 25041 deletions
+50 -52
View File
@@ -1,5 +1,29 @@
<table cellpadding="1" cellspacing="1" id="overview"> <style>
.msg-card{background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;font-family:system-ui}
.msg-table{width:100%;border-collapse:collapse}
.msg-table thead th{background:#0f172a;color:#fff;padding:8px 10px;font-size:12px;font-weight:600;text-align:left}
.msg-table thead th.sent{text-align:right}
.msg-table thead a{color:#93c5fd;text-decoration:none}
.msg-table thead a:hover{text-decoration:underline}
.msg-table tbody td{padding:9px 10px;font-size:13px;border-bottom:1px solid #f1f5f9;vertical-align:middle}
.msg-table tbody tr:hover{background:#f8fafc}
.msg-table tbody tr.sup td{background:#fef3c7}
.msg-table tbody tr.multihunterMsg td{background:#fff7ed}
.msg-table tbody tr.multihunterMsg td.sel{background:orange!important;color:#fff}
.msg-table.top a{color:#0f172a;text-decoration:none;font-weight:500}
.msg-table.top a:hover{color:#2563eb;text-decoration:underline}
.msg-table.send a{color:#334155;text-decoration:none}
.msg-table.send a:hover{text-decoration:underline}
.msg-table.dat{font-family:monospace;font-size:12px;color:#64748b;text-align:right;white-space:nowrap}
.msg-table.none{padding:20px;text-align:center;color:#94a3b8}
.msg-foot{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:#f8fafc;border-top:1px solid #e5e7eb}
.msg-foot.navi a{padding:4px 8px;margin:0 2px;background:#fff;border:1px solid #d1d5db;border-radius:4px;color:#374151;text-decoration:none;font-size:12px}
.msg-foot.navi a:hover{background:#f3f4f6}
</style>
<div class="msg-card">
<table class="msg-table" cellpadding="0" cellspacing="0">
<thead> <thead>
<tr> <tr>
<th colspan="2">Subject</th> <th colspan="2">Subject</th>
@@ -7,62 +31,36 @@
<th class="sent"><a href="nachrichten.php?o=1">Sent</a></th> <th class="sent"><a href="nachrichten.php?o=1">Sent</a></th>
</tr> </tr>
</thead> </thead>
<tfoot>
<tr>
<th colspan="3" class="buttons"></th>
<th class="navi"><?php
if (! isset($_GET['s']) && count($allMessages) < 10) {
echo "&laquo;&raquo;";
} else if (! isset($_GET['s']) && count($allMessages) > 10) {
echo "&laquo;<a href=\"?p=msg&" . (! empty($_GET['t']) ? 't=' . $_GET['t'] . '&amp;' : '') . "s=10&o=" . (!empty($_GET['o']) ? $_GET['o'] : 0) . "\">&raquo;</a>";
} else if (isset($_GET['s']) && count($allMessages) > $_GET['s']) {
if (count($allMessages) > ($_GET['s'] + 10) && $_GET['s'] - 10 < count($allMessages) && $_GET['s'] != 0) {
echo "<a href=\"?p=msg&" . (! empty($_GET['t']) ? 't=' . $_GET['t'] . '&amp;' : '') . "s=" . ($_GET['s'] - 10) . "&o=0\">&laquo;</a><a href=\"?p=msg&" . (! empty($_GET['t']) ? 't=' . $_GET['t'] . '&amp;' : '') . "s=" . ($_GET['s'] + 10) . "&o=0\">&raquo;</a>";
} else if (count($allMessages) > $_GET['s'] + 10) {
echo "&laquo;<a href=\"?p=msg&" . (! empty($_GET['t']) ? 't=' . $_GET['t'] . '&amp;' : '') . "s=" . ($_GET['s'] + 10) . "&o=0\">&raquo;</a>";
} else if (count($allMessages) > 10) {
echo "<a href=\"?p=msg&" . (! empty($_GET['t']) ? 't=' . $_GET['t'] . '&amp;' : '') . "s=" . ($_GET['s'] - 10) . "&o=0\">&laquo;</a>&raquo;";
}
}
?></th>
</tr>
</tfoot>
<tbody> <tbody>
<style>
tr.multihunterMsg td.sel {
background-color: orange;
}
</style>
<?php <?php
if (isset($_GET['s'])) $s = $_GET['s']; $s = $_GET['s']?? 0;
else $s = 0; for ($i = 1+$s; $i <= 10+$s; $i++) {
for ($i = (1 + $s); $i <= (10 + $s); $i ++) {
if (count($allMessages) >= $i) { if (count($allMessages) >= $i) {
if ($allMessages[$i - 1]['owner'] <= 1) echo "<tr class=\"sup\">"; $m = $allMessages[$i-1];
elseif ($allMessages[$i - 1]['owner'] == 5) echo "<tr class=\"multihunterMsg\">"; $cls = $m['owner']<=1? 'sup' : ($m['owner']==5? 'multihunterMsg' : '');
else echo "<tr>"; echo "<tr class=\"$cls\">";
echo "<td class=\"top\" colspan=\"2\"><a href=\"admin.php?p=msg&nid={$m['id']}\">".htmlspecialchars($m['topic'])."</a></td>";
echo "<td class=\"top\" colspan=\"2\"><a href=\"admin.php?p=msg&nid=" . $allMessages[$i - 1]['id'] . "\">" . $allMessages[$i - 1]['topic'] . "</a> "; $date = $generator->procMtime($m['time']);
$uname = $database->getUserField($m['owner'],'username',0);
$date = $generator->procMtime($allMessages[$i - 1]['time']); $link = ($m['owner']!=2 && $m['owner']!=4);
if ($allMessages[$i - 1]['owner'] <= 1) { echo "<td class=\"send\">".($link?"<a href=\"admin.php?p=player&uid={$m['owner']}\">":"<b>").htmlspecialchars($uname).($link?"</a>":"</b>")."</td>";
echo "</td><td class=\"send\"><a href=\"admin.php?p=player&uid=1\"><u>" . $database->getUserField($allMessages[$i - 1]['owner'], 'username', 0) . "</u></a></td> echo "<td class=\"dat\">{$date[0]} {$date[1]}</td></tr>";
<td class=\"dat\">" . $date[0] . " " . $date[1] . "</td></tr>";
} else {
$linkSender = ($allMessages[$i - 1]['owner'] != 2 && $allMessages[$i - 1]['owner'] != 4);
echo "</td><td class=\"send\">" . ($linkSender ? "<a href=\"admin.php?p=player&uid=" . $allMessages[$i - 1]['owner'] . "\">" : '<b>') . $database->getUserField($allMessages[$i - 1]['owner'], 'username', 0) . ($linkSender ? '</a>' : '</b>') . "</td>
<td class=\"dat\">" . $date[0] . " " . $date[1] . "</td></tr>";
}
} }
} }
if (count($allMessages) == 0) { if (count($allMessages)==0) echo "<tr><td colspan=\"4\" class=\"none\">There are no messages available.</td></tr>";
echo "<td colspan=\"4\" class=\"none\">There are no messages available.</td></tr>";
}
?> ?>
</tbody> </tbody>
</table> </table>
<div class="msg-foot">
<div></div>
<div class="navi"><?php
if (!isset($_GET['s']) && count($allMessages)<10) echo "&laquo;&raquo;";
elseif (!isset($_GET['s']) && count($allMessages)>10) echo "&laquo;<a href=\"?p=msg&".(!empty($_GET['t'])?'t='.$_GET['t'].'&amp;':'')."s=10&o=".($_GET['o']??0)."\">&raquo;</a>";
elseif (isset($_GET['s']) && count($allMessages)>$_GET['s']) {
if (count($allMessages)>($_GET['s']+10) && $_GET['s']!=0) echo "<a href=\"?p=msg&".(!empty($_GET['t'])?'t='.$_GET['t'].'&amp;':'')."s=".($_GET['s']-10)."&o=0\">&laquo;</a><a href=\"?p=msg&".(!empty($_GET['t'])?'t='.$_GET['t'].'&amp;':'')."s=".($_GET['s']+10)."&o=0\">&raquo;</a>";
elseif (count($allMessages)>$_GET['s']+10) echo "&laquo;<a href=\"?p=msg&".(!empty($_GET['t'])?'t='.$_GET['t'].'&amp;':'')."s=".($_GET['s']+10)."&o=0\">&raquo;</a>";
else echo "<a href=\"?p=msg&".(!empty($_GET['t'])?'t='.$_GET['t'].'&amp;':'')."s=".($_GET['s']-10)."&o=0\">&laquo;</a>&raquo;";
}
?></div>
</div>
</div> </div>
+85 -73
View File
@@ -2,80 +2,92 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename newmessage.tpl ## ## Filename : Newmessage.tpl ##
## Developed by: Dzoki ## ## Type : Admin Panel Frontend ##
## Reworked: aggenkeech ## ## --------------------------------------------------------------------------- ##
## License: TravianZ Project ## ## Developed by : Dzoki (Original) ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Refactored by : Shadow ##
## ## ## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
error_reporting(E_ALL ^ E_NOTICE); error_reporting(E_ALL ^ E_NOTICE);
$id = (int)$_GET['uid'];
if($id){
$user = $database->getUserArray($id,1);
?>
<style>
.msg-wrap{font-family:system-ui;max-width:720px;margin:12px auto}
.msg-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;box-shadow:0 4px 12px rgba(0,0,0,.06);overflow:hidden}
.msg-head{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:14px 18px;display:flex;align-items:center;justify-content:space-between}
.msg-head h4{margin:0;font-size:15px;font-weight:600}
.msg-head a{color:#93c5fd;text-decoration:none}
.msg-head a:hover{color:#fff}
.msg-body{padding:18px}
.msg-row{display:grid;grid-template-columns:120px 1fr;gap:12px;align-items:center;margin-bottom:12px}
.msg-label{font-size:12px;color:#64748b;text-transform:uppercase;font-weight:600}
.msg-input,.msg-text{width:100%;padding:9px 12px;border:1px solid #d1d5db;border-radius:8px;font-size:14px;font-family:system-ui;box-sizing:border-box;transition:.15s}
.msg-input:focus,.msg-text:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.15)}
.msg-text{min-height:220px;resize:vertical;line-height:1.5}
.msg-meta{display:flex;gap:16px;font-size:12px;color:#64748b;margin:-4px 0 14px 132px}
.msg-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px;padding-top:14px;border-top:1px solid #f1f5f9}
.btn-primary{background:#2563eb;color:#fff;border:0;padding:9px 18px;border-radius:8px;font-weight:600;cursor:pointer;font-size:14px}
.btn-primary:hover{background:#1d4ed8}
.btn-ghost{background:#f1f5f9;color:#334155;border:0;padding:9px 14px;border-radius:8px;text-decoration:none;font-size:14px}
.alert-ok{background:#ecfdf5;color:#065f46;padding:10px 12px;border-radius:8px;margin-bottom:12px;font-size:13px;border:1px solid #a7f3d0}
@media(max-width:600px){.msg-row{grid-template-columns:1fr}.msg-meta{margin-left:0}}
</style>
$id = $_GET['uid']; <div class="msg-wrap">
if(isset($id)) <?php if(isset($_GET['msg'])){ echo '<div class="alert-ok">✓ Message sent successfully</div>'; } ?>
{
$varray = $database->getProfileVillages($id); <div class="msg-card">
$varmedal = $database->getProfileMedal($id); ?> <div class="msg-head">
<h4>New Message</h4>
<div>to <a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo $user['username']; ?></a></div>
</div>
<form method="post" action="../Admin/Mods/sendMessage.php" name="msg">
<div class="msg-body">
<input type="hidden" name="uid" value="<?php echo $id; ?>">
<div class="msg-row">
<div class="msg-label">Recipient</div>
<div><strong style="color:#0f172a"><?php echo $user['username']; ?></strong> (UID <?php echo $id; ?>)</div>
</div>
<div class="msg-row">
<div class="msg-label">Subject</div>
<input class="msg-input" type="text" name="topic" maxlength="35" value="Message From Admin" required>
</div>
<div class="msg-meta">
<span><?php echo date('d.m.Y'); ?></span>
<span><?php echo date('H:i:s'); ?></span>
</div>
<div class="msg-row" style="align-items:start">
<div class="msg-label" style="padding-top:8px">Message</div>
<textarea class="msg-text" name="message" required placeholder="Write your message here..."></textarea>
</div>
<div class="msg-actions">
<a href="javascript:history.go(-1)" class="btn-ghost">Cancel</a>
<button type="submit" name="s1" class="btn-primary">Send Message</button>
</div>
</div>
</form>
</div>
</div>
<link href="../<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7i" rel="stylesheet" type="text/css"> <?php } else { ?>
<style type="text/css"> <div style="font-family:system-ui;padding:30px;text-align:center;color:#64748b">
input.dynamic_img, img.dynamic_img Player not found. <a href="javascript:history.go(-1)" style="color:#2563eb">Go Back</a>
{ </div>
background-position: center top; <?php } ?>
height: 20px;
}
input#btn_send
{
width: 97px;
background-image: url(../<?php echo GP_LOCATE; ?>lang/en/b/send.gif);
}
div.messages div#write_content #heading input
{
}
</style>
<h4>Compose New Message to <a href="admin.php?p=player&uid=<?php echo $user['id'] ?>"><?php echo $user['username']; ?></a></h4>
<form method="post" action="../Admin/Mods/sendMessage.php" accept-charset="UTF-8" name="msg">
<div id="content" class="messages">
<div id="read_head" class="msg_head"></div>
<div id="read_content" class="msg_content">
<img src="../../<?php echo GP_LOCATE; ?>lang/en/msg/block_bg24b.gif" id="label" class="read" alt="">
<div id="heading">
<input type="hidden" name="uid" value="<?php echo $id; ?>">
<div><a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo $user['username']; ?></a></div>
<div><input type="text" value="Message From Admin" name="topic" id="subject" value="" maxlength="35" style="background-image: url('../<?php echo GP_LOCATE; ?>img/msg/underline.gif'); background-position: left -2px; background-repeat: repeat-x; outline: none; border: medium none; width: 267px; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 11px;"></div>
</div>
<div id="time">
<div><?php echo date('d.m.y'); ?></div>
<div><?php echo date('H:i:s'); ?></div>
</div>
<div class="clear"></div>
<div class="line"></div>
<div class="message" style="margin-top: 10px;">
<textarea id="message" name="message" style="background-image: url('../<?php echo GP_LOCATE; ?>img/msg/underline.gif'); background-repeat: repeat; font-size: 12px; border: medium none; height: 258px; line-height: 16px; width: 412px; font-family: Verdana,Arial,Helvetica,sans-serif;">Message Here</textarea>
</div>
<p class="btn">
<button value="submit" name="s1" id="btn_send" class="trav_buttons" alt="send" tabindex="4;">Send</button>
</p>
<div id="read_foot" class="msg_foot"></div>
</div>
<br /><br /><br />
</div>
<?php
if(isset($_GET['msg']))
{
echo "<font color=\"blue\">Message Sent</font>";
}
else
{
echo '';
}
}
else
{
echo "<br /><br />Not found. <a href=\"javascript: history.go(-1)\"> Go Back</a>";
}?>
+73 -49
View File
@@ -2,61 +2,85 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename addABTroops.tpl ## ## Filename : addABTroops.tpl ##
## Developed by: ronix ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Thanks to: Dzoki & itay2277(Add troops) ## ## Developed by : Dzoki (Original) ##
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ## ## Refactored by : Shadow ##
## ## ## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
$unarray = array(1=>U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U99,U0); $unarray = array(1=>U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U99,U0);
if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN); if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN);
$id = $_GET['did']; $id = $_GET['did'];
if(isset($id)) if(isset($id)){
{ $abtech = $database->getABTech($id);
$abtech = $database->getABTech($id); // Armory/blacksmith level
$units = $database->getUnit($village['wref']); $units = $database->getUnit($village['wref']);
$coor = $database->getCoor($village['wref']); $coor = $database->getCoor($village['wref']);
$tribe = $user['tribe']; $tribe = $user['tribe'];
if($tribe ==1){ $img = 0;} if($tribe ==1){ $img = 0;} if($tribe ==2){ $img = 10;} if($tribe ==3){ $img = 20;} if($tribe ==4){ $img = 30;} if($tribe ==5){ $img = 40;} if($tribe ==6){ $img = 50;}
if($tribe ==2){ $img = 10;}
if($tribe ==3){ $img = 20;}
if($tribe ==4){ $img = 30;}
if($tribe ==5){ $img = 40;}
if($tribe ==6){ $img = 50;}
include("search2.tpl"); include("search2.tpl");
?> ?>
<style>
.ab-wrap{max-width:650px;margin:12px auto;font-family:system-ui}
.ab-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.05)}
.ab-head{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:10px 14px;font-weight:600;font-size:14px}
.ab-grid{display:grid;grid-template-columns:1fr}
.ab-row{display:grid;grid-template-columns:48px 1.2fr 90px 90px;align-items:center;padding:8px 12px;border-bottom:1px solid #f1f5f9;gap:10px}
.ab-row.header{background:#f8fafc;font-size:11px;color:#64748b;text-transform:uppercase;font-weight:600;border-bottom:1px solid #e5e7eb}
.ab-row:last-child{border-bottom:0}
.ab-row:hover:not(.header){background:#fcfdff}
.ab-row img{width:20px;height:20px;margin:0 auto}
.ab-name{font-size:13px;color:#334155}
.ab-input input{width:70px;padding:5px 6px;border:1px solid #d1d5db;border-radius:6px;font-size:13px;text-align:center;font-family:monospace}
.ab-input input:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 2px rgba(37,99,235,.1)}
.ab-foot{display:flex;justify-content:space-between;padding:10px 12px;background:#f8fafc;border-top:1px solid #e5e7eb}
.btn{padding:7px 14px;border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;border:0;display:inline-flex;gap:6px;align-items:center}
.btn-back{background:#fff;color:#475569;border:1px solid #d1d5db}
.btn-save{background:#16a34a;color:#fff}
.btn-save:hover{background:#15803d}
.btn svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2}
</style>
<div class="ab-wrap">
<form action="../GameEngine/Admin/Mods/addABTroops.php" method="POST"> <form action="../GameEngine/Admin/Mods/addABTroops.php" method="POST">
<input type="hidden" name="id" id="id" value="<?php echo $_GET['did']; ?>"> <input type="hidden" name="id" value="<?php echo $_GET['did']; ?>">
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>"> <input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
<table id="member">
<thead> <div class="ab-card">
<tr> <div class="ab-head">Upgrades <?php echo $village['name']; ?> (<?php echo $coor['x'].'|'.$coor['y']; ?>)</div>
<th colspan="3">Upgrades AB Tech troops</th>
</tr></thead><tbody> <div class="ab-grid">
<tr><td align="center">Troop Type</td> <div class="ab-row header">
<td align="center">Armour</td> <div></div><div>Troop</div><div style="text-align:center">Armoury</div><div style="text-align:center">Blacksmith</div>
<td align="center">Blackmith</td> </div>
</tr> <?php for($i=1;$i<9;$i++){ ?>
<?php <div class="ab-row">
for($i=1; $i<9; $i++) { <img src="../img/un/u/<?=($img+$i)?>.gif" alt="">
echo '<tr> <div class="ab-name"><?=$unarray[$img+$i]?></div>
<td class="addTroops"><img src="../img/un/u/'.($img+$i).'.gif"></img> '.$unarray[$img+$i].'</td> <div class="ab-input"><input name="a<?=$i?>" value="<?=$abtech['a'.$i]?>" type="number" min="0" max="20"></div>
<td class="addTroops"><input class="addTroops" name="a'.$i.'" id="a'.$i.'" value="'.$abtech["a".$i].'" maxlength="10"></td> <div class="ab-input"><input name="b<?=$i?>" value="<?=$abtech['b'.$i]?>" type="number" min="0" max="20"></div>
<td class="addTroops"><input class="addTroops" name="b'.$i.'" id="b'.$i.'" value="'.$abtech["b".$i].'" maxlength="10"></td> </div>
</tr>'; <?php } ?>
} ?> </div>
</tbody>
<thead> <div class="ab-foot">
<tr> <button type="button" class="btn btn-back" onclick="location.href='admin.php?p=village&did=<?=$_GET['did']?>'">
<td colspan="3"> <svg viewBox="0 0 24 24"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>Back
<button style="float: right" name="save" id="btn_save" class="trav_buttons" value="save" alt="save" /> Save </button> </button>
<button style="float: left" name="back" id="btn_back" class="trav_buttons" value="back" alt="back" onclick="return go_url('../Admin/admin.php?p=village&did=<?php echo $_GET["did"];?>')" /> Back </button> <button type="submit" name="save" class="btn btn-save">
</td> <svg viewBox="0 0 24 24"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"/><polyline points="17 21 17 13 7 13 7 21"/></svg>Save
</tr> </button>
</thead> </div>
</table> </div>
</form>
<?php }?> </form>
</div>
<?php } ?>
+76 -39
View File
@@ -2,52 +2,89 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename addTroops.tpl ## ## Filename : addTroops.tpl ##
## Developed by: Dzoki & Advocatie ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Reworks by: ronix ## ## Developed by : Dzoki (Original) ##
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ## ## Refactored by : Shadow ##
## ## ## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
$unarray = [1=>U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U99,U0]; $unarray = [1=>U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U99,U0];
if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN); if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN);
$id = $_GET['did']; $id = $_GET['did'];
if(isset($id)) if(isset($id)){
{
$units = $database->getUnit($village['wref']); $units = $database->getUnit($village['wref']);
$coor = $database->getCoor($village['wref']); $coor = $database->getCoor($village['wref']);
$tribe = $user['tribe']; $tribe = $user['tribe'];
$img = ($tribe - 1) * 10; $img = ($tribe - 1) * 10;
include("search2.tpl"); include("search2.tpl");
?> ?>
<style>
.addtroops-wrap{max-width:600px;margin:12px auto;font-family:system-ui}
.addtroops-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.05)}
.addtroops-head{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:10px 14px;font-weight:600;font-size:14px}
.addtroops-grid{display:grid;grid-template-columns:1fr;gap:0}
.troop-row{display:grid;grid-template-columns:48px 1fr 120px;align-items:center;padding:8px 12px;border-bottom:1px solid #f1f5f9;gap:10px}
.troop-row:last-child{border-bottom:0}
.troop-row:hover{background:#f8fafc}
.troop-row img{width:22px;height:22px;margin:0 auto;display:block}
.troop-name{font-size:13px;color:#334155;font-weight:500}
.troop-input{display:flex;flex-direction:column;align-items:flex-end;gap:2px}
.troop-input input{width:100px;padding:6px 8px;border:1px solid #d1d5db;border-radius:6px;font-size:13px;text-align:right;font-family:monospace}
.troop-input input:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.troop-current{font-size:11px;color:#9ca3af}
.troop-current b{color:#64748b}
.addtroops-foot{display:flex;justify-content:space-between;padding:10px 12px;background:#f8fafc;border-top:1px solid #e5e7eb}
.btn{padding:7px 14px;border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;border:0;display:inline-flex;align-items:center;gap:6px;text-decoration:none}
.btn-back{background:#fff;color:#475569;border:1px solid #d1d5db}
.btn-back:hover{background:#f8fafc}
.btn-save{background:#2563eb;color:#fff}
.btn-save:hover{background:#1d4ed8}
.btn svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2}
</style>
<div class="addtroops-wrap">
<form action="../GameEngine/Admin/Mods/addTroops.php" method="POST"> <form action="../GameEngine/Admin/Mods/addTroops.php" method="POST">
<input type="hidden" name="id" id="id" value="<?php echo $_GET['did']; ?>"> <input type="hidden" name="id" value="<?php echo $_GET['did']; ?>">
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>"> <input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
<table id="member">
<thead> <div class="addtroops-card">
<tr> <div class="addtroops-head">Edit troops <?php echo $village['name']; ?> (<?php echo $coor['x'].'|'.$coor['y']; ?>)</div>
<th colspan="2">Edit troops</th>
</tr></thead><tbody> <div class="addtroops-grid">
<?php <?php for($i=1;$i<11;$i++){
for($i = 1; $i < 11; $i++) { $uid = $img+$i;
echo '<tr> $current = $units['u'.$uid];
<td class="addTroops"><img src="../img/un/u/'.($img+$i).'.gif"></img> '.$unarray[$img+$i].'</td> ?>
<td class="addTroops"><input class="addTroops" name="u'.($img+$i).'" id="u'.($img+$i).'" value="'.$units["u".($img+$i)].'" maxlength="10"> <div class="troop-row">
&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b>'.$units["u".($img+$i)].'</b><font></td> <img src="../img/un/u/<?=$uid?>.gif" alt="">
</tr>'; <div class="troop-name"><?=$unarray[$uid]?></div>
} ?> <div class="troop-input">
</tbody> <input name="u<?=$uid?>" id="u<?=$uid?>" value="<?=$current?>" maxlength="10" type="number" min="0">
<thead> <div class="troop-current">Now: <b><?=number_format($current)?></b></div>
<tr> </div>
<td colspan="2"> </div>
<button style="float: right" name="save" id="btn_save" class="trav_buttons" value="save" alt="save" /> Save </button> <?php } ?>
<button style="float: left" name="back" id="btn_back" class="trav_buttons" value="back" alt="back" onclick="return go_url('../Admin/admin.php?p=village&did=<?php echo $_GET["did"];?>')" /> Back </button> </div>
</td>
</tr> <div class="addtroops-foot">
</thead> <button type="button" class="btn btn-back" onclick="location.href='admin.php?p=village&did=<?=$_GET['did']?>'">
<svg viewBox="0 0 24 24"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>Back
</table> </button>
</form> <button type="submit" name="save" class="btn btn-save">
<?php <svg viewBox="0 0 24 24"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"/><polyline points="17 21 17 13 7 13 7 21"/><polyline points="7 3 7 8 15 8"/></svg>Save
} ?> </button>
</div>
</div>
</form>
</div>
<?php } ?>
+16 -1
View File
@@ -1,6 +1,21 @@
<?php <?php
################################################################################# #################################################################################
## addUsers.tpl - REDESIGN 2025 v2 ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : addUsers.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if($_SESSION['access'] < ADMIN) die("Access Denied!"); if($_SESSION['access'] < ADMIN) die("Access Denied!");
$id = $_SESSION['id']; $id = $_SESSION['id'];
+47 -28
View File
@@ -2,43 +2,62 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename add_village.tpl ## ## Filename : add_village.tpl ##
## Developed by: Dzoki ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
?> ?>
<style> <style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);} .addv-box{width:100%;max-width:220px;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04);font-family:system-ui}
</style> .addv-box th{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:6px 10px;font-weight:600;text-align:center;font-size:13px}
<form method="post" action="admin.php"> .addv-box td{padding:6px 8px;border-bottom:1px solid #f1f5f9;font-size:12px;color:#334155}
.addv-box tr:last-child td{border-bottom:0;text-align:center}
.addv-sub{font-size:11px;color:#64748b;text-align:center;padding:4px 8px !important;border-bottom:0 !important}
.addv-box td:first-child{width:25%;color:#64748b;font-weight:500}
.addv-box input.fm{width:100%;padding:3px 6px;font-size:12px;border:1px solid #cbd5e1;border-radius:5px;box-sizing:border-box}
.addv-box input.fm:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 1px #3b82f6}
.btn-add{display:inline-block;padding:4px 14px;font-size:11px;font-weight:600;color:#fff;background:linear-gradient(180deg,#3b82f6,#2563eb);border:0;border-radius:5px;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.1);text-transform:uppercase;letter-spacing:.3px}
.btn-add:hover{filter:brightness(1.05)}
.btn-add:disabled{opacity:.5;cursor:not-allowed}
</style>
<form method="post" action="admin.php" style="margin:0">
<input name="action" type="hidden" value="addVillage"> <input name="action" type="hidden" value="addVillage">
<input name="uid" type="hidden" value="<?php echo $user['id'];?>"> <input name="uid" type="hidden" value="<?php echo $user['id'];?>">
<table id="member" style="width: 225px;" align="center"> <table class="addv-box">
<thead> <thead>
<tr> <tr><th>Add Village</th></tr>
<th colspan="2">Add Village</th> </thead>
</tr> <tbody>
</thead> <tr><td class="addv-sub">Coordinates (X|Y)</td></tr>
<tr> <tr>
<td colspan="2"><center>Coordinates (<b>X</b>|<b>Y</b>)</center></td> <td style="display:flex;align-items:center;gap:6px;border-bottom:0">
</tr> <span style="width:15px">X:</span>
<input name="x" class="fm" type="text" <?php if($_SESSION['access'] != ADMIN){ echo 'disabled'; } ?>>
<tr> </td>
<td>X:</td>
<td><input name="x" class="fm" value="" type="input" <?php if($_SESSION['access'] == ADMIN){ echo ''; } else if($_SESSION['access'] == MULTIHUNTER){ echo 'disabled="disabled"'; } ?>></td>
</tr> </tr>
<tr> <tr>
<td>Y:</td> <td style="display:flex;align-items:center;gap:6px;border-bottom:0;padding-top:0">
<td><input name="y" class="fm" value="" type="input" <?php if($_SESSION['access'] == ADMIN){ echo ''; } else if($_SESSION['access'] == MULTIHUNTER){ echo 'disabled="disabled"'; } ?>></td> <span style="width:15px">Y:</span>
<input name="y" class="fm" type="text" <?php if($_SESSION['access'] != ADMIN){ echo 'disabled'; } ?>>
</td>
</tr> </tr>
<tr> <tr>
<td colspan="2"><center><input value="Add Village" type="submit" <?php if($_SESSION['access'] == ADMIN){ echo ''; } else if($_SESSION['access'] == MULTIHUNTER){ echo 'disabled="disabled"'; } ?>></center></td> <td style="padding-top:8px">
</tr> <button type="submit" class="btn-add" <?php if($_SESSION['access'] != ADMIN){ echo 'disabled'; } ?>>Add Village</button>
</td>
</tr>
</tbody>
</table> </table>
</form> </form>
+17 -1
View File
@@ -31,8 +31,24 @@
</style> </style>
</head> </head>
<?php <?php
################################################################################# #################################################################################
## admin_log.tpl - FIX unban duplicat ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : ademin_log.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!"); if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
+239 -365
View File
@@ -1,386 +1,260 @@
<?php <?php
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename alliance.tpl ## ## Filename : alliance.tpl ##
## Developed by: Dzoki ## ## Type : Admin Panel Frontend ##
## Reworked: aggenkeech ## ## --------------------------------------------------------------------------- ##
## License: TravianZ Project ## ## Developed by : Dzoki (Original) ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Refactored by : Shadow ##
## ## ## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if($_GET['aid']) if($_GET['aid']) {
{ $aid = (int)$_GET['aid'];
$alidata = $database->getAlliance($_GET['aid']); $alidata = $database->getAlliance($aid);
$aliusers = $database->getAllMember($_GET['aid']); $aliusers = $database->getAllMember($aid);
if($alidata and $aliusers)
{ if($alidata && $aliusers) {
$memberIDs = []; $memberIDs = array_column($aliusers, 'id');
foreach($aliusers as $member) {
$memberIDs[] = $member['id'];
}
$data = $database->getVSumField($memberIDs,"pop"); $data = $database->getVSumField($memberIDs,"pop");
$totalpop = 0;
if(count($data)) {
foreach($data as $row) { $totalpop += $row['Total']; }
}
$founder = $database->getUserField($alidata['leader'],"username",0);
if (count($data)) { // --- FIX 1: calculeaza max membri dupa Ambasada (lvl 20 = 60) ---
foreach ($data as $row) { $embassyLevel = 0;
$totalpop += $row['Total']; $embQ = mysqli_query($GLOBALS["link"], "SELECT MAX(b.level) as lvl FROM ".TB_PREFIX."bdata b JOIN ".TB_PREFIX."vdata v ON v.wref=b.wid WHERE v.owner=".(int)$alidata['leader']." AND b.type=18");
} if($embR = mysqli_fetch_assoc($embQ)) $embassyLevel = (int)$embR['lvl'];
} ?> $maxMembers = $embassyLevel * 3;
if($maxMembers < 3) $maxMembers = 3;
if((int)$alidata['max'] > 0) $maxMembers = (int)$alidata['max']; // daca e setat manual, il respectam
<br> // --- FIX 3: calculeaza rank real dupa puncte ---
<table id="profile" cellpadding="1" cellspacing="1"> $allianceRank = 1;
<thead> $rankSql = "SELECT a.id, COALESCE(SUM(v.pop),0) as pts FROM ".TB_PREFIX."alidata a LEFT JOIN ".TB_PREFIX."users u ON u.alliance=a.id LEFT JOIN ".TB_PREFIX."vdata v ON v.owner=u.id GROUP BY a.id ORDER BY pts DESC";
<tr> $rankRes = mysqli_query($GLOBALS["link"], $rankSql);
<th colspan="2">Alliance <a href="?p=alliance&aid=<?php echo $alidata['id'];?>"><?php echo $alidata['name'];?></a></th> while($rr = mysqli_fetch_assoc($rankRes)){ if((int)$rr['id'] == $aid) break; $allianceRank++; }
</tr> ?>
<tr> <style>
<td>Details</td> .ali-wrap{max-width:1200px;margin:0 auto;font-family:Verdana,Arial;}
<td>Description</td> .ali-head{background:linear-gradient(#fff,#f2f2f2);border:1px solid #c9c9c9;border-radius:5px;padding:14px 16px;margin-bottom:12px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;}
</tr> .ali-head h1{margin:0;font-size:22px;color:#222;}
</thead> .ali-head h1 span.tag{background:#71D000;color:#fff;padding:2px 8px;border-radius:3px;font-size:14px;margin-right:8px;}
<tbody> .ali-head .stats{display:flex;gap:16px;font-size:12px;color:#555;}
<tr> .ali-head .stats b{color:#000;font-size:13px;}
<td class="empty"></td>
<td class="empty"></td>
</tr>
<tr>
<td class="details">
<table cellpadding="0" cellspacing="0">
<tbody>
<tr>
<th>Tag</th>
<td><?php echo $alidata['tag']; ?></td>
</tr>
<tr>
<th>Name</th>
<td><?php echo $alidata['name']; ?></td>
</tr>
<tr>
<td colspan="2" class="empty"></td>
</tr>
<tr>
<th>Rank</th>
<td>???</td>
</tr>
<tr>
<th>Points</th>
<td><?php echo $totalpop; ?></td>
</tr>
<tr>
<th>Members</th>
<td><?php echo count($aliusers); ?></td>
</tr>
<tr>
<td colspan="2" class="empty"></td>
</tr>
<tr>
<th>Alliance Founder</th>
<td><a href="?p=player&uid=<?php echo $alidata['leader']; ?>"><?php echo $database->getUserField($alidata['leader'],"username",0); ?></a></td>
</tr>
<tr>
<td colspan="2"><b>Alliance Positions</b></td>
</tr>
<?php .grid-2{display:grid;grid-template-columns:380px 1fr;gap:12px;}
error_reporting(0); @media(max-width:950px){.grid-2{grid-template-columns:1fr;}}
$sql = "SELECT * FROM ".TB_PREFIX."ali_permission WHERE alliance = ".(int) $_GET['aid']."";
$result = mysqli_query($GLOBALS["link"], $sql);
while($row = mysqli_fetch_assoc($result))
{
$player = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".(int) $row['uid'].""));
if($row['opt1'] == 1) { $position1 = "Assign To Position"; } else { $position1 = "No Assigning Positions"; }
if($row['opt2'] == 1) { $position2 = "Kick Players"; } else { $position2 = "No Kicking Players"; }
if($row['opt3'] == 1) { $position3 = "Change Description"; } else { $position3 = "No Changing Description"; }
if($row['opt4'] == 1) { $position4 = "Invite Players"; } else { $position4 = "No Invitations"; }
if($row['opt5'] == 1) { $position5 = "Manage Forums"; } else { $position5 = "No Forum Management"; }
if($row['opt6'] == 1) { $position6 = "Alliance Diplomacy"; } else { $position6 = "No Diplomacy"; }
if($row['opt7'] == 1) { $position7 = "Mass IGMs (MMs)"; } else { $position7 = "No MMs"; }
if($row['opt8'] == 1) { $position8 = "???"; } else { $position8 = "No ???"; }
echo ' .card{background:#fff;border:1px solid #d5d5d5;border-radius:4px;overflow:hidden;box-shadow:0 1px 2px rgba(0,0,0,.04);margin-bottom:12px;}
<tr> .card h3{margin:0;padding:8px 12px;background:#f7f7f7;border-bottom:1px solid #e0e0e0;font-size:13px;text-transform:uppercase;color:#444;letter-spacing:.4px;}
<td>Position:</td> .card .body{padding:12px;}
<td><a href="admin.php?p=player&uid='.$row['uid'].'">'.$player['username'].'</a><br /><b>'.$row['rank'].'</b><br />
<select>
<option>Permissions</option>
<option>'.$position1.'</option>
<option>'.$position2.'</option>
<option>'.$position3.'</option>
<option>'.$position4.'</option>
<option>'.$position5.'</option>
<option>'.$position6.'</option>
<option>'.$position7.'</option>
<option>'.$position8.'</option>
</select>
</td>
</tr>
';
}
?>
<tr> /* --- FIX 2: fundal alb, text negru lizibil --- */
<th>Capacity</th> .info-list{width:100%;font-size:12px;border-collapse:collapse;}
<td> .info-list th{width:130px;text-align:left;color:#333;font-weight:600;padding:8px;background:#f8fafc;border-bottom:1px solid #eee;vertical-align:top;}
<?php .info-list td{padding:8px;color:#000;background:#ffffff;border-bottom:1px solid #f5f5f5;}
$now = count($aliusers); .info-list td a{color:#0066cc;text-decoration:none;}
$max = $alidata['max']; .info-list td a:hover{text-decoration:underline;}
if($now > $max)
{
$color = "red";
}
else
{
$color = "blue";
}
echo "<b><font color=\"$color\">($now/$max)</font></b>";
?>
</td>
</tr>
<tr>
<td colspan="2" class="empty"></td>
</tr>
<tr>
<td colspan="2"><a href="?p=editAli&aid=<?php echo $alidata['id'];?>">» Edit Alliance</a></td>
</tr>
<tr>
<td colspan="2"><a href="?p=DelAli&aid=<?php echo $alidata['id'];?>">» Delete Alliance</a></td>
</tr>
<tr>
<td colspan="2" class="empty"></td>
</tr>
<tr>
<td class="desc2" colspan="2">
<center><div class="desc2div">
<?php echo nl2br($alidata['notice']); ?>
</div></center>
</td>
</tr>
<tr>
<td colspan="2" class="empty"></td>
</tr>
</tbody>
</table>
</td>
<td class="desc1">
<center><div class="desc1div">
<?php echo nl2br($alidata['desc']); ?>
</div></center>
</td>
</tr>
</tr>
<tr>
<td colspan="4" class="empty"></td>
</tr>
</tbody>
</table>
.positions{display:flex;flex-direction:column;gap:8px;max-height:220px;overflow:auto;padding-right:4px;}
.pos-item{border:1px solid #eee;border-radius:3px;padding:6px 8px;background:#fafafa;}
.pos-item .name{font-weight:bold;color:#222;}
.pos-item .rank{font-size:11px;color:#71D000;margin-left:4px;}
.pos-item .perms{font-size:11px;color:#666;margin-top:3px;}
<table id="member" cellpadding="1" cellspacing="1"> .desc-box{background:#fcfcfc;border:1px solid #eee;border-radius:3px;padding:10px;min-height:120px;font-size:12px;line-height:1.5;white-space:pre-wrap;}
<thead>
<tr> .members-table,.mini-table{width:100%;border-collapse:collapse;font-size:12px;}
<th>&nbsp;</th> .members-table th,.mini-table th{background:#f0f0f0;padding:7px;border:1px solid #ddd;text-align:left;font-weight:bold;color:#333;}
<th>Player</th> .members-table td,.mini-table td{padding:6px;border:1px solid #eee;}
<th>Population</th> .members-table tr:hover{background:#f9fff0;}
<th>Villages</th> .members-table td.ra{width:30px;text-align:center;color:#888;}
<th>&nbsp;</th> .members-table td.on{width:24px;text-align:center;}
</tr>
</thead> .badge-cap{padding:2px 6px;border-radius:3px;font-weight:bold;color:#fff;}
<tbody> .badge-cap.ok{background:#2a7;}.badge-cap.full{background:#c00;}
<?php
// preload villages data .btn-row{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap;}
$userIDs = []; .btn{padding:6px 12px;border-radius:3px;font-size:12px;text-decoration:none;border:1px solid #bbb;background:#f5f5f5;color:#333;}
foreach($aliusers as $user) { .btn:hover{background:#fff;}
$userIDs[] = $user['id']; .btn.edit{border-color:#71D000;background:#eaffd5;color:#2a5a00;}
.btn.del{border-color:#c00;background:#ffe5e5;color:#900;}
.diplo-type{font-size:11px;padding:2px 5px;border-radius:2px;color:#fff;}
.diplo-1{background:#2a7;}.diplo-2{background:#06a;}.diplo-3{background:#c00;}
</style>
<div class="ali-wrap">
<!-- HEADER -->
<div class="ali-head">
<h1><span class="tag"><?php echo htmlspecialchars($alidata['tag']); ?></span> <?php echo htmlspecialchars($alidata['name']); ?></h1>
<div class="stats">
<div>👑 Founder: <b><a href="?p=player&uid=<?php echo $alidata['leader']; ?>"><?php echo htmlspecialchars($founder); ?></a></b></div>
<div>👥 Members: <b><?php echo count($aliusers); ?>/<?php echo $maxMembers; ?></b></div>
<div>🏆 Points: <b><?php echo number_format($totalpop); ?></b></div>
</div>
</div>
<div class="grid-2">
<!-- LEFT -->
<div>
<div class="card">
<h3>📋 Alliance Details</h3>
<div class="body">
<table class="info-list">
<tr><th>Tag</th><td><?php echo htmlspecialchars($alidata['tag']); ?></td></tr>
<tr><th>Name</th><td><?php echo htmlspecialchars($alidata['name']); ?></td></tr>
<tr><th>Rank</th><td><b>#<?php echo $allianceRank; ?></b></td></tr>
<tr><th>Points</th><td><?php echo number_format($totalpop); ?></td></tr>
<tr><th>Capacity</th><td>
<?php $now=count($aliusers); $cls=$now>=$maxMembers?'full':'ok'; ?>
<span class="badge-cap <?php echo $cls; ?>"><?php echo "$now/$maxMembers"; ?></span>
</td></tr>
</table>
<div style="margin-top:12px;">
<b style="font-size:12px;">🛡 Alliance Positions</b>
<div class="positions">
<?php
error_reporting(0);
$sql = "SELECT * FROM ".TB_PREFIX."ali_permission WHERE alliance = $aid";
$result = mysqli_query($GLOBALS["link"], $sql);
while($row = mysqli_fetch_assoc($result)){
$player = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT username FROM ".TB_PREFIX."users WHERE id = ".(int)$row['uid']));
$perms = [];
if($row['opt1']) $perms[]="Assign"; if($row['opt2']) $perms[]="Kick";
if($row['opt3']) $perms[]="Edit Desc"; if($row['opt4']) $perms[]="Invite";
if($row['opt5']) $perms[]="Forum"; if($row['opt6']) $perms[]="Diplomacy";
if($row['opt7']) $perms[]="MM";
echo '<div class="pos-item"><span class="name"><a href="admin.php?p=player&uid='.$row['uid'].'">'.htmlspecialchars($player['username']).'</a></span> <span class="rank">'.htmlspecialchars($row['rank']).'</span><div class="perms">'.implode(' • ', $perms).'</div></div>';
}
?>
</div>
</div>
<div class="btn-row">
<a class="btn edit" href="?p=editAli&aid=<?php echo $alidata['id'];?>"> Edit Alliance</a>
<a class="btn del" href="?p=DelAli&aid=<?php echo $alidata['id'];?>" onclick="return confirm('Delete alliance?')">🗑 Delete</a>
</div>
</div>
</div>
<div class="card">
<h3>📢 Alliance Notice</h3>
<div class="body"><div class="desc-box"><?php echo nl2br(htmlspecialchars($alidata['notice'])); ?></div></div>
</div>
</div>
<!-- RIGHT -->
<div>
<div class="card">
<h3>📖 Alliance Description</h3>
<div class="body"><div class="desc-box" style="min-height:260px;"><?php echo nl2br(htmlspecialchars($alidata['desc'])); ?></div></div>
</div>
</div>
</div>
<!-- MEMBERS -->
<div class="card">
<h3>👥 Members (<?php echo count($aliusers); ?>)</h3>
<div class="body" style="padding:0;">
<table class="members-table">
<thead><tr><th>#</th><th>Player</th><th>Population</th><th>Villages</th><th></th></tr></thead>
<tbody>
<?php
$rank=0;
$database->getProfileVillages($memberIDs);
foreach($aliusers as $user){
$rank++;
$TotalUserPop = $database->getVSumField($user['id'],"pop");
$TotalVillages = $database->getProfileVillages($user['id']);
echo "<tr>";
echo "<td class='ra'>$rank.</td>";
echo "<td><a href='admin.php?p=player&uid=".$user['id']."'>".htmlspecialchars($user['username'])."</a></td>";
echo "<td>".(int)$TotalUserPop."</td>";
echo "<td>".count($TotalVillages)."</td>";
echo "<td class='on'>";
if((time()-600) < $user['timestamp']) echo "<img class='online1' src='img/x.gif' title='Online now'>";
elseif((time()-86400) < $user['timestamp']) echo "<img class='online2' src='img/x.gif' title='<1 day'>";
elseif((time()-259200) < $user['timestamp']) echo "<img class='online3' src='img/x.gif' title='<3 days'>";
elseif((time()-604800) < $user['timestamp']) echo "<img class='online4' src='img/x.gif' title='<7 days'>";
else echo "<img class='online5' src='img/x.gif' title='Offline'>";
echo "</td></tr>";
} }
$database->getProfileVillages($userIDs); ?>
</tbody>
</table>
</div>
</div>
// display the page <div class="grid-2">
foreach($aliusers as $user) <!-- NEWS -->
{ <div class="card">
$rank = $rank + 1; <h3>📰 Alliance News</h3>
$TotalUserPop = $database->getVSumField($user['id'],"pop"); <div class="body" style="padding:0;max-height:300px;overflow:auto;">
$TotalVillages = $database->getProfileVillages($user['id']); <table class="mini-table">
echo "<tr>"; <thead><tr><th>Event</th><th style="width:130px;">Time</th></tr></thead>
echo "<td class=ra>".$rank.".</td>"; <tbody>
echo "<td class=pla><a href=spieler.php?uid=".$user['id'].">".$user['username']."</a></td>"; <?php
echo "<td class=hab>".$TotalUserPop."</td>"; $sql = "SELECT * FROM ".TB_PREFIX."ali_log WHERE aid = $aid ORDER BY date DESC LIMIT 50";
echo "<td class=vil>".count($TotalVillages)."</td>"; $result = mysqli_query($GLOBALS["link"], $sql);
if($aid == $session->alliance) while($row = mysqli_fetch_assoc($result)){
{ // --- FIX 4: curata HTML-ul din news ---
if ((time()-600) < $user['timestamp']) $comment = html_entity_decode($row['comment']);
{ $comment = preg_replace('/<a href="spieler\.php\?uid=(\d+)">([^<]+)<\/a>/i', '<a href="admin.php?p=player&uid=$1">$2</a>', $comment);
// 0 Min - 10 Min $comment = strip_tags($comment, '<a>'); // lasa doar linkurile curate
echo "<td class=on><img class=online1 src=img/x.gif title=now online alt=now online /></td>"; echo '<tr><td>'.$comment.'</td><td>'.date('d.m.Y H:i', $row['date']).'</td></tr>';
} }
elseif ((time()-86400) < $user['timestamp'] && (time()-600) > $user['timestamp']) ?>
{ </tbody>
// 10 Min - 1 Days </table>
echo "<td class=on><img class=online2 src=img/x.gif title=now online alt=now online /></td>"; </div>
} </div>
elseif ((time()-259200) < $user['timestamp'] && (time()-86400) > $user['timestamp'])
{
// 1-3 Days
echo "<td class=on><img class=online3 src=img/x.gif title=now online alt=now online /></td>";
}
elseif ((time()-604800) < $user['timestamp'] && (time()-259200) > $user['timestamp'])
{
echo "<td class=on><img class=online4 src=img/x.gif title=now online alt=now online /></td>";
}
else
{
echo "<td class=on><img class=online5 src=img/x.gif title=now online alt=now online /></td>";
}
}
echo " </tr>";
}
?>
</tbody>
</table>
<br /><br />
<table id="profile"> <!-- DIPLOMACY -->
<thead> <div class="card">
<tr> <h3>🤝 Diplomacy</h3>
<th colspan="3">Alliance News</th> <div class="body" style="padding:0;">
</tr> <table class="mini-table">
<tr> <thead><tr><th>Alliance</th><th>Type</th><th style="width:60px;">Status</th></tr></thead>
<td>Event</td> <tbody>
<td>Time</td> <?php
</tr> $sql = "SELECT * FROM ".TB_PREFIX."diplomacy WHERE alli1 = $aid OR alli2 = $aid ORDER BY accepted DESC";
</thead> $result = mysqli_query($GLOBALS["link"], $sql);
<?php while($row = mysqli_fetch_assoc($result)){
$sql = "SELECT * FROM ".TB_PREFIX."ali_log WHERE aid = ".(int) $_GET['aid'].""; $other = ($row['alli1']==$aid) ? $row['alli2'] : $row['alli1'];
$result = mysqli_query($GLOBALS["link"], $sql); $ally = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT tag FROM ".TB_PREFIX."alidata WHERE id = ".(int)$other));
while($row = mysqli_fetch_assoc($result)) $type = $row['type']==1?'Confederation':($row['type']==2?'NAP':'War');
{ $cls = 'diplo-'.$row['type'];
echo ' $acc = $row['accepted'] ? '<img src="../../gpack/travian_default/img/a/acc.gif">' : '<img src="../../gpack/travian_default/img/a/del.gif">';
<tr> echo '<tr><td><a href="admin.php?p=alliance&aid='.$other.'">'.htmlspecialchars($ally['tag']).'</a></td><td><span class="diplo-type '.$cls.'">'.$type.'</span></td><td>'.$acc.'</td></tr>';
<td>'.$row['comment'].'</td> }
<td>'.date('d:m:Y H:i', $row['date']).'</td> ?>
</tr>'; </tbody>
} </table>
?> </div>
</thead> </div>
</table> </div>
<br /><br />
<h3>Not Sure this Diplomacy is correct, but I think it is</h3> <?php include("allymedals.tpl"); ?>
<br /> </div>
<table id="profile">
<thead>
<tr>
<th colspan="3">Alliance Diplomacy Sent</th>
</tr>
<tr>
<td>Recipient Alliance</td>
<td>Type</td>
<td>Accepted</td>
</tr>
</thead>
<?php
$sql = "SELECT * FROM ".TB_PREFIX."diplomacy WHERE alli1 = ".(int) $_GET['aid']."";
$result = mysqli_query($GLOBALS["link"], $sql);
while($row = mysqli_fetch_assoc($result))
{
if($row['type'] == 1) { $type = 'Confederation Pact'; }
if($row['type'] == 2) { $type = 'Non Agression Pact'; }
if($row['type'] == 3) { $type = 'Declaration of War'; }
if($row['accepted'] == 0) { $accepted = "<img src=\"../../gpack/travian_default/img/a/del.gif\">"; }
if($row['accepted'] ==1) { $accepted = "<img src=\"../../gpack/travian_default/img/a/acc.gif\">"; }
$ally = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."alidata WHERE id = ".(int) $row['alli2']."")); <?php
echo ' } else {
<tr> echo "<div style='padding:30px;text-align:center;'>Alliance not found... <a href='javascript:history.go(-1)'>Back</a></div>";
<td><a href="admin.php?p=alliance&aid='.$row['alli1'].'">'.$ally['tag'].'</a></td> }
<td>'.$type.'</td>
<td>'.$accepted.'</td>
</tr>';
}
?>
</thead>
</table>
<br /><br />
<table id="profile">
<thead>
<tr>
<th colspan="3">Alliance Diplomacy Recieved</th>
</tr>
<tr>
<td>From Alliance</td>
<td>Type</td>
<td>Accepted</td>
</tr>
</thead>
<?php
$sql = "SELECT * FROM ".TB_PREFIX."diplomacy WHERE alli2 = ".(int) $_GET['aid']."";
$result = mysqli_query($GLOBALS["link"], $sql);
while($row = mysqli_fetch_assoc($result))
{
if($row['type'] == 1) { $type = 'Confederation Pact'; }
if($row['type'] == 2) { $type = 'Non Agression Pact'; }
if($row['type'] == 3) { $type = 'Declaration of War'; }
if($row['accepted'] == 0) { $accepted = "<img src=\"../../gpack/travian_default/img/a/del.gif\">"; }
if($row['accepted'] ==1) { $accepted = "<img src=\"../../gpack/travian_default/img/a/acc.gif\">"; }
$ally = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."alidata WHERE id = ".(int) $row['alli1'].""));
echo '
<tr>
<td><a href="admin.php?p=alliance&aid='.$row['alli2'].'">'.$ally['tag'].'</a></td>
<td>'.$type.'</td>
<td>'.$accepted.'</td>
</tr>';
}
?>
</thead>
</table>
<br /><br />
<table id="profile">
<thead>
<tr>
<th colspan="3">Alliance Relationships</th>
</tr>
<tr>
<td>Alliance</td>
<td>Type</td>
<td></td>
</tr>
</thead>
<?php
$sql = "SELECT * FROM ".TB_PREFIX."diplomacy WHERE alli1 = ".(int) $_GET['aid']." OR alli2 = ".(int) $_GET['aid']." AND accepted = 1";
$result = mysqli_query($GLOBALS["link"], $sql);
while($row = mysqli_fetch_assoc($result))
{
if($row['type'] == 1) { $type = 'Confederation Pact'; }
if($row['type'] == 2) { $type = 'Non Agression Pact'; }
if($row['type'] == 3) { $type = 'Declaration of War'; }
if($row['accepted'] == 0) { $accepted = "<img src=\"../../gpack/travian_default/img/a/del.gif\">"; }
if($row['accepted'] == 1) { $accepted = "<img src=\"../../gpack/travian_default/img/a/acc.gif\">"; }
$ally1 = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."alidata WHERE id = ".(int) $row['alli1'].""));
$ally2 = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."alidata WHERE id = ".(int) $row['alli2'].""));
echo '
<tr>
<td><a href="admin.php?p=alliance&aid='.$row['alli1'].'">'.$ally1['tag'].'</a> & <a href="admin.php?p=alliance&aid='.$row['alli2'].'">'.$ally2['tag'].'</a></td>
<td>'.$type.'</td>
<td><img src="../../gpack/travian_default/img/a/acc.gif"></td>
</tr>';
}
?>
</thead>
</table>
<br /><br />
<?php
include("allymedals.tpl");
}
else
{
echo "Not found...<a href=\"javascript: history.go(-1)\">Back</a>";
}
} }
?> ?>
+93 -85
View File
@@ -1,87 +1,95 @@
<?php <?php
$varmedal = $database->getProfileMedalAlly($_GET['aid'])
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : allymedal.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
$varmedal = $database->getProfileMedalAlly($_GET['aid']);
?> ?>
<form action="../GameEngine/Admin/Mods/delallymedal.php" method="POST"> <style>
<input type="hidden" name="aid" value="<?php echo $_GET['aid']; ?>"> .medal-card{background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;font-family:system-ui;margin-bottom:12px}
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>"> .medal-head{background:#0f172a;color:#fff;padding:8px 12px;font-size:13px;font-weight:600}
<table id="profile"> .medal-table{width:100%;border-collapse:collapse}
<thead> .medal-table th{background:#f8fafc;padding:7px 6px;font-size:11px;color:#64748b;text-transform:uppercase;font-weight:600;border-bottom:1px solid #e5e7eb;text-align:center}
<tr> .medal-table td{padding:8px 6px;font-size:12.5px;text-align:center;border-bottom:1px solid #f1f5f9;vertical-align:middle}
<th colspan="6">Alliance Medals (<?php echo sizeof($varmedal); ?>)</th> .medal-table tr:last-child td{border-bottom:0}
</tr> .medal-table img{width:28px;height:36px;display:block;margin:0 auto;border-radius:3px}
<tr> .medal-del{width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;background:#fef2f2;border-radius:5px;color:#dc2626;border:0;cursor:pointer}
<td>Category</td> .medal-del:hover{background:#fee2e2}
<td>Rank</td> .medal-del svg{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:2}
<td>Week</td> .medal-empty{padding:20px;text-align:center;color:#94a3b8;font-size:13px}
<td>Points</td> .medal-avg{background:#f8fafc;font-weight:600;color:#0f172a}
<td>Medal</td> </style>
<td></td>
</tr>
</thead>
<?php
if(sizeof($varmedal) ==0)
{ ?>
<td colspan="5"><center>This alliance has no medals yet</center></td><?php
}
elseif(sizeof($varmedal) >0)
{
foreach($varmedal as $medal)
{
$titel="Bonus";
switch ($medal['categorie'])
{
case "1": $titel="Attackers"; break;
case "2": $titel="Defenders"; break;
case "3": $titel="Climbers"; break;
case "4": $titel="Robbers"; break;
}
$title = $titel;
$rank = $medal['plaats'];
if($rank == '0') { $rank = "<p>Bonus</p>"; } else { $rank = $rank; }
$week = $medal['week'];
$points = $medal['points'];
if($points == '') { $points = "<p>Bonus</p>"; } else { $points = $points; }
echo" <div class="medal-card">
<tr> <div class="medal-head">Alliance Medals (<?=sizeof($varmedal)?>)</div>
<td>$title</td> <table class="medal-table">
<td>$rank</td> <thead>
<td>$week</td> <tr>
<td>$points</td> <th>Category</th><th>Rank</th><th>Week</th><th>Points</th><th>Medal</th><th style="width:32px"></th>
<td><img src=\"../gpack/travian_default/img/t/".$medal['img'].".jpg\"></td> </tr>
<td> </thead>
<input type=\"image\" name=\"medalid\" value=\"".$medal['id']."\" style=\"background-image: url('../gpack/travian_default/img/a/del.gif'); height: 12px; width: 12px;\" src=\"../gpack/travian_default/img/a/x.gif\"> <tbody>
</td> <?php if(sizeof($varmedal)==0){ ?>
</tr>"; <tr><td colspan="6" class="medal-empty">This alliance has no medals yet</td></tr>
} <?php } else {
$i=0;$averagerank=0;
$averagerank = 0; foreach($varmedal as $medal){
foreach($varmedal as $medal) switch($medal['categorie']){case "1":$t="Attackers";break;case "2":$t="Defenders";break;case "3":$t="Climbers";break;case "4":$t="Robbers";break;default:$t="Bonus";}
{ $rank=$medal['plaats']; if($rank=='0') $rank='Bonus'; else {$i++; $averagerank+=$medal['plaats'];}
$rank = $medal['plaats']; $points=$medal['points']; if($points=='') $points='Bonus';
if($rank > 0) ?>
{ <tr>
if(is_numeric($rank)) <td><?=$t?></td>
{ <td><?=$rank?></td>
$i = $i + 1; <td><?=$medal['week']?></td>
$averagerank = $averagerank + $medal['plaats']; <td><?=$points?></td>
} <td><img src="../gpack/travian_default/img/t/<?=$medal['img']?>.jpg"></td>
else <td>
{ <form action="../GameEngine/Admin/Mods/delallymedal.php" method="POST" style="margin:0">
$averagerank = $averagerank + 0; <input type="hidden" name="aid" value="<?=$_GET['aid']?>">
} <input type="hidden" name="admid" value="<?=$_SESSION['id']?>">
} <button type="submit" name="medalid" value="<?=$medal['id']?>" class="medal-del" title="Delete">
} <svg viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>
$average = $averagerank / $i; </button>
echo "</form><tr><td><b>Average Rank</b></td><td>$average</td><td></td><td></td><td>Delete All</td>"; </form>
} </td>
?> </tr>
<td> <?php }
<form action="../GameEngine/Admin/Mods/delallymedalbyaid.php" method="POST"> $average = $i>0 ? round($averagerank/$i,2) : 0;
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>"> ?>
<input type="hidden" name="aid" value="<?php echo $_GET['aid']; ?>"> <tr class="medal-avg">
<input type="image" name="allyid" value="<?php echo $id; ?>" style="background-image: url('../gpack/travian_default/img/a/del.gif'); height: 12px; width: 12px;" src="../gpack/travian_default/img/a/x.gif"> <td>Average Rank</td>
</form> <td><?=$average?></td>
</td> <td></td><td></td>
</tbody> <td>Delete All</td>
</table> <td>
<form action="../GameEngine/Admin/Mods/delallymedalbyaid.php" method="POST" style="margin:0">
<input type="hidden" name="admid" value="<?=$_SESSION['id']?>">
<input type="hidden" name="aid" value="<?=$_GET['aid']?>">
<button type="submit" class="medal-del" title="Delete All">
<svg viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>
</button>
</form>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
+21 -1
View File
@@ -1,4 +1,24 @@
<?php <?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : artifact.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
include_once("../GameEngine/Artifacts.php"); include_once("../GameEngine/Artifacts.php");
$artifact = reset($database->getOwnArtefactInfo($_GET['did'])); $artifact = reset($database->getOwnArtefactInfo($_GET['did']));
+16 -1
View File
@@ -1,6 +1,21 @@
<?php <?php
################################################################################# #################################################################################
## ban.tpl - REDESIGN 2025 ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : ban.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if($_SESSION['access'] < ADMIN) die("Access Denied!"); if($_SESSION['access'] < ADMIN) die("Access Denied!");
+14 -6
View File
@@ -2,12 +2,20 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename ban_msg.tpl ## ## Filename : ban_msg.tpl ##
## Developed by: yi12345 ## ## Type : Admin Panel Frontend ##
## Reworked: Shadow ## ## --------------------------------------------------------------------------- ##
## License: TravianZ Project ## ## Developed by : yi12345 (Original) ##
## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## ## Refactored by : Shadow ##
## ## ## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
$uid = isset($session->uid) ? (int)$session->uid : 0; $uid = isset($session->uid) ? (int)$session->uid : 0;
+36 -9
View File
@@ -2,15 +2,42 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename cleanban.tpl ## ## Filename : cleanban.tpl ##
## Developed by: aggenkeech ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
?> ?>
<form action="../GameEngine/Admin/Mods/mainteneceCleanBanData.php" method="POST"> <style>
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>"> .clean-card{max-width:480px;margin:12px auto;background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;font-family:system-ui}
<td class="hab">Clean Banlist Data (TRUNCATE)</td> .clean-head{background:#0f172a;color:#fff;padding:10px 14px;font-weight:600;font-size:14px}
<td class="hab"><center><input type="image" src="../img/admin/b/ok1.gif" value="submit"></center></td> .clean-body{display:flex;justify-content:space-between;align-items:center;padding:14px}
.clean-desc{font-size:13.5px;color:#334155}
.clean-desc strong{color:#dc2626}
.clean-btn{padding:8px 14px;background:#dc2626;color:#fff;border:0;border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;display:flex;align-items:center;gap:6px}
.clean-btn:hover{background:#b91c1c}
.clean-btn svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2}
</style>
<form action="../GameEngine/Admin/Mods/mainteneceCleanBanData.php" method="POST" onsubmit="return confirm('TRUNCATE banlist? This cannot be undone!')">
<input type="hidden" name="admid" value="<?=$_SESSION['id']?>">
<div class="clean-card">
<div class="clean-head">Clear Banlist - Data</div>
<div class="clean-body">
<div class="clean-desc">Clean Banlist Data <strong>(TRUNCATE)</strong></div>
<button type="submit" class="clean-btn">
<svg viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>Clean
</button>
</div>
</div>
</form> </form>
+193 -478
View File
@@ -2,498 +2,214 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename config.tpl ## ## Filename : config.tpl ##
## Developed by: Dzoki ## ## Type : Admin Panel Frontend ##
## Rework by: ronix ## ## --------------------------------------------------------------------------- ##
## License: TravianZ Project ## ## Developed by : Dzoki (Original) ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Rework by : ronix ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if(!isset($_SESSION)) session_start(); if(!isset($_SESSION)) session_start();
if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN); if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN);
$editIcon = '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#93c5fd" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 20h9"/><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"/></svg>';
?> ?>
<style> <style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);} .config-wrap{max-width:1100px;margin:0 auto;font-family:system-ui,-apple-system,Segoe UI,Roboto}
.config-title{text-align:center;font-size:20px;font-weight:800;margin:8px 0 12px;color:#0f172a}
.config-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;margin-bottom:10px;overflow:hidden;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.config-head{display:flex;justify-content:space-between;align-items:center;padding:7px 10px;background:#0f172a;color:#fff;font-weight:600;font-size:13px;line-height:1}
.edit-btn{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:4px;transition:.15s}
.edit-btn:hover{background:rgba(255,255,255,.12)}
.edit-btn svg{width:14px;height:14px;transition:.15s}
.edit-btn:hover svg{stroke:#fff;transform:scale(1.05)}
.config-table{width:100%;border-collapse:collapse}
.config-table tr{border-top:1px solid #f1f5f9}
.config-table tr:first-child{border-top:0}
.config-table td{padding:5px 8px;vertical-align:middle;font-size:13px;line-height:1.25}
.config-table td.b{background:#f8fafc;font-weight:700;color:#334155;text-transform:uppercase;font-size:11px;letter-spacing:.3px;padding:4px 8px}
.config-table td:first-child{color:#475569;width:60%}
.config-table td:last-child{color:#0f172a;font-weight:500}
em.tooltip{position:relative;display:inline-block;margin-left:4px;cursor:help;color:#94a3b8;font-style:normal;font-weight:700}
em.tooltip span.classic{display:none;position:absolute;z-index:99;left:-8px;top:20px;width:220px;padding:6px 8px;background:#0f172a;color:#e2e8f0;border-radius:6px;font-size:11px;line-height:1.3;box-shadow:0 4px 12px rgba(0,0,0,.2);font-weight:400}
em.tooltip:hover span.classic{display:block}
em.tooltip span.classic:before{content:'';position:absolute;left:14px;top:-6px;border:6px solid transparent;border-bottom-color:#0f172a}
.badge{display:inline-block;padding:1px 6px;border-radius:999px;font-size:11px;font-weight:600;line-height:1.3}
.badge.green{background:#dcfce7;color:#166534}
.badge.red{background:#fee2e2;color:#991b1b}
.badge.blue{background:#dbeafe;color:#1e40af}
.badge.gray{background:#f1f5f9;color:#475569}
</style> </style>
<h2><center><?php echo SERV_CONFIG ?></center></h2>
<table id="member">
<thead>
<tr>
<th><?php echo SERV_SETT ?> <a href="admin.php?p=editServerSet"><img src="../img/admin/edit.gif" title="<?php echo EDIT_SERV_SETT ?>"></a></th>
</tr>
</thead>
</table>
<table id="profile"> <div class="config-wrap">
<tr> <h2 class="config-title"><?php echo SERV_CONFIG ?></h2>
<td class="b"><?php echo SERV_VARIABLE ?></td>
<td class="b"><?php echo SERV_VALUE ?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_NAME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NAME_TOOLTIP ?></span></em></td>
<td><?php echo SERVER_NAME;?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_STARTED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_STARTED_TOOLTIP ?></span></em></td>
<td><?php echo "Date:".START_DATE." Time:".START_TIME; //date("d.m.y H:i",COMMENCE);?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_TIMEZONE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_TIMEZONE_TOOLTIP ?></span></em></td>
<td><?php echo TIMEZONE;?></td>
</tr>
<td><?php echo CONF_SERV_LANG ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_LANG_TOOLTIP ?></span></em></td>
<td><?php if(LANG == 'en') echo "English";
elseif(LANG == 'es') echo "Spain";
elseif(LANG == 'rs') echo "Serbian";
elseif(LANG == 'ru') echo "Russian";
elseif(LANG == 'zh_tw') echo "Taiwanese"; ?>
</td>
<tr>
<td><?php echo CONF_SERV_SERVSPEED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_SERVSPEED_TOOLTIP ?></span></em></td>
<td><?php echo ''.SPEED.'x';?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_TROOPSPEED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_TROOPSPEED_TOOLTIP ?></span></em></td>
<td><?php echo INCREASE_SPEED;?>x</td>
</tr>
<tr>
<td><?php echo CONF_SERV_EVASIONSPEED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_EVASIONSPEED_TOOLTIP ?></span></em></td>
<td><?php echo EVASION_SPEED;?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_STORMULTIPLER ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_STORMULTIPLER_TOOLTIP ?></span></em></td>
<td><?php echo STORAGE_MULTIPLIER;?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_TRADCAPACITY ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_TRADCAPACITY_TOOLTIP ?></span></em></td>
<td><?php echo TRADER_CAPACITY;?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_CRANCAPACITY ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_CRANCAPACITY_TOOLTIP ?></span></em></td>
<td><?php echo CRANNY_CAPACITY;?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_TRAPCAPACITY ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_TRAPCAPACITY_TOOLTIP ?></span></em></td>
<td><?php echo TRAPPER_CAPACITY;?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_NATUNITSMULTIPLIER ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NATUNITSMULTIPLIER_TOOLTIP ?></span></em></td>
<td><?php echo NATARS_UNITS;?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_NATARS_SPAWN_TIME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NATARS_SPAWN_TIME_TOOLTIP ?></span></em></td>
<td><?php echo NATARS_SPAWN_TIME;?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_NATARS_WW_SPAWN_TIME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NATARS_WW_SPAWN_TIME_TOOLTIP ?></span></em></td>
<td><?php echo NATARS_WW_SPAWN_TIME;?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_NATARS_WW_BUILDING_PLAN_SPAWN_TIME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NATARS_WW_BUILDING_PLAN_SPAWN_TIME_TOOLTIP ?></span></em></td>
<td><?php echo NATARS_WW_BUILDING_PLAN_SPAWN_TIME;?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_MAPSIZE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_MAPSIZE_TOOLTIP ?></span></em></td>
<td><?php echo WORLD_MAX;?>x<?php echo WORLD_MAX;?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_VILLEXPSPEED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_VILLEXPSPEED_TOOLTIP ?></span></em></td>
<td><?php echo CP == 0 ? "Fast" : "Slow"; ?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_BEGINPROTECT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_BEGINPROTECT_TOOLTIP ?></span></em></td>
<td><?php echo (PROTECTION / 3600);?> hour/s</td>
</tr>
<tr>
<td><?php echo CONF_SERV_REGOPEN ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_REGOPEN_TOOLTIP ?></span></em></td>
<td><?php echo REG_OPEN ? "<b><font color='blue'>True</font></b>" : "<b><font color='Red'>False</font></b>"; ?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_ACTIVMAIL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_ACTIVMAIL_TOOLTIP ?></span></em></td>
<td><?php echo AUTH_EMAIL ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_QUEST ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_QUEST_TOOLTIP ?></span></em></td>
<td><?php echo QUEST ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_QTYPE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_QTYPE_TOOLTIP ?></span></em></td>
<td><?php echo QTYPE == 25 ? "<b><font color='Blue'>Travian Official</font></b>" : "<b><font color='Blue'>TravianZ Extended</font></b>"; ?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_DLR ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_DLR_TOOLTIP ?></span></em></td>
<td><?php echo DEMOLISH_LEVEL_REQ; ?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_WWSTATS ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_WWSTATS_TOOLTIP ?></span></em></td>
<td><?php if(WW) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(WW == false) { echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_NTRTIME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NTRTIME_TOOLTIP ?></span></em></td>
<td><?php if(NATURE_REGTIME >= 86400){ echo ''.(NATURE_REGTIME/86400).' Days'; } else if(NATURE_REGTIME < 86400){ echo ''.(NATURE_REGTIME/3600).' Hours'; } ?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_OASIS_WOOD_PROD_MULT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_OASIS_WOOD_PROD_MULT_TOOLTIP ?></span></em></td>
<td><?php echo OASIS_WOOD_MULTIPLIER ?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_OASIS_CLAY_PROD_MULT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_OASIS_CLAY_PROD_MULT_TOOLTIP ?></span></em></td>
<td><?php echo OASIS_CLAY_MULTIPLIER ?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_OASIS_IRON_PROD_MULT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_OASIS_IRON_PROD_MULT_TOOLTIP ?></span></em></td>
<td><?php echo OASIS_IRON_MULTIPLIER ?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_OASIS_CROP_PROD_MULT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_OASIS_CROP_PROD_MULT_TOOLTIP ?></span></em></td>
<td><?php echo OASIS_CROP_MULTIPLIER ?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_MEDALINTERVAL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_MEDALINTERVAL_TOOLTIP ?></span></em></td>
<td><?php if(MEDALINTERVAL >= 86400){ echo ''.(MEDALINTERVAL/86400).' Days'; } else if(MEDALINTERVAL < 86400){ echo ''.(MEDALINTERVAL/3600).' Hours'; } ?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_TOURNTHRES ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_TOURNTHRES_TOOLTIP ?></span></em></td>
<td><?php echo TS_THRESHOLD;?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_GWORKSHOP ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_GWORKSHOP_TOOLTIP ?></span></em></td>
<td><?php if(GREAT_WKS) { echo "<b><font color='Green'>Enabled</font></b>"; } else { echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
</tr>
<tr>
<td><?php echo CONF_SERV_NATARSTAT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NATARSTAT_TOOLTIP ?></span></em></td>
<td><?php if(SHOW_NATARS) { echo "<b><font color='blue'>True</font></b>"; } else { echo "<b><font color='Red'>False</font></b>"; } ?></td>
<tr>
<td><?php echo CONF_SERV_PEACESYST ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_PEACESYST_TOOLTIP ?></span></em></td>
<td>
<?php echo (["None", "Normal", "Christmas", "New Year", "Easter"])[PEACE]; ?>
</td>
</tr>
<tr>
<td><?php echo CONF_SERV_GRAPHICPACK ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_GRAPHICPACK_TOOLTIP ?></span></em></td>
<td><?php if(GP_ENABLE) { echo "<b><font color='Green'>Enabled</font></b>"; } else { echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
</tr>
<tr>
<tr>
<td><?php echo CONF_SERV_ERRORREPORT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_ERRORREPORT_TOOLTIP ?></span></em></td>
<td><b><?php echo (ERROR_REPORT=="error_reporting (0);")? "No": "Yes";?></b></td>
</tr>
</table>
<table id="member">
<thead>
<tr>
<th>New Mechanics and Functions <a href="admin.php?p=editNewFunctions"><img src="../img/admin/edit.gif" title="Edit New Mechanics and Functions"></a></th>
</tr>
</thead>
</table>
<table id="profile"> <!-- SERVER SETTINGS -->
<tr> <div class="config-card">
<td class="b"><?php echo SERV_VARIABLE ?></td> <div class="config-head">
<td class="b"><?php echo SERV_VALUE ?></td> <span><?php echo SERV_SETT ?></span>
</tr> <a href="admin.php?p=editServerSet" title="<?php echo EDIT_SERV_SETT ?>" class="edit-btn"><?php echo $editIcon; ?></a>
<tr> </div>
<td>Display oasis in profile <em class="tooltip">?<span class="classic">Enable (Disable) the display of oases of each village in the player profile</span></em></td> <table class="config-table">
<td><?php echo NEW_FUNCTIONS_OASIS ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td> <tr><td class="b"><?php echo SERV_VARIABLE ?></td><td class="b"><?php echo SERV_VALUE ?></td></tr>
</tr> <tr><td><?php echo CONF_SERV_NAME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NAME_TOOLTIP ?></span></em></td><td><?php echo SERVER_NAME;?></td></tr>
<tr> <tr><td><?php echo CONF_SERV_STARTED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_STARTED_TOOLTIP ?></span></em></td><td><?php echo "Date:".START_DATE." Time:".START_TIME;?></td></tr>
<td>Alliance invitation message <em class="tooltip">?<span class="classic">Enable (Disable) sending an in-game message to the player, if he was invited to the alliance</span></em></td> <tr><td><?php echo CONF_SERV_TIMEZONE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_TIMEZONE_TOOLTIP ?></span></em></td><td><?php echo TIMEZONE;?></td></tr>
<td><?php echo NEW_FUNCTIONS_ALLIANCE_INVITATION ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td> <tr><td><?php echo CONF_SERV_LANG ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_LANG_TOOLTIP ?></span></em></td><td><?php if(LANG == 'en') echo "English"; elseif(LANG == 'es') echo "Spain"; elseif(LANG == 'rs') echo "Serbian"; elseif(LANG == 'ru') echo "Russian"; elseif(LANG == 'zh_tw') echo "Taiwanese"; ?></td></tr>
</tr> <tr><td><?php echo CONF_SERV_SERVSPEED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_SERVSPEED_TOOLTIP ?></span></em></td><td><?php echo ''.SPEED.'x';?></td></tr>
<tr> <tr><td><?php echo CONF_SERV_TROOPSPEED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_TROOPSPEED_TOOLTIP ?></span></em></td><td><?php echo INCREASE_SPEED;?>x</td></tr>
<td>New Alliance & Embassy Mechanics <em class="tooltip">?<span class="classic">For this setting, you can find more information on the link: <a href="https://github.com/Shadowss/TravianZ/wiki/New-Alliance-&-Embassy-Mechanics" target="_blank">https://github.com</a></span></em></td> <tr><td><?php echo CONF_SERV_EVASIONSPEED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_EVASIONSPEED_TOOLTIP ?></span></em></td><td><?php echo EVASION_SPEED;?></td></tr>
<td><?php echo NEW_FUNCTIONS_EMBASSY_MECHANICS ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td> <tr><td><?php echo CONF_SERV_STORMULTIPLER ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_STORMULTIPLER_TOOLTIP ?></span></em></td><td><?php echo STORAGE_MULTIPLIER;?></td></tr>
</tr> <tr><td><?php echo CONF_SERV_TRADCAPACITY ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_TRADCAPACITY_TOOLTIP ?></span></em></td><td><?php echo TRADER_CAPACITY;?></td></tr>
<tr> <tr><td><?php echo CONF_SERV_CRANCAPACITY ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_CRANCAPACITY_TOOLTIP ?></span></em></td><td><?php echo CRANNY_CAPACITY;?></td></tr>
<td>New forum post message <em class="tooltip">?<span class="classic">Enable (Disable) if a player leaves at least one message in the thread on the forum, he will receive in-game messages about the fact that new messages have appeared in the same thread (i.e. is technically "subscribed to")</span></em></td> <tr><td><?php echo CONF_SERV_TRAPCAPACITY ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_TRAPCAPACITY_TOOLTIP ?></span></em></td><td><?php echo TRAPPER_CAPACITY;?></td></tr>
<td><?php echo NEW_FUNCTIONS_FORUM_POST_MESSAGE ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td> <tr><td><?php echo CONF_SERV_NATUNITSMULTIPLIER ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NATUNITSMULTIPLIER_TOOLTIP ?></span></em></td><td><?php echo NATARS_UNITS;?></td></tr>
</tr> <tr><td><?php echo CONF_SERV_NATARS_SPAWN_TIME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NATARS_SPAWN_TIME_TOOLTIP ?></span></em></td><td><?php echo NATARS_SPAWN_TIME;?></td></tr>
<tr> <tr><td><?php echo CONF_SERV_NATARS_WW_SPAWN_TIME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NATARS_WW_SPAWN_TIME_TOOLTIP ?></span></em></td><td><?php echo NATARS_WW_SPAWN_TIME;?></td></tr>
<td>Tribes images in profile <em class="tooltip">?<span class="classic">Enable (Disable) displaying images of tribes with a description in the players profile</span></em></td> <tr><td><?php echo CONF_SERV_NATARS_WW_BUILDING_PLAN_SPAWN_TIME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NATARS_WW_BUILDING_PLAN_SPAWN_TIME_TOOLTIP ?></span></em></td><td><?php echo NATARS_WW_BUILDING_PLAN_SPAWN_TIME;?></td></tr>
<td><?php echo NEW_FUNCTIONS_TRIBE_IMAGES ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td> <tr><td><?php echo CONF_SERV_MAPSIZE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_MAPSIZE_TOOLTIP ?></span></em></td><td><?php echo WORLD_MAX;?>x<?php echo WORLD_MAX;?></td></tr>
</tr> <tr><td><?php echo CONF_SERV_VILLEXPSPEED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_VILLEXPSPEED_TOOLTIP ?></span></em></td><td><?php echo CP == 0 ? "Fast" : "Slow"; ?></td></tr>
<tr> <tr><td><?php echo CONF_SERV_BEGINPROTECT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_BEGINPROTECT_TOOLTIP ?></span></em></td><td><?php echo (PROTECTION / 3600);?> hour/s</td></tr>
<td>MHs images in profile <em class="tooltip">?<span class="classic">Enable (Disable) displaying images of Multihunters with a description in the MHs profile</span></em></td> <tr><td><?php echo CONF_SERV_REGOPEN ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_REGOPEN_TOOLTIP ?></span></em></td><td><?php echo REG_OPEN ? "<span class='badge blue'>True</span>" : "<span class='badge red'>False</span>"; ?></td></tr>
<td><?php echo NEW_FUNCTIONS_MHS_IMAGES ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td> <tr><td><?php echo CONF_SERV_ACTIVMAIL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_ACTIVMAIL_TOOLTIP ?></span></em></td><td><?php echo AUTH_EMAIL ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
</tr> <tr><td><?php echo CONF_SERV_QUEST ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_QUEST_TOOLTIP ?></span></em></td><td><?php echo QUEST ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
<tr> <tr><td><?php echo CONF_SERV_QTYPE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_QTYPE_TOOLTIP ?></span></em></td><td><?php echo QTYPE == 25 ? "<span class='badge blue'>Travian Official</span>" : "<span class='badge blue'>TravianZ Extended</span>"; ?></td></tr>
<td>Display artifact in profile <em class="tooltip">?<span class="classic">Enable (Disable) the display of the artifact in the player profile, opposite the corresponding village in which it is located</span></em></td> <tr><td><?php echo CONF_SERV_DLR ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_DLR_TOOLTIP ?></span></em></td><td><?php echo DEMOLISH_LEVEL_REQ; ?></td></tr>
<td><?php echo NEW_FUNCTIONS_DISPLAY_ARTIFACT ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td> <tr><td><?php echo CONF_SERV_WWSTATS ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_WWSTATS_TOOLTIP ?></span></em></td><td><?php echo WW ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
</tr> <tr><td><?php echo CONF_SERV_NTRTIME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NTRTIME_TOOLTIP ?></span></em></td><td><?php echo NATURE_REGTIME >= 86400 ? (NATURE_REGTIME/86400).' Days' : (NATURE_REGTIME/3600).' Hours'; ?></td></tr>
<tr> <tr><td><?php echo CONF_SERV_OASIS_WOOD_PROD_MULT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_OASIS_WOOD_PROD_MULT_TOOLTIP ?></span></em></td><td><?php echo OASIS_WOOD_MULTIPLIER ?></td></tr>
<td>Display WoW in profile <em class="tooltip">?<span class="classic">Enable (Disable) the display of the wonder in the player profile, opposite the corresponding village in which it is located</span></em></td> <tr><td><?php echo CONF_SERV_OASIS_CLAY_PROD_MULT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_OASIS_CLAY_PROD_MULT_TOOLTIP ?></span></em></td><td><?php echo OASIS_CLAY_MULTIPLIER ?></td></tr>
<td><?php echo NEW_FUNCTIONS_DISPLAY_WONDER ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td> <tr><td><?php echo CONF_SERV_OASIS_IRON_PROD_MULT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_OASIS_IRON_PROD_MULT_TOOLTIP ?></span></em></td><td><?php echo OASIS_IRON_MULTIPLIER ?></td></tr>
</tr> <tr><td><?php echo CONF_SERV_OASIS_CROP_PROD_MULT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_OASIS_CROP_PROD_MULT_TOOLTIP ?></span></em></td><td><?php echo OASIS_CROP_MULTIPLIER ?></td></tr>
<tr> <tr><td><?php echo CONF_SERV_MEDALINTERVAL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_MEDALINTERVAL_TOOLTIP ?></span></em></td><td><?php echo MEDALINTERVAL >= 86400 ? (MEDALINTERVAL/86400).' Days' : (MEDALINTERVAL/3600).' Hours'; ?></td></tr>
<td>Vacation Mode <em class="tooltip">?<span class="classic">Enable (Disable) vacation mode, will be displayed or hidden in the player profile menu</span></em></td> <tr><td><?php echo CONF_SERV_TOURNTHRES ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_TOURNTHRES_TOOLTIP ?></span></em></td><td><?php echo TS_THRESHOLD;?></td></tr>
<td><?php echo NEW_FUNCTIONS_VACATION ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td> <tr><td><?php echo CONF_SERV_GWORKSHOP ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_GWORKSHOP_TOOLTIP ?></span></em></td><td><?php echo GREAT_WKS ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
</tr> <tr><td><?php echo CONF_SERV_NATARSTAT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NATARSTAT_TOOLTIP ?></span></em></td><td><?php echo SHOW_NATARS ? "<span class='badge blue'>True</span>" : "<span class='badge red'>False</span>"; ?></td></tr>
<tr> <tr><td><?php echo CONF_SERV_PEACESYST ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_PEACESYST_TOOLTIP ?></span></em></td><td><?php echo (["None", "Normal", "Christmas", "New Year", "Easter"])[PEACE]; ?></td></tr>
<td>Catapult targets <em class="tooltip">?<span class="classic">Enable (Disable) the display of the targets of the catapults in the rally point that were sent by you</span></em></td> <tr><td><?php echo CONF_SERV_GRAPHICPACK ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_GRAPHICPACK_TOOLTIP ?></span></em></td><td><?php echo GP_ENABLE ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
<td><?php echo NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td> <tr><td><?php echo CONF_SERV_ERRORREPORT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_ERRORREPORT_TOOLTIP ?></span></em></td><td><b><?php echo (ERROR_REPORT=="error_reporting (0);")? "No": "Yes";?></b></td></tr>
</tr> </table>
<tr> </div>
<td>Manual on Nature and Natars <em class="tooltip">?<span class="classic">Enable (Disable) displaying information in the Manual about the troops of Nature and Natars</span></em></td>
<td><?php echo NEW_FUNCTIONS_MANUAL_NATURENATARS ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
</tr>
<tr>
<td>Direct links placement <em class="tooltip">?<span class="classic">If Enabled, then the Direct links will be placed in the left menu, if Disabled then Direct links will be placed in the right menu as in the original Travian</span></em></td>
<td><?php echo NEW_FUNCTIONS_DISPLAY_LINKS ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
</tr>
<tr>
<td>Medal Veteran Player <em class="tooltip">?<span class="classic">Enable (Disable) medal achieved for playing 3 years of Travian</span></em></td>
<td><?php echo NEW_FUNCTIONS_MEDAL_3YEAR ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
</tr>
<tr>
<td>Medal Veteran Player 5a <em class="tooltip">?<span class="classic">Enable (Disable) medal achieved for playing 5 years of Travian</span></em></td>
<td><?php echo NEW_FUNCTIONS_MEDAL_5YEAR ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
</tr>
<tr>
<td>Medal Veteran Player 10a <em class="tooltip">?<span class="classic">Enable (Disable) medal achieved for playing 10 years of Travian</span></em></td>
<td><?php echo NEW_FUNCTIONS_MEDAL_10YEAR ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
</tr>
</table>
<table id="member">
<thead>
<tr>
<th><?php echo PLUS_SETT ?> <a href="admin.php?p=editPlusSet"><img src="../img/admin/edit.gif" title="<?php echo EDIT_PLUS_SETT1 ?>"></a></th>
</tr>
</thead>
</table>
<table id="profile"> <!-- NEW FUNCTIONS -->
<tr> <div class="config-card">
<td><?php echo CONF_PLUS_PAYPALEMAIL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PAYPALEMAIL_TOOLTIP ?></span></em></td> <div class="config-head"><span>New Mechanics and Functions</span><a href="admin.php?p=editNewFunctions" title="Edit New Mechanics and Functions" class="edit-btn"><?php echo $editIcon; ?></a></div>
<td><?php echo (defined('PAYPAL_EMAIL') ? PAYPAL_EMAIL : 'martin@martinambrus.com'); ?></td> <table class="config-table">
</tr> <tr><td class="b"><?php echo SERV_VARIABLE ?></td><td class="b"><?php echo SERV_VALUE ?></td></tr>
<tr> <tr><td>Display oasis in profile <em class="tooltip">?<span class="classic">Enable (Disable) the display of oases of each village in the player profile</span></em></td><td><?php echo NEW_FUNCTIONS_OASIS ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
<td><?php echo CONF_PLUS_CURRENCY ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_CURRENCY_TOOLTIP ?></span></em></td> <tr><td>Alliance invitation message <em class="tooltip">?<span class="classic">Enable (Disable) sending an in-game message to the player, if he was invited to the alliance</span></em></td><td><?php echo NEW_FUNCTIONS_ALLIANCE_INVITATION ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
<td><?php echo (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td> <tr><td>New Alliance & Embassy Mechanics <em class="tooltip">?<span class="classic">https://github.com/Shadowss/TravianZ/wiki/New-Alliance-&-Embassy-Mechanics</span></em></td><td><?php echo NEW_FUNCTIONS_EMBASSY_MECHANICS ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
</tr> <tr><td>New forum post message <em class="tooltip">?<span class="classic">Enable (Disable) forum subscription messages</span></em></td><td><?php echo NEW_FUNCTIONS_FORUM_POST_MESSAGE ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
<tr> <tr><td>Tribes images in profile <em class="tooltip">?<span class="classic">Enable (Disable) displaying images of tribes</span></em></td><td><?php echo NEW_FUNCTIONS_TRIBE_IMAGES ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
<td><?php echo CONF_PLUS_PACKAGEGOLDA ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEGOLDA_TOOLTIP ?></span></em></td> <tr><td>MHs images in profile <em class="tooltip">?<span class="classic">Enable (Disable) displaying images of Multihunters</span></em></td><td><?php echo NEW_FUNCTIONS_MHS_IMAGES ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
<td><?php echo (defined('PLUS_PACKAGE_A_GOLD') ? PLUS_PACKAGE_A_GOLD : 60); ?></td> <tr><td>Display artifact in profile <em class="tooltip">?<span class="classic">Enable (Disable) the display of the artifact</span></em></td><td><?php echo NEW_FUNCTIONS_DISPLAY_ARTIFACT ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
</tr> <tr><td>Display WoW in profile <em class="tooltip">?<span class="classic">Enable (Disable) the display of the wonder</span></em></td><td><?php echo NEW_FUNCTIONS_DISPLAY_WONDER ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
<tr> <tr><td>Vacation Mode <em class="tooltip">?<span class="classic">Enable (Disable) vacation mode</span></em></td><td><?php echo NEW_FUNCTIONS_VACATION ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
<td><?php echo CONF_PLUS_PACKAGEPRICEA ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEPRICEA_TOOLTIP ?></span></em></td> <tr><td>Catapult targets <em class="tooltip">?<span class="classic">Enable (Disable) the display of catapult targets</span></em></td><td><?php echo NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
<td><?php echo (defined('PLUS_PACKAGE_A_PRICE') ? PLUS_PACKAGE_A_PRICE : '1,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td> <tr><td>Manual on Nature and Natars <em class="tooltip">?<span class="classic">Enable (Disable) manual info</span></em></td><td><?php echo NEW_FUNCTIONS_MANUAL_NATURENATARS ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
</tr> <tr><td>Direct links placement <em class="tooltip">?<span class="classic">Left menu vs right menu</span></em></td><td><?php echo NEW_FUNCTIONS_DISPLAY_LINKS ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
<tr> <tr><td>Medal Veteran Player <em class="tooltip">?<span class="classic">3 years</span></em></td><td><?php echo NEW_FUNCTIONS_MEDAL_3YEAR ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
<td><?php echo CONF_PLUS_PACKAGEGOLDB ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEGOLDB_TOOLTIP ?></span></em></td> <tr><td>Medal Veteran Player 5a <em class="tooltip">?<span class="classic">5 years</span></em></td><td><?php echo NEW_FUNCTIONS_MEDAL_5YEAR ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
<td><?php echo (defined('PLUS_PACKAGE_B_GOLD') ? PLUS_PACKAGE_B_GOLD : 120); ?></td> <tr><td>Medal Veteran Player 10a <em class="tooltip">?<span class="classic">10 years</span></em></td><td><?php echo NEW_FUNCTIONS_MEDAL_10YEAR ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
</tr> </table>
<tr> </div>
<td><?php echo CONF_PLUS_PACKAGEPRICEB ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEPRICEB_TOOLTIP ?></span></em></td>
<td><?php echo (defined('PLUS_PACKAGE_B_PRICE') ? PLUS_PACKAGE_B_PRICE : '4,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td>
</tr>
<tr>
<td><?php echo CONF_PLUS_PACKAGEGOLDC ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEGOLDC_TOOLTIP ?></span></em></td>
<td><?php echo (defined('PLUS_PACKAGE_C_GOLD') ? PLUS_PACKAGE_C_GOLD : 360); ?></td>
</tr>
<tr>
<td><?php echo CONF_PLUS_PACKAGEPRICEC ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEPRICEC_TOOLTIP ?></span></em></td>
<td><?php echo (defined('PLUS_PACKAGE_C_PRICE') ? PLUS_PACKAGE_C_PRICE : '9,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td>
</tr>
<tr>
<td><?php echo CONF_PLUS_PACKAGEGOLDD ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEGOLDD_TOOLTIP ?></span></em></td>
<td><?php echo (defined('PLUS_PACKAGE_D_GOLD') ? PLUS_PACKAGE_D_GOLD : 1000); ?></td>
</tr>
<tr>
<td><?php echo CONF_PLUS_PACKAGEPRICED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEPRICED_TOOLTIP ?></span></em></td>
<td><?php echo (defined('PLUS_PACKAGE_D_PRICE') ? PLUS_PACKAGE_D_PRICE : '19,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td>
</tr>
<tr>
<td><?php echo CONF_PLUS_PACKAGEGOLDE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEGOLDE_TOOLTIP ?></span></em></td>
<td><?php echo (defined('PLUS_PACKAGE_E_GOLD') ? PLUS_PACKAGE_E_GOLD : 2000); ?></td>
</tr>
<tr>
<td><?php echo CONF_PLUS_PACKAGEPRICEE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEPRICEE_TOOLTIP ?></span></em></td>
<td><?php echo (defined('PLUS_PACKAGE_E_PRICE') ? PLUS_PACKAGE_E_PRICE : '49,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td>
</tr>
<tr>
<td><?php echo CONF_PLUS_ACCDURATION ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_ACCDURATION_TOOLTIP ?></span></em></td>
<td><?php if(PLUS_TIME >= 86400){ echo ''.(PLUS_TIME/86400).' Days'; } else if(PLUS_TIME < 86400){ echo ''.(PLUS_TIME / 3600).' Hours'; } ?></td>
</tr>
<tr>
<td><?php echo CONF_PLUS_PRODUCTDURATION ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PRODUCTDURATION_TOOLTIP ?></span></em></td>
<td><?php if(PLUS_PRODUCTION >= 86400){ echo ''.(PLUS_PRODUCTION/86400).' Days'; } else if(PLUS_PRODUCTION < 86400){ echo ''.(PLUS_PRODUCTION/3600).' Hours'; } ?></td>
</tr>
</table>
<table id="member"> <!-- PLUS -->
<thead> <div class="config-card">
<tr> <div class="config-head"><span><?php echo PLUS_SETT ?></span><a href="admin.php?p=editPlusSet" title="<?php echo EDIT_PLUS_SETT1 ?>" class="edit-btn"><?php echo $editIcon; ?></a></div>
<th><?php echo LOG_SETT ?> <a href="admin.php?p=editLogSet"><img src="../img/admin/edit.gif" title="<?php echo EDIT_LOG_SETT ?>"></a></th> <table class="config-table">
</tr> <tr><td><?php echo CONF_PLUS_PAYPALEMAIL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PAYPALEMAIL_TOOLTIP ?></span></em></td><td><?php echo (defined('PAYPAL_EMAIL') ? PAYPAL_EMAIL : 'martin@martinambrus.com'); ?></td></tr>
</thead> <tr><td><?php echo CONF_PLUS_CURRENCY ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_CURRENCY_TOOLTIP ?></span></em></td><td><?php echo (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td></tr>
</table> <tr><td><?php echo CONF_PLUS_PACKAGEGOLDA ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEGOLDA_TOOLTIP ?></span></em></td><td><?php echo (defined('PLUS_PACKAGE_A_GOLD') ? PLUS_PACKAGE_A_GOLD : 60); ?></td></tr>
<tr><td><?php echo CONF_PLUS_PACKAGEPRICEA ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEPRICEA_TOOLTIP ?></span></em></td><td><?php echo (defined('PLUS_PACKAGE_A_PRICE') ? PLUS_PACKAGE_A_PRICE : '1,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td></tr>
<tr><td><?php echo CONF_PLUS_PACKAGEGOLDB ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEGOLDB_TOOLTIP ?></span></em></td><td><?php echo (defined('PLUS_PACKAGE_B_GOLD') ? PLUS_PACKAGE_B_GOLD : 120); ?></td></tr>
<tr><td><?php echo CONF_PLUS_PACKAGEPRICEB ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEPRICEB_TOOLTIP ?></span></em></td><td><?php echo (defined('PLUS_PACKAGE_B_PRICE') ? PLUS_PACKAGE_B_PRICE : '4,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td></tr>
<tr><td><?php echo CONF_PLUS_PACKAGEGOLDC ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEGOLDC_TOOLTIP ?></span></em></td><td><?php echo (defined('PLUS_PACKAGE_C_GOLD') ? PLUS_PACKAGE_C_GOLD : 360); ?></td></tr>
<tr><td><?php echo CONF_PLUS_PACKAGEPRICEC ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEPRICEC_TOOLTIP ?></span></em></td><td><?php echo (defined('PLUS_PACKAGE_C_PRICE') ? PLUS_PACKAGE_C_PRICE : '9,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td></tr>
<tr><td><?php echo CONF_PLUS_PACKAGEGOLDD ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEGOLDD_TOOLTIP ?></span></em></td><td><?php echo (defined('PLUS_PACKAGE_D_GOLD') ? PLUS_PACKAGE_D_GOLD : 1000); ?></td></tr>
<tr><td><?php echo CONF_PLUS_PACKAGEPRICED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEPRICED_TOOLTIP ?></span></em></td><td><?php echo (defined('PLUS_PACKAGE_D_PRICE') ? PLUS_PACKAGE_D_PRICE : '19,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td></tr>
<tr><td><?php echo CONF_PLUS_PACKAGEGOLDE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEGOLDE_TOOLTIP ?></span></em></td><td><?php echo (defined('PLUS_PACKAGE_E_GOLD') ? PLUS_PACKAGE_E_GOLD : 2000); ?></td></tr>
<tr><td><?php echo CONF_PLUS_PACKAGEPRICEE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEPRICEE_TOOLTIP ?></span></em></td><td><?php echo (defined('PLUS_PACKAGE_E_PRICE') ? PLUS_PACKAGE_E_PRICE : '49,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td></tr>
<tr><td><?php echo CONF_PLUS_ACCDURATION ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_ACCDURATION_TOOLTIP ?></span></em></td><td><?php echo PLUS_TIME >= 86400 ? (PLUS_TIME/86400).' Days' : (PLUS_TIME/3600).' Hours'; ?></td></tr>
<tr><td><?php echo CONF_PLUS_PRODUCTDURATION ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PRODUCTDURATION_TOOLTIP ?></span></em></td><td><?php echo PLUS_PRODUCTION >= 86400 ? (PLUS_PRODUCTION/86400).' Days' : (PLUS_PRODUCTION/3600).' Hours'; ?></td></tr>
</table>
</div>
<table id="profile"> <!-- LOG -->
<tr> <div class="config-card">
<td class="b"><?php echo SERV_VARIABLE ?></td> <div class="config-head"><span><?php echo LOG_SETT ?></span><a href="admin.php?p=editLogSet" title="<?php echo EDIT_LOG_SETT ?>" class="edit-btn"><?php echo $editIcon; ?></a></div>
<td class="b"><?php echo SERV_VALUE ?></td> <table class="config-table">
</tr> <tr><td class="b"><?php echo SERV_VARIABLE ?></td><td class="b"><?php echo SERV_VALUE ?></td></tr>
<tr> <tr><td><?php echo CONF_LOG_BUILD ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_BUILD_TOOLTIP ?></span></em></td><td><?php echo LOG_BUILD ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
<td><?php echo CONF_LOG_BUILD ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_BUILD_TOOLTIP ?></span></em></td> <tr><td><?php echo CONF_LOG_TECHNOLOGY ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_TECHNOLOGY_TOOLTIP ?></span></em></td><td><?php echo LOG_TECH ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
<td><?php if(LOG_BUILD) { echo "<b><font color='Green'>Enabled</font></b>"; } elseif(!LOG_BUILD){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td> <tr><td><?php echo CONF_LOG_LOGIN ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_LOGIN_TOOLTIP ?></span></em></td><td><?php echo LOG_LOGIN ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
</tr> <tr><td><?php echo CONF_LOG_GOLD ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_GOLD_TOOLTIP ?></span></em></td><td><?php echo LOG_GOLD_FIN ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
<tr> <tr><td><?php echo CONF_LOG_ADMIN ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_ADMIN_TOOLTIP ?></span></em></td><td><?php echo LOG_ADMIN ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
<td><?php echo CONF_LOG_TECHNOLOGY ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_TECHNOLOGY_TOOLTIP ?></span></em></td> <tr><td><?php echo CONF_LOG_WAR ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_WAR_TOOLTIP ?></span></em></td><td><?php echo LOG_WAR ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
<td><?php if(LOG_TECH) { echo "<b><font color='Green'>Enabled</font></b>"; } elseif(!LOG_TECH){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td> <tr><td><?php echo CONF_LOG_MARKET ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_MARKET_TOOLTIP ?></span></em></td><td><?php echo LOG_MARKET ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
</tr> <tr><td><?php echo CONF_LOG_ILLEGAL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_ILLEGAL_TOOLTIP ?></span></em></td><td><?php echo LOG_ILLEGAL ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
<tr> </table>
<td><?php echo CONF_LOG_LOGIN ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_LOGIN_TOOLTIP ?></span></em></td> </div>
<td><?php if(LOG_LOGIN) { echo "<b><font color='Green'>Enabled</font></b>"; } elseif(!LOG_LOGIN){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
</tr>
<tr>
<td><?php echo CONF_LOG_GOLD ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_GOLD_TOOLTIP ?></span></em></td>
<td><?php if(LOG_GOLD_FIN) { echo "<b><font color='Green'>Enabled</font></b>"; } elseif(!LOG_GOLD_FIN){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
</tr>
<tr>
<td><?php echo CONF_LOG_ADMIN ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_ADMIN_TOOLTIP ?></span></em></td>
<td><?php if(LOG_ADMIN) { echo "<b><font color='Green'>Enabled</font></b>"; } elseif(!LOG_ADMIN){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
</tr>
<tr>
<td><?php echo CONF_LOG_WAR ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_WAR_TOOLTIP ?></span></em></td>
<td><?php if(LOG_WAR) { echo "<b><font color='Green'>Enabled</font></b>"; } elseif(!LOG_WAR){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
</tr>
<tr>
<td><?php echo CONF_LOG_MARKET ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_MARKET_TOOLTIP ?></span></em></td>
<td><?php if(LOG_MARKET) { echo "<b><font color='Green'>Enabled</font></b>"; } elseif(!LOG_MARKET){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
</tr>
<tr>
<td><?php echo CONF_LOG_ILLEGAL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_ILLEGAL_TOOLTIP ?></span></em></td>
<td><?php if(LOG_ILLEGAL) { echo "<b><font color='Green'>Enabled</font></b>"; } elseif(!LOG_ILLEGAL){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
</tr>
</table>
<table id="member"> <!-- NEWSBOX -->
<thead> <div class="config-card">
<tr> <div class="config-head"><span><?php echo NEWSBOX_SETT ?></span><a href="admin.php?p=editNewsboxSet" title="<?php echo EDIT_NEWSBOX_SETT ?>" class="edit-btn"><?php echo $editIcon; ?></a></div>
<th><?php echo NEWSBOX_SETT ?> <a href="admin.php?p=editNewsboxSet"><img src="../img/admin/edit.gif" title="<?php echo EDIT_NEWSBOX_SETT ?>"></a></th> <table class="config-table">
</tr> <tr><td class="b"><?php echo SERV_VARIABLE ?></td><td class="b"><?php echo SERV_VALUE ?></td></tr>
</thead> <tr><td><?php echo EDIT_NEWSBOX1 ?> <em class="tooltip">?<span class="classic"><?php echo EDIT_NEWSBOX1_TOOLTIP ?></span></em></td><td><?php echo NEWSBOX1 ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
</table> <tr><td><?php echo EDIT_NEWSBOX2 ?> <em class="tooltip">?<span class="classic"><?php echo EDIT_NEWSBOX2_TOOLTIP ?></span></em></td><td><?php echo NEWSBOX2 ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
<tr><td><?php echo EDIT_NEWSBOX3 ?> <em class="tooltip">?<span class="classic"><?php echo EDIT_NEWSBOX3_TOOLTIP ?></span></em></td><td><?php echo NEWSBOX3 ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
</table>
</div>
<table id="profile"> <!-- SQL -->
<tr> <div class="config-card">
<td class="b"><?php echo SERV_VARIABLE ?></td> <div class="config-head"><span><?php echo SQL_SETTINGS ?></span></div>
<td class="b"><?php echo SERV_VALUE ?></td> <table class="config-table">
</tr> <tr><td class="b"><?php echo SERV_VARIABLE ?></td><td class="b"><?php echo SERV_VALUE ?></td></tr>
<tr> <tr><td><?php echo CONF_SQL_HOSTNAME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_HOSTNAME_TOOLTIP ?></span></em></td><td><?php echo SQL_SERVER;?></td></tr>
<td><?php echo EDIT_NEWSBOX1 ?> <em class="tooltip">?<span class="classic"><?php echo EDIT_NEWSBOX1_TOOLTIP ?></span></em></td> <tr><td><?php echo CONF_SQL_PORT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_PORT_TOOLTIP ?></span></em></td><td><?php echo SQL_PORT;?></td></tr>
<td><?php if(NEWSBOX1){ echo "<b><font color='Green'>Enabled</font></b>"; } elseif(!NEWSBOX1){ echo "<b><font color='Red'>Disabled</font></b>"; } ?> </td> <tr><td><?php echo CONF_SQL_DBUSER ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_DBUSER_TOOLTIP ?></span></em></td><td><?php echo SQL_USER;?></td></tr>
</tr> <tr><td><?php echo CONF_SQL_DBPASS ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_DBPASS_TOOLTIP ?></span></em></td><td>*********</td></tr>
<tr> <tr><td><?php echo CONF_SQL_DBNAME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_DBNAME_TOOLTIP ?></span></em></td><td><?php echo SQL_DB;?></td></tr>
<td><?php echo EDIT_NEWSBOX2 ?> <em class="tooltip">?<span class="classic"><?php echo EDIT_NEWSBOX2_TOOLTIP ?></span></em></td> <tr><td><?php echo CONF_SQL_TBPREFIX ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_TBPREFIX_TOOLTIP ?></span></em></td><td><?php echo TB_PREFIX;?></td></tr>
<td><?php if(NEWSBOX2){ echo "<b><font color='Green'>Enabled</font></b>"; } elseif(!NEWSBOX2){ echo "<b><font color='Red'>Disabled</font></b>"; } ?> </td> <tr><td><?php echo CONF_SQL_DBTYPE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_DBTYPE_TOOLTIP ?></span></em></td><td><?php echo DB_TYPE == 0 ? "MYSQL" : "MYSQLi"; ?></td></tr>
</tr> </table>
<tr> </div>
<td><?php echo EDIT_NEWSBOX3 ?> <em class="tooltip">?<span class="classic"><?php echo EDIT_NEWSBOX3_TOOLTIP ?></span></em></td>
<td><?php if(NEWSBOX3){ echo "<b><font color='Green'>Enabled</font></b>"; } elseif(!NEWSBOX3){ echo "<b><font color='Red'>Disabled</font></b>"; } ?> </td>
</tr>
</table>
<table id="member"> <!-- EXTRA -->
<thead> <div class="config-card">
<tr> <div class="config-head"><span><?php echo EXTRA_SETT ?></span><a href="admin.php?p=editExtraSet" title="<?php echo EDIT_EXTRA_SETT ?>" class="edit-btn"><?php echo $editIcon; ?></a></div>
<th><?php echo SQL_SETTINGS ?></th> <table class="config-table">
</tr> <tr><td class="b"><?php echo SERV_VARIABLE ?></td><td class="b"><?php echo SERV_VALUE ?></td></tr>
</thead> <tr><td><?php echo CONF_EXTRA_LIMITMAIL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_EXTRA_LIMITMAIL_TOOLTIP ?></span></em></td><td><?php echo LIMIT_MAILBOX ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
</table> <tr><td><?php echo CONF_EXTRA_MAXMAIL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_EXTRA_MAXMAIL_TOOLTIP ?></span></em></td><td><?php echo LIMIT_MAILBOX ? MAX_MAIL : "<span class='badge gray'>Limit mailbox disabled</span>"; ?></td></tr>
</table>
</div>
<table id="profile"> <!-- ADMIN INFO -->
<tr> <div class="config-card">
<td class="b"><?php echo SERV_VARIABLE ?></td> <div class="config-head"><span><?php echo ADMIN_INFO ?></span><a href="admin.php?p=editAdminInfo" title="<?php echo EDIT_ADMIN_INFO ?>" class="edit-btn"><?php echo $editIcon; ?></a></div>
<td class="b"><?php echo SERV_VALUE ?></td> <table class="config-table">
</tr> <tr><td class="b"><?php echo SERV_VARIABLE ?></td><td class="b"><?php echo SERV_VALUE ?></td></tr>
<tr> <tr><td><?php echo CONF_ADMIN_NAME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_ADMIN_NAME_TOOLTIP ?></span></em></td><td><?php echo empty(ADMIN_NAME) ? "<span class='badge red'>No admin name defined!</span>" : ADMIN_NAME; ?></td></tr>
<td><?php echo CONF_SQL_HOSTNAME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_HOSTNAME_TOOLTIP ?></span></em></td> <tr><td><?php echo CONF_ADMIN_EMAIL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_ADMIN_EMAIL_TOOLTIP ?></span></em></td><td><?php echo empty(ADMIN_EMAIL) ? "<span class='badge red'>No admin email defined!</span>" : ADMIN_EMAIL; ?></td></tr>
<td><?php echo SQL_SERVER;?></td> <tr><td><?php echo CONF_ADMIN_SHOWSTATS ?> <em class="tooltip">?<span class="classic"><?php echo CONF_ADMIN_SHOWSTATS_TOOLTIP ?></span></em></td><td><?php echo INCLUDE_ADMIN ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
</tr> <tr><td><?php echo CONF_ADMIN_SUPPMESS ?> <em class="tooltip">?<span class="classic"><?php echo CONF_ADMIN_SUPPMESS_TOOLTIP ?></span></em></td><td><?php echo ADMIN_RECEIVE_SUPPORT_MESSAGES ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
<tr> <tr><td><?php echo CONF_ADMIN_RAIDATT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_ADMIN_RAIDATT_TOOLTIP ?></span></em></td><td><?php echo ADMIN_ALLOW_INCOMING_RAIDS ? "<span class='badge green'>Yes</span>" : "<span class='badge red'>No</span>"; ?></td></tr>
<td><?php echo CONF_SQL_PORT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_PORT_TOOLTIP ?></span></em></td> </table>
<td><?php echo SQL_PORT;?></td> </div>
</tr>
<tr>
<td><?php echo CONF_SQL_DBUSER ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_DBUSER_TOOLTIP ?></span></em></td>
<td><?php echo SQL_USER;?></td>
</tr>
<tr>
<td><?php echo CONF_SQL_DBPASS ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_DBPASS_TOOLTIP ?></span></em></td>
<td>*********</td>
</tr>
<tr>
<td><?php echo CONF_SQL_DBNAME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_DBNAME_TOOLTIP ?></span></em></td>
<td><?php echo SQL_DB;?></td>
</tr>
<tr>
<td><?php echo CONF_SQL_TBPREFIX ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_TBPREFIX_TOOLTIP ?></span></em></td>
<td><?php echo TB_PREFIX;?></td>
</tr>
<tr>
<td><?php echo CONF_SQL_DBTYPE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_DBTYPE_TOOLTIP ?></span></em></td>
<td><?php if(DB_TYPE == 0) { echo "MYSQL"; } else if(DB_TYPE == 1) { echo "MYSQLi"; } ?></td>
</tr>
</table>
<table id="member">
<thead>
<tr>
<th><?php echo EXTRA_SETT ?> <a href="admin.php?p=editExtraSet"><img src="../img/admin/edit.gif" title="<?php echo EDIT_EXTRA_SETT ?>"></a></th>
</tr>
</thead>
</table>
<table id="profile">
<tr>
<td class="b"><?php echo SERV_VARIABLE ?></td>
<td class="b"><?php echo SERV_VALUE ?></td>
</tr>
<tr>
<td><?php echo CONF_EXTRA_LIMITMAIL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_EXTRA_LIMITMAIL_TOOLTIP ?></span></em></td>
<td><?php if(LIMIT_MAILBOX){ echo "<b><font color='Green'>Enabled</font></b>"; } else if(LIMIT_MAILBOX == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
</tr>
<tr>
<td><?php echo CONF_EXTRA_MAXMAIL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_EXTRA_MAXMAIL_TOOLTIP ?></span></em></td>
<td><?php if(LIMIT_MAILBOX){ echo MAX_MAIL; } else if(LIMIT_MAILBOX == false){ echo "<font color='Gray'>Limit mailbox disabled</font>"; } ?></td>
</tr>
</table>
<table id="member">
<thead>
<tr>
<th><?php echo ADMIN_INFO ?> <a href="admin.php?p=editAdminInfo"><img src="../img/admin/edit.gif" title="<?php echo EDIT_ADMIN_INFO ?>"></a></th>
</tr>
</thead>
</table>
<table id="profile">
<tr>
<td class="b"><?php echo SERV_VARIABLE ?></td>
<td class="b"><?php echo SERV_VALUE ?></td>
</tr>
<tr>
<td><?php echo CONF_ADMIN_NAME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_ADMIN_NAME_TOOLTIP ?></span></em></td>
<td><?php if(empty(ADMIN_NAME)){ echo "<b><font color='Red'>No admin name defined!</b></font>"; } else if(ADMIN_NAME != ''){ echo ADMIN_NAME; } ?></td>
</tr>
<tr>
<td><?php echo CONF_ADMIN_EMAIL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_ADMIN_EMAIL_TOOLTIP ?></span></em></td>
<td><?php if(empty(ADMIN_EMAIL)){ echo "<b><font color='Red'>No admin email defined!</b></font>"; } else if(ADMIN_EMAIL != ''){ echo ADMIN_EMAIL; } ?></td>
</tr>
<tr>
<td><?php echo CONF_ADMIN_SHOWSTATS ?> <em class="tooltip">?<span class="classic"><?php echo CONF_ADMIN_SHOWSTATS_TOOLTIP ?></span></em></td>
<td><?php if(INCLUDE_ADMIN){ echo "<b><font color='Green'>Enabled</font></b>"; } else if(INCLUDE_ADMIN == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
</tr>
<tr>
<td><?php echo CONF_ADMIN_SUPPMESS ?> <em class="tooltip">?<span class="classic"><?php echo CONF_ADMIN_SUPPMESS_TOOLTIP ?></span></em></td>
<td><?php if(ADMIN_RECEIVE_SUPPORT_MESSAGES){ echo "<b><font color='Green'>Enabled</font></b>"; } else if(ADMIN_RECEIVE_SUPPORT_MESSAGES == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
</tr>
<tr>
<td><?php echo CONF_ADMIN_RAIDATT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_ADMIN_RAIDATT_TOOLTIP ?></span></em></td>
<td><?php if(ADMIN_ALLOW_INCOMING_RAIDS){ echo "<b><font color='Green'>Yes</font></b>"; } else if(ADMIN_ALLOW_INCOMING_RAIDS == false){ echo "<b><font color='Red'>No</font></b>"; } ?></td>
</tr>
</table>
</div>
<?php <?php
function define_array($array, $keys = null){ function define_array($array, $keys = null){
foreach($array as $key => $value){ foreach($array as $key => $value){
@@ -502,5 +218,4 @@ function define_array($array, $keys = null){
else define($keyname, $value); else define($keyname, $value);
} }
} }
//define_array($array); ?>
?>
+14 -5
View File
@@ -2,11 +2,20 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename delallymedal.php ## ## Filename : delallymedal.tpl ##
## Developed by: Dzoki ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## Improved: aggenkeech ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!"); if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
+105 -81
View File
@@ -2,87 +2,111 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename deletion.tpl ## ## Filename : deletion.tpl ##
## Developed by: Dzoki ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
include_once("../GameEngine/Ranking.php"); include_once("../GameEngine/Ranking.php");
if($_GET['uid']) if($_GET['uid']) {
{ $uid = (int)$_GET['uid'];
$varray = $database->getProfileVillages($_GET['uid']); $varray = $database->getProfileVillages($uid);
if($user) if($user) {
{ $totalpop = 0;
$totalpop = 0; foreach($varray as $vil) { $totalpop += $vil['pop']; }
foreach($varray as $vil) $ranking->procRankArray();
{ $rank = $ranking->getUserRank($user['id']);
$totalpop += $vil['pop']; $villages = mysqli_fetch_array(mysqli_query($GLOBALS["link"], "SELECT COUNT(*) as Total FROM ".TB_PREFIX."vdata WHERE owner = $uid"), MYSQLI_ASSOC)['Total'];
} ?>
<style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
<form action="" method="post">
<input type="hidden" name="action" value="DelPlayer">
<input type="hidden" name="uid" value="<?php echo $user['id'];?>">
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
<table id="member">
<thead>
<tr>
<th colspan="4">Delete player</th>
</tr>
</thead>
<tbody>
<tr>
<td>Name:</td>
<td><a href="?p=player&uid=<?php echo $user['id'];?>"><?php echo $user['username'];?></a></td>
<td>Gold:</td>
<td><?php echo $user['gold'];?></td>
</tr>
<tr>
<td>Rank:</td>
<td><?php $ranking->procRankArray();echo $ranking->getUserRank($user['id']); ?></td>
<td>Population:</td>
<td><?php echo $totalpop;?></td>
</tr>
<tr>
<td>Villages:</td>
<td>
<?php
$result = mysqli_query($GLOBALS["link"], "SELECT Count(*) as Total FROM ".TB_PREFIX."vdata WHERE owner = ".(int) $user['id']."");
$num_rows = mysqli_fetch_array($result, MYSQLI_ASSOC)['Total'];
echo $num_rows;
?>
</td>
<td><b><font color='#71D000'>P</font><font color='#FF6F0F'>l</font><font color='#71D000'>u</font><font color='#FF6F0F'>s</font></b>:</td>
<td>
<?php
$plus = date('d.m.Y H:i',$user['plus']);
echo $plus;
?>
</td>
</tr>
<tr>
<td>Alliance:</td>
<td><?php echo $database->getAllianceName($user['alliance']);?></td>
<td>Status:</td>
<td>-</td>
</tr>
<tr>
<td colspan="4" class="empty"></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="pass"></td>
<td colspan="2"><input type="submit" class="c5" value="Delete player"></td>
</tr>
</tbody>
</table>
</form><?php
}
}
else
{
include("404.tpl");
}
?> ?>
<style>
.del-wrap{max-width:650px;margin:0 auto;font-family:Verdana,Arial;}
.del-head{background:linear-gradient(135deg,#dc2626,#991b1b);color:#fff;border-radius:6px;padding:18px 20px;margin-bottom:14px;text-align:center;}
.del-head .icon{font-size:36px;margin-bottom:6px;}
.del-head h2{margin:0;font-size:20px;}
.del-head .warn{font-size:12px;opacity:.9;margin-top:4px;}
.card{background:#fff;border:2px solid #fecaca;border-radius:6px;box-shadow:0 2px 8px rgba(220,38,38,.15);overflow:hidden;}
.card h3{margin:0;padding:10px 14px;background:#fef2f2;border-bottom:1px solid #fecaca;font-size:13px;text-transform:uppercase;color:#991b1b;}
.player-info{display:grid;grid-template-columns:1fr 1fr;gap:0;border-bottom:1px solid #fee2e2;}
.info-item{padding:12px 14px;border-right:1px solid #fee2e2;border-bottom:1px solid #fee2e2;font-size:13px;}
.info-item:nth-child(2n){border-right:none;}
.info-item b{color:#6b7280;font-weight:normal;display:block;font-size:11px;text-transform:uppercase;margin-bottom:2px;}
.info-item .val{font-weight:600;color:#1f2937;}
.info-item .val a{color:#dc2626;text-decoration:none;}
.info-item .val a:hover{text-decoration:underline;}
.danger-box{background:#fff1f2;border:1px solid #fca5a5;border-radius:5px;padding:12px;margin:14px;font-size:12px;color:#7f1d1d;display:flex;gap:10px;align-items:flex-start;}
.danger-box .icon{font-size:20px;flex-shrink:0;}
.confirm-area{padding:0 14px 16px;text-align:center;}
.confirm-area label{display:block;font-size:12px;font-weight:600;color:#374151;margin-bottom:6px;}
.confirm-area input[type=password]{width:240px;max-width:100%;padding:9px;border:2px solid #fca5a5;border-radius:5px;font-size:14px;text-align:center;}
.confirm-area input[type=password]:focus{outline:none;border-color:#dc2626;box-shadow:0 0 0 3px rgba(220,38,38,.2);}
.actions{display:flex;justify-content:space-between;align-items:center;padding:14px;background:#fef2f2;border-top:1px solid #fecaca;}
.btn-cancel{background:#fff;border:1px solid #d1d5db;color:#374151;padding:9px 18px;border-radius:5px;font-size:13px;font-weight:600;text-decoration:none;}
.btn-cancel:hover{background:#f9fafb;}
.btn-delete{background:linear-gradient(#dc2626,#b91c1c);border:1px solid #7f1d1d;color:#fff;padding:9px 22px;border-radius:5px;font-size:13px;font-weight:700;cursor:pointer;box-shadow:0 1px 3px rgba(0,0,0,.2);}
.btn-delete:hover{filter:brightness(1.1);}
</style>
<div class="del-wrap">
<div class="del-head">
<div class="icon"></div>
<h2>DELETE PLAYER PERMANENTLY</h2>
<div class="warn">This action cannot be undone!</div>
</div>
<form action="" method="post" onsubmit="return confirm('ESTI SIGUR? Se va sterge tot: sate, trupe, rapoarte!')">
<input type="hidden" name="action" value="DelPlayer">
<input type="hidden" name="uid" value="<?php echo $user['id'];?>">
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
<div class="card">
<h3>🗑 Player to delete</h3>
<div class="player-info">
<div class="info-item"><b>Name</b><div class="val"><a href="?p=player&uid=<?php echo $user['id'];?>"><?php echo htmlspecialchars($user['username']);?></a></div></div>
<div class="info-item"><b>Gold</b><div class="val"><?php echo $user['gold'];?> <img src="../img/x.gif" class="gold" style="vertical-align:-2px;"></div></div>
<div class="info-item"><b>Rank</b><div class="val">#<?php echo $rank; ?></div></div>
<div class="info-item"><b>Population</b><div class="val"><?php echo number_format($totalpop);?></div></div>
<div class="info-item"><b>Villages</b><div class="val"><?php echo $villages;?></div></div>
<div class="info-item"><b>Plus ends</b><div class="val"><?php echo date('d.m.Y H:i',$user['plus']);?></div></div>
<div class="info-item" style="grid-column:1/-1;border-bottom:none;"><b>Alliance</b><div class="val"><?php echo $database->getAllianceName($user['alliance']) ?: '-';?></div></div>
</div>
<div class="danger-box">
<div class="icon">🚨</div>
<div><b>WARNING:</b> All villages (<?php echo $villages; ?>), troops, buildings, reports, messages and player statistics will be <u>permanently</u> deleted. There is no recovery!</div>
</div>
</div>
<div class="confirm-area">
<label for="pass">Confirm with your admin password:</label>
<input type="password" name="pass" id="pass" placeholder="••••••••" required autocomplete="current-password">
</div>
<div class="actions">
<a href="?p=player&uid=<?php echo $uid;?>" class="btn-cancel"> Cancel</a>
<button type="submit" class="btn-delete">🗑 DELETE PLAYER</button>
</div>
</div>
</form>
</div>
<?php
}
} else {
include("404.tpl");
}
?>
+14 -5
View File
@@ -2,11 +2,20 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename gold.php ## ## Filename : delmedal.tpl ##
## Developed by: Dzoki ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## Improved: aggenkeech ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!"); if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
+14 -5
View File
@@ -2,11 +2,20 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename editAccess.tpl ## ## Filename : editAccess.tpl ##
## Developed by: aggenkeech ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!"); if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
+160 -154
View File
@@ -2,160 +2,166 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename editAdditional.tpl ## ## Filename : editAdditional.tpl ##
## Developed by: ronix ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if (!isset($_SESSION)) { if (!isset($_SESSION)) { session_start(); }
session_start();
}
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!"); if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
$id = $_GET['uid']; $id = (int)$_GET['uid'];
$dur=$user['protect']-time(); $dur = $user['protect'] - time();
$protect=0; $protect = 0;
if($dur>43200) { if($dur > 43200) { $protect = intval($dur/86400) + 1; }
$protect=intval($dur/86400)+1;
} if(isset($id)) {
if(isset($id)) $sitter1 = $user['sit1'] ? $database->getUserArray($user['sit1'], 1) : null;
{ $sitter2 = $user['sit2'] ? $database->getUserArray($user['sit2'], 1) : null;
?>
<script LANGUAGE="JavaScript">
function go_url(url) {
location=url;
return(false);
}
</script>
<form action="../GameEngine/Admin/Mods/additional.php" method="POST">
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
<input type="hidden" name="id" value="<?php echo $id; ?>" />
<br />
<table id="profile" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th colspan="2">Edit Additional Info For: <a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo $user['username']; ?></a></th>
</tr>
</thead>
<tbody>
<tr>
<td>Change Access</td>
<td>
<?php if($id != $_SESSION['id']) { ?>
<select name="access" class="dropdown">
<option value="0" <?php if($user['access'] == 0) echo 'selected="selected"'; ?>>Banned</option>
<option value="2" <?php if($user['access'] == 2) echo 'selected="selected"'; ?>>Normal User</option>
<option value="8" <?php if($user['access'] == 8) echo 'selected="selected"'; ?>>Multihunter</option>
<option value="9" <?php if($user['access'] == 9) echo 'selected="selected"'; ?>>Admin</option>
</select>
<?php } else { ?>
<!-- nu permiți editarea propriului acces -->
<input type="hidden" name="access" value="<?php echo $user['access']; ?>">
<?php
$names = [0=>'Banned', 2=>'Normal User', 8=>'Multihunter', 9=>'Admin'];
echo '<b style="color:#c00;">'.$names[$user['access']].'</b> - You cannot change your own access.';
?>
<?php } ?>
</td>
</tr>
<tr>
<td>Edit Gold</td>
<td>
<input class="give_gold" name="gold" value="<?php echo $user['gold'];?>"> <img src="../img/admin/gold.gif">
</td>
</tr>
<tr>
<td>Sitter 1</td>
<td>
<input class="fm" name="sitter1" value="<?php echo $user['sit1']; ?>"><br />
<?php
$sitter1 = $database->getUserArray($user['sit1'], 1);
if($user['sit1'] ==0)
{
echo 'No Sitter';
}
else
{
echo '<a href="admin.php?p=player&uid='.$sitter1['id'].'">'.$sitter1['username'].'</a>';
}
?>
</td>
</tr>
<tr>
<td>Sitter 2</td>
<td>
<input class="fm" name="sitter2" value="<?php echo $user['sit2']; ?>"><br />
<?php
$sitter2 = $database->getUserArray($user['sit2'], 1);
if($user['sit2'] ==0)
{
echo 'No Sitter';
}
else
{
echo '<a href="admin.php?p=player&uid='.$sitter2['id'].'">'.$sitter2['username'].'</a>';
}
?>
</td>
</tr>
<tr>
<td>Give Protection For</td>
<td>
<input class="fm" name="protect" value="<?php echo $protect;?>" style="width: 60%;"> Days
</td>
</tr>
<tr>
<td>Edit Culture Points</td>
<td>
<input class="fm" name="cp" value="<?php echo round($user['cp'], 0); ?>" style="width: 60%;"> Points
</td>
</tr>
<tr>
<td>Edit Attack Points</td>
<td>
<input class="fm" name="off" value="<?php echo $user['ap']; ?>" style="width: 60%;"> Points
</td>
</tr>
<tr>
<td>Edit Defence Points</td>
<td>
<input class="fm" name="def" value="<?php echo $user['dp']; ?>" style="width: 60%;"> Points
</td>
</tr>
<tr>
<td>Edit Resources Raided</td>
<td>
<input class="fm" name="res" value="<?php echo $user['RR']; ?>" style="width: 60%;"> Points
</td>
</tr>
<tr>
<td>Total Attack Points</td>
<td>
<input class="fm" name="ooff" value="<?php echo $user['apall']; ?>" style="width: 60%;"> Points
</td>
</tr>
<tr>
<td>Total Defence Points</td>
<td>
<input class="fm" name="odef" value="<?php echo $user['dpall']; ?>" style="width: 60%;"> Points
</td>
</tr>
</tbody>
<thead>
<tr>
<td colspan="2">
<input style="float: right" name="save" type="image" id="btn_save" class="dynamic_img" src="img/x.gif" value="save" alt="save" />
<input style="float: left" name="back" type="image" id="btn_back" class="dynamic_img" src="img/x.gif" value="back" alt="back" onclick="return go_url('../Admin/admin.php?p=player&uid=<?php echo $_GET["uid"];?>')" />
</td>
</tr>
</thead>
</table>
</form>
<?php
}
else
{
include("404.tpl");
}
?> ?>
<style>
.editAdd-wrap{max-width:950px;margin:0 auto;font-family:Verdana,Arial;}
.editAdd-head{background:linear-gradient(#fff,#f3f3);border:1px solid #ccc;border-radius:5px;padding:12px 16px;margin-bottom:14px;display:flex;justify-content:space-between;align-items:center;}
.editAdd-head h2{margin:0;font-size:18px;color:#222;}
.editAdd-head h2 a{color:#71D000;text-decoration:none;}
.editAdd-head .uid{font-size:12px;color:#666;}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
@media(max-width:800px){.grid-2{grid-template-columns:1fr;}}
.card{background:#fff;border:1px solid #d4d4d4;border-radius:4px;overflow:hidden;margin-bottom:12px;box-shadow:0 1px 2px rgba(0,0,0,.04);}
.card h3{margin:0;padding:8px 12px;background:#f7f7f7;border-bottom:1px solid #e5e5e5;font-size:12px;text-transform:uppercase;color:#444;letter-spacing:.5px;}
.card .body{padding:14px;}
.form-row{display:flex;align-items:center;margin-bottom:12px;gap:10px;}
.form-row label{width:160px;font-size:12px;color:#333;font-weight:bold;}
.form-row .field{flex:1;}
.form-row input[type=text], .form-row input[type=number], .form-row select{
width:100%;box-sizing:border-box;padding:6px 8px;border:1px solid #bbb;border-radius:3px;font-size:13px;
}
.form-row input:focus, select:focus{border-color:#71D000;outline:none;box-shadow:0 0 3px rgba(113,208,0,.3);}
.input-icon{display:flex;align-items:center;gap:6px;}
.input-icon img{vertical-align:middle;}
.badge{display:inline-block;padding:2px 6px;border-radius:3px;font-size:11px;color:#fff;margin-left:6px;}
.badge.banned{background:#c00;} .badge.user{background:#666;} .badge.mh{background:#06a;} .badge.admin{background:#e67e00;}
.sitter-link{font-size:11px;margin-top:3px;display:block;}
.sitter-link a{color:#0066cc;text-decoration:none;}
.actions{display:flex;justify-content:space-between;margin-top:16px;padding-top:12px;border-top:1px solid #eee;}
.btn{padding:8px 18px;border-radius:4px;font-size:13px;font-weight:bold;cursor:pointer;border:1px solid;text-decoration:none;display:inline-block;}
.btn-save{background:linear-gradient(#7ed321,#5eae0f);border-color:#4a8a0c;color:#fff;}
.btn-back{background:#f0f0f0;border-color:#bbb;color:#333;}
.btn-save:hover{filter:brightness(1.05);}
</style>
<div class="editAdd-wrap">
<div class="editAdd-head">
<h2> Edit Additional: <a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo htmlspecialchars($user['username']); ?></a></h2>
<div class="uid">UID: <?php echo $id; ?> | Gold: <?php echo $user['gold']; ?> <img src="../img/admin/gold.gif" style="vertical-align:-2px;"></div>
</div>
<form action="../GameEngine/Admin/Mods/additional.php" method="POST">
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
<input type="hidden" name="id" value="<?php echo $id; ?>" />
<div class="grid-2">
<!-- LEFT: ACCOUNT CONTROL -->
<div class="card">
<h3>🔐 Account Control</h3>
<div class="body">
<div class="form-row">
<label>Access Level</label>
<div class="field">
<?php if($id != $_SESSION['id']) { ?>
<select name="access">
<option value="0" <?php if($user['access']==0)echo'selected'; ?>>0 - Banned</option>
<option value="2" <?php if($user['access']==2)echo'selected'; ?>>2 - Normal User</option>
<option value="8" <?php if($user['access']==8)echo'selected'; ?>>8 - Multihunter</option>
<option value="9" <?php if($user['access']==9)echo'selected'; ?>>9 - Admin</option>
</select>
<?php } else {
$names=[0=>'Banned',2=>'Normal',8=>'Multihunter',9=>'Admin'];
$cls=[0=>'banned',2=>'user',8=>'mh',9=>'admin'];
echo '<input type="hidden" name="access" value="'.$user['access'].'">';
echo '<span class="badge '.$cls[$user['access']].'">'.$names[$user['access']].'</span> <span style="font-size:11px;color:#c00;">(nu-ți poți schimba propriul acces)</span>';
} ?>
</div>
</div>
<div class="form-row">
<label>💰 Gold</label>
<div class="field input-icon">
<input type="number" name="gold" value="<?php echo (int)$user['gold']; ?>">
<img src="../img/admin/gold.gif" alt="gold">
</div>
</div>
<div class="form-row">
<label>🛡 Protection</label>
<div class="field input-icon">
<input type="number" name="protect" value="<?php echo $protect; ?>" min="0" max="30">
<span style="font-size:12px;color:#666;">zile</span>
</div>
</div>
</div>
</div>
<!-- RIGHT: SITTERS -->
<div class="card">
<h3>👥 Sitters</h3>
<div class="body">
<div class="form-row">
<label>Sitter 1 (UID)</label>
<div class="field">
<input type="number" name="sitter1" value="<?php echo (int)$user['sit1']; ?>">
<span class="sitter-link"><?php echo $sitter1 ? '→ <a href="admin.php?p=player&uid='.$sitter1['id'].'">'.htmlspecialchars($sitter1['username']).'</a>' : 'No Sitter'; ?></span>
</div>
</div>
<div class="form-row">
<label>Sitter 2 (UID)</label>
<div class="field">
<input type="number" name="sitter2" value="<?php echo (int)$user['sit2']; ?>">
<span class="sitter-link"><?php echo $sitter2 ? '→ <a href="admin.php?p=player&uid='.$sitter2['id'].'">'.htmlspecialchars($sitter2['username']).'</a>' : 'No Sitter'; ?></span>
</div>
</div>
</div>
</div>
</div>
<!-- STATISTICS -->
<div class="card">
<h3>📊 Statistics & Points</h3>
<div class="body">
<div class="grid-2">
<div class="form-row"><label>🏛 Culture Points</label><div class="field"><input type="number" name="cp" value="<?php echo round($user['cp']); ?>"></div></div>
<div class="form-row"><label> Attack Points</label><div class="field"><input type="number" name="off" value="<?php echo (int)$user['ap']; ?>"></div></div>
<div class="form-row"><label>🛡 Defence Points</label><div class="field"><input type="number" name="def" value="<?php echo (int)$user['dp']; ?>"></div></div>
<div class="form-row"><label>💎 Resources Raided</label><div class="field"><input type="number" name="res" value="<?php echo (int)$user['RR']; ?>"></div></div>
<div class="form-row"><label> Total Attack</label><div class="field"><input type="number" name="ooff" value="<?php echo (int)$user['apall']; ?>"></div></div>
<div class="form-row"><label>🛡 Total Defence</label><div class="field"><input type="number" name="odef" value="<?php echo (int)$user['dpall']; ?>"></div></div>
</div>
</div>
</div>
<div class="actions">
<a href="admin.php?p=player&uid=<?php echo $id; ?>" class="btn btn-back"> Back</a>
<button type="submit" name="save" class="btn btn-save">💾 Save Changes</button>
</div>
</form>
</div>
<?php
} else {
include("404.tpl");
}
?>
+14 -5
View File
@@ -2,11 +2,20 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename editAdminInfo.tpl ## ## Filename : editAdminInfo.tpl ##
## Developed by: ronix ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if (!isset($_SESSION)) { if (!isset($_SESSION)) {
session_start(); session_start();
+118
View File
@@ -0,0 +1,118 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : editAli.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
$aid = isset($_GET['aid']) ? (int)$_GET['aid'] : 0;
if($aid) {
$alidata = $database->getAlliance($aid);
$members = $database->getAllMember($aid);
if(!$alidata){ echo "<div style='padding:30px'>Alliance not found</div>"; return; }
// calculeaza max dupa ambasada ca fallback
$embLevel = 0;
$embQ = mysqli_query($GLOBALS["link"], "SELECT MAX(level) as lvl FROM ".TB_PREFIX."bdata b JOIN ".TB_PREFIX."vdata v ON v.wref=b.wid WHERE v.owner=".(int)$alidata['leader']." AND b.type=18");
if($r = mysqli_fetch_assoc($embQ)) $embLevel = (int)$r['lvl'];
$calcMax = max(3, $embLevel * 3);
?>
<style>
.editAli-wrap{max-width:900px;margin:0 auto;font-family:Verdana,Arial;}
.editAli-head{background:linear-gradient(#fff,#f2f2f2);border:1px solid #c9c9c9;border-radius:5px;padding:14px 16px;margin-bottom:12px;}
.editAli-head h2{margin:0;font-size:20px;color:#222;}
.editAli-head h2 span{color:#71D000;}
.card{background:#fff;border:1px solid #d5d5d5;border-radius:4px;margin-bottom:12px;overflow:hidden;}
.card h3{margin:0;padding:8px 12px;background:#f7f7f7;border-bottom:1px solid #e0e0e0;font-size:13px;text-transform:uppercase;color:#444;}
.card .body{padding:14px;}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
@media(max-width:700px){.form-grid{grid-template-columns:1fr;}}
.form-row{margin-bottom:12px;}
.form-row label{display:block;font-size:12px;font-weight:bold;color:#333;margin-bottom:4px;}
.form-row input[type=text], .form-row select, .form-row input[type=number]{
width:100%;box-sizing:border-box;padding:7px 8px;border:1px solid #bbb;border-radius:3px;font-size:13px;
}
.form-row input:focus, select:focus, textarea:focus{border-color:#71D000;outline:none;box-shadow:0 0 3px rgba(113,208,0,.3);}
textarea{width:100%;box-sizing:border-box;min-height:120px;padding:8px;border:1px solid #bbb;border-radius:3px;font-family:Verdana,Arial;font-size:12px;resize:vertical;}
.btn-save{background:linear-gradient(#7ed321,#5eae0f);border:1px solid #4a8a0c;color:#fff;padding:9px 26px;font-size:14px;font-weight:bold;border-radius:4px;cursor:pointer;}
.btn-save:hover{filter:brightness(1.05);}
.actions{text-align:center;margin-top:16px;}
.hint{font-size:11px;color:#777;margin-top:3px;}
</style>
<div class="editAli-wrap">
<div class="editAli-head">
<h2> Edit Alliance: <span><?php echo htmlspecialchars($alidata['tag']); ?></span> - <?php echo htmlspecialchars($alidata['name']); ?></h2>
</div>
<form action="../GameEngine/Admin/Mods/editAli.php" method="POST">
<input type="hidden" name="aid" value="<?php echo $aid; ?>">
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
<div class="card">
<h3> Basic Settings</h3>
<div class="body">
<div class="form-grid">
<div class="form-row">
<label>Alliance Tag (max 8)</label>
<input type="text" name="tag" maxlength="8" value="<?php echo htmlspecialchars($alidata['tag']); ?>" required>
</div>
<div class="form-row">
<label>Alliance Name</label>
<input type="text" name="name" maxlength="25" value="<?php echo htmlspecialchars($alidata['name']); ?>" required>
</div>
<div class="form-row">
<label>👑 Leader (Founder)</label>
<select name="leader">
<?php foreach($members as $m){
$sel = $m['id']==$alidata['leader'] ? 'selected' : '';
echo '<option value="'.$m['id'].'" '.$sel.'>'.htmlspecialchars($m['username']).'</option>';
} ?>
</select>
<div class="hint">Schimbă fondatorul alianței</div>
</div>
<div class="form-row">
<label>👥 Max Members</label>
<input type="number" name="max" min="3" max="60" value="<?php echo (int)($alidata['max'] ? $alidata['max'] : $calcMax); ?>">
<div class="hint">Calculat automat: <?php echo $calcMax; ?> (Ambasada lvl <?php echo $embLevel; ?> × 3)</div>
</div>
</div>
</div>
</div>
<div class="card">
<h3>📢 Alliance Notice (apare sus)</h3>
<div class="body">
<textarea name="notice" placeholder="Mesaj scurt pentru membri..."><?php echo htmlspecialchars($alidata['notice']); ?></textarea>
</div>
</div>
<div class="card">
<h3>📖 Alliance Description (pagina publică)</h3>
<div class="body">
<textarea name="desc" style="min-height:200px;" placeholder="Descriere lungă, BBCode permis..."><?php echo htmlspecialchars($alidata['desc']); ?></textarea>
</div>
</div>
<div class="actions">
<button type="submit" class="btn-save">💾 Save Alliance</button>
<a href="admin.php?p=alliance&aid=<?php echo $aid; ?>" style="margin-left:12px;color:#555;text-decoration:none;"> Cancel</a>
</div>
</form>
</div>
<?php
} // <- închide if($aid)
?>
+14 -5
View File
@@ -2,11 +2,20 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename editExtraSet.tpl ## ## Filename : editExtraSet.tpl ##
## Developed by: ronix ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if (!isset($_SESSION)) { if (!isset($_SESSION)) {
session_start(); session_start();
+154 -194
View File
@@ -2,210 +2,170 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename editHero.tpl ## ## Filename : editHero.tpl ##
## Developed by: ronix ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if(isset($_GET['uid'])){ if(isset($_GET['uid'])){
$id = (int) $_GET['uid']; $id = (int)$_GET['uid'];
$hid = (int) $_GET['hid']; $hid = (int)$_GET['hid'];
include_once("../GameEngine/Data/hero_full.php"); include_once("../GameEngine/Data/hero_full.php");
include_once("../GameEngine/Units.php"); include_once("../GameEngine/Units.php");
$heroes = $units->Hero($id,1); $heroes = $units->Hero($id,1);
foreach ($heroes as $hdata) { foreach ($heroes as $hdata) {
if ($hdata['heroid'] == $hid) { if ($hdata['heroid'] == $hid) { $hero = $hdata; break; }
$hero = $hdata; }
break;
}
}
$unarray = array(1=>U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U99,U0); $unarray = array(1=>U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U99,U0);
$utribe=($user['tribe']-1)*10; $utribe = ($user['tribe']-1)*10;
?> ?>
<style> <style>
td { .hero-wrap{max-width:1000px;margin:20px auto;font-family:Verdana,Arial;}
vertical-align:middle; padding:2px 7px; border:1px solid silver; font-size:13px; color:black; .hero-head{background:linear-gradient(#2c3e50,#1a2530);color:#fff;border-radius:6px;padding:16px 20px;margin-bottom:14px;display:flex;align-items:center;justify-content:space-between;}
} .hero-head.left{display:flex;align-items:center;gap:12px;}
th { .hero-head.avatar{width:48px;height:48px;border-radius:50%;background:#fff2;display:flex;align-items:center;justify-content:center;font-size:24px;}
vertical-align:middle; padding:2px 7px; border:1px solid silver; font-size:13px; color:black; .hero-head h2{margin:0;font-size:20px;}
} .hero-head.lvl{background:#71D000;color:#000;padding:3px 8px;border-radius:12px;font-size:12px;font-weight:bold;margin-left:8px;}
.thead {
background-image:url(../img/un/a/c2.gif); background-repeat:repeat; text-align:center; font-weight:bold; .grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
} @media(max-width:850px){.grid-2{grid-template-columns:1fr;}}
.card{background:#fff;border:1px solid #d8d8d8;border-radius:6px;overflow:hidden;box-shadow:0 2px 4px rgba(0,0,0,.05);}
.card h3{margin:0;padding:10px 14px;background:#f5f7fa;border-bottom:1px solid #e5e7eb;font-size:13px;text-transform:uppercase;color:#374151;letter-spacing:.5px;}
.card.body{padding:14px;}
.form-row{display:flex;align-items:center;margin-bottom:12px;gap:10px;}
.form-row label{width:130px;font-size:12px;color:#374151;font-weight:600;}
.form-row.field{flex:1;}
.form-row input[type=text],.form-row select{width:100%;padding:7px 9px;border:1px solid #cbd5e1;border-radius:4px;font-size:13px;}
.form-row input:focus, select:focus{border-color:#71D000;outline:none;box-shadow:0 0 0 2px rgba(113,208,0,.2);}
.stat-table{width:100%;border-collapse:separate;border-spacing:0 6px;}
.stat-table th{background:#f9fafb;padding:8px;font-size:11px;text-transform:uppercase;color:#6b7280;text-align:left;border-bottom:1px solid #e5e7eb;}
.stat-table td{background:#fff;padding:10px;border-top:1px solid #f1f5f9;border-bottom:1px solid #f1f5f9;vertical-align:middle;}
.stat-table td:first-child{border-left:1px solid #f1f5f9;border-radius:6px 0 0 6px;font-weight:600;color:#1f2937;}
.stat-table td:last-child{border-right:1px solid #f1f5f9;border-radius:0 6px 6px 0;text-align:center;}
.ctrl{display:flex;align-items:center;justify-content:center;gap:8px;}
.btn-step{width:28px;height:28px;border-radius:50%;border:1px solid #d1d5db;background:#fff;cursor:pointer;font-weight:bold;font-size:16px;line-height:1;display:flex;align-items:center;justify-content:center;transition:.15s;}
.btn-step:hover{background:#71D000;color:#fff;border-color:#71D000;}
.btn-step:disabled{opacity:.4;cursor:not-allowed;}
.val-box{min-width:36px;text-align:center;font-weight:bold;font-size:15px;color:#111;}
.unit-preview{display:flex;align-items:center;gap:8px;padding:6px 10px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:4px;}
.actions{display:flex;justify-content:space-between;margin-top:18px;}
.btn{padding:9px 20px;border-radius:5px;font-size:13px;font-weight:600;cursor:pointer;border:1px solid;text-decoration:none;}
.btn-save{background:linear-gradient(#22c55e,#16a34a);border-color:#15803d;color:#fff;}
.btn-back{background:#f3f4f6;border-color:#d1d5db;color:#374151;}
</style> </style>
<script LANGUAGE="JavaScript"> <script>
function changeValue(u,c) { function changeValue(u,c) {
var objv=document.getElementById(c); var objv=document.getElementById(c);
var objd=document.getElementById(c+'2'); var objd=document.getElementById(c+'2');
var obje=document.getElementById('exp1'); var obje=document.getElementById('exp1');
n=objv.value; var n=parseInt(objv.value)||0;
l=document.frmHero.hlvl.value; var l=parseInt(document.frmHero.hlvl.value)||0;
e=document.frmHero.exp.value; var e=parseInt(document.frmHero.exp.value)||0;
if (u==0) { var v=n;
if (n<5){ if(u==0){ v = n<5?0:n-5; if(l>0 && n>=5) l--; else if(v==0 && l==0){ obje.innerHTML='5'; document.frmHero.exp.value='5'; } }
v=0; if(u==1){ v = n>95?100:n+5; if(e!=0){ obje.innerHTML='0'; document.frmHero.exp.value='0'; } else if(l<99) l++; }
}else{
v=n-5;
if (l>0){
l-=1;
}else if (v==0 && l==0) {
obje.innerHTML='5';
document.frmHero.exp.value='5';
}
}
} document.getElementById(c+'0').innerHTML = v>0? "<button type='button' class='btn-step' onclick=\"return changeValue(0,'"+c+"')\"></button>" : "<button type='button' class='btn-step' disabled></button>";
if (u==1) { document.getElementById(c+'1').innerHTML = v<99? "<button type='button' class='btn-step' onclick=\"return changeValue(1,'"+c+"')\">+</button>" : "<button type='button' class='btn-step' disabled>+</button>";
if (n>95){
v=100; document.getElementById("hlvl").innerHTML=l;
}else{ objd.innerHTML=v;
if(e!=0) { objv.value=v;
obje.innerHTML='0'; document.frmHero.hlvl.value=l;
document.frmHero.exp.value='0'; return false;
}else{
if (l<99) l++;
}
v=parseInt(n) + 5;
}
}
if (v>0) document.getElementById(c+'0').innerHTML="<a href=\"#\" onclick=\"return changeValue(0,'"+c+"')\">(-)</a>";
if (v<99) document.getElementById(c+'1').innerHTML="<a href=\"#\" onclick=\"return changeValue(1,'"+c+"')\">(+)</a>";
if (v<1) document.getElementById(c+'0').innerHTML="<font color=\"grey\">(-)</font>";
if (v>98) document.getElementById(c+'1').innerHTML="<font color=\"grey\">(+)</font>";
document.getElementById("hlvl").innerHTML=l;
objd.innerHTML=v;
objv.value=v;
document.frmHero.hlvl.value=l;
return(true);
} }
function go_url(url) { function check_unit(el){
location=url; var uname=el.options[el.selectedIndex].text;
return(false); document.getElementById("unt").innerHTML="<img class=\"unit u"+el.value+"\" src=\"img/x.gif\" alt=\""+uname+"\" title=\""+uname+"\" />";
}
function check_unit(el) {
var obj=el;
var uname=obj.options[obj.options.selectedIndex].text;
document.getElementById("unt").innerHTML=""+
"<span><img class=\"unit u"+obj.value+"\" src=\"img/x.gif\" alt=\""+uname+"\" title=\""+uname+"\" /></span>";
} }
function go_url(url){ location=url; return false; }
</script> </script>
<form name="frmHero" action="../GameEngine/Admin/Mods/editHero.php" method="POST">
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
<input type="hidden" name="id" value="<?php echo $id; ?>" />
<input type="hidden" name="hid" value="<?php echo $hid; ?>" />
<table style="border-collapse:collapse; margin-top:25px; line-height:16px; width:100%;">
<tr>
<td colspan="6" align="center"><b>Edit Player Hero</b></td>
</tr>
<tr class="thead"> <div class="hero-wrap">
<td width="30%">Details</td> <div class="hero-head">
<td width="35%" colspan="2">Old Value</td> <div class="left">
<td width="35%" colspan="3">New Value</td> <div class="avatar">🦸</div>
</tr> <div>
<tr> <h2><?php echo htmlspecialchars($hero['name']);?> <span class="lvl">Lv <?php echo $hero['level'];?></span></h2>
<td>Hero Name</td> <div style="font-size:12px;opacity:.8;">Player: <a href="admin.php?p=player&uid=<?php echo $id;?>" style="color:#9ae6b4;"><?php echo htmlspecialchars($user['username']);?></a></div>
<td colspan="2"><?php echo $hero['name'];?></td> </div>
<td colspan="3"><input name="hname" class="fm" value="<?php echo $hero['name'];?>"></td> </div>
</tr> <div><img class="unit u<?php echo $hero['unit'];?>" src="img/x.gif" alt=""></div>
<tr> </div>
<td>Hero Level</td>
<td colspan="2"><?php echo $hero['level']; ?></td> <form name="frmHero" action="../GameEngine/Admin/Mods/editHero.php" method="POST">
<td colspan="3" style="font-weight:bold"><div id="hlvl">0</div><input name="hlvl" type="hidden" value="0"</td> <input type="hidden" name="admid" value="<?php echo $_SESSION['id'];?>">
</tr> <input type="hidden" name="id" value="<?php echo $id;?>" />
<tr> <input type="hidden" name="hid" value="<?php echo $hid;?>" />
<td>Hero Unit</td> <input name="hlvl" type="hidden" value="0">
<td colspan="2"><?php echo "<img class=\"unit u".$hero['unit']."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($hero['unit'])."\" title=\"".$technology->getUnitName($hero['unit'])."\" /> (".$technology->getUnitName($hero['unit']); ?>)</td>
<td width="10%" align="center" style="border-right:none"><div id="unt"><?php echo "<img class=\"unit u".$hero['unit']."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($hero['unit'])."\" title=\"".$technology->getUnitName($hero['unit'])."\" />";?></div></td> <div class="grid-2">
<td width="25%" colspan="2" style="border-left:none" align="left"><select name="hunit" class="dropdown" onchange="check_unit(this)"> <div class="card">
<?php <h3>📝 Basic Info</h3>
for ($i=1;$i<7;$i++) { <div class="body">
if (($i==3 && $user['tribe']==4) || ($i==4 && $user['tribe']!=3)) { <div class="form-row"><label>Hero Name</label><div class="field"><input name="hname" type="text" value="<?php echo htmlspecialchars($hero['name']);?>"></div></div>
}else{ <div class="form-row"><label>Hero Unit</label><div class="field">
echo "<option value='".($utribe+$i)."'".($hero['unit'] == ($utribe+$i)? 'selected':'').">".$unarray[($utribe+$i)]."</option>\<br>"; <div class="unit-preview"><span id="unt"><img class="unit u<?php echo $hero['unit'];?>" src="img/x.gif"></span>
} <select name="hunit" onchange="check_unit(this)" style="flex:1;border:none;background:transparent;">
} <?php for($i=1;$i<7;$i++){ if(($i==3&&$user['tribe']==4)||($i==4&&$user['tribe']!=3))continue; $v=$utribe+$i; echo "<option value='$v'".($hero['unit']==$v?' selected':'').">".$unarray[$v]."</option>"; }?>
?> </select></div>
</select> </div></div>
</td> <div class="form-row"><label> Health</label><div class="field"><input name="hhealth" type="text" value="<?php echo round($hero['health']);?>" style="width:80px;"> %</div></div>
</tr> <div class="form-row"><label> Experience</label><div class="field"><b><span id="exp1">5</span>%</b> <input id="exp" name="exp" type="hidden" value="5"></div></div>
<tr class="thead"> </div>
<td>Items</td> </div>
<td width="18%">Point</td>
<td width="17%">Level</td> <div class="card">
<td colspan="3" width="35%">Level</td> <h3>📈 Current Stats</h3>
</tr> <div class="body" style="font-size:12px;line-height:1.8;">
<tr> <div>Level: <b><?php echo $hero['level'];?></b> | Points: <b><?php echo $hero['atk']+$hero['di']+$hero['dc'];?></b></div>
<td>Offence</td> <div>Offence: <b><?php echo $hero['atk'];?></b> (Lv <?php echo $hero['attack'];?>)</div>
<td align="center"><?php echo $hero['atk']; ?></td> <div>Defence: <b><?php echo $hero['di']."/".$hero['dc'];?></b> (Lv <?php echo $hero['defence'];?>)</div>
<td align="center"><?php echo $hero['attack'];?></td> <div>Off-Bonus: <b><?php echo ($hero['ob']-1)*100;?>%</b> | Def-Bonus: <b><?php echo ($hero['db']-1)*100;?>%</b></div>
<td width="10%" align="center" id="hatk0"><font color="grey">(-)</font></td> <div>Regen: <b><?php echo $hero['regeneration']*5*SPEED;?>/day</b></div>
<td width="10%" align="center" id="hatk1"><a href="#" onclick="return changeValue(1,'hatk')">(+)</a></td> </div>
<td width="15%" align="center" style="font-weight:bold"><div id="hatk2">0</div><input id="hatk" name="hatk" type="hidden" value="0"></td> </div>
</tr> </div>
<tr>
<td>Defence</td> <div class="card">
<td align="center"><?php echo $hero['di'] . "/" . $hero['dc']; ?></td> <h3> Add Points</h3>
<td align="center"><?php echo $hero['defence'];?></td> <div class="body">
<td align="center" id="hdef0"><font color="grey">(-)</font></td> <table class="stat-table">
<td align="center" id="hdef1"><a href="#" onclick="return changeValue(1,'hdef')">(+)</a></td> <thead><tr><th>Attribute</th><th style="width:80px;text-align:center;">Current</th><th style="width:120px;text-align:center;">Add</th><th style="width:60px;text-align:center;">New</th></tr></thead>
<td align="center" style="font-weight:bold"><div id="hdef2">0</div><input id="hdef" name="hdef" type="hidden" value="0"></td> <tbody>
</tr> <?php $attrs=[['hatk','Offence',$hero['attack']],['hdef','Defence',$hero['defence']],['hob','Off-Bonus',$hero['attackbonus']],['hdb','Def-Bonus',$hero['defencebonus']],['hrege','Regeneration',$hero['regeneration']]];
<tr> foreach($attrs as $a){ echo '<tr><td>'.$a[1].'</td><td style="text-align:center;">'.$a[2].'</td><td><div class="ctrl"><span id="'.$a[0].'0"><button type="button" class="btn-step" disabled></button></span><div class="val-box" id="'.$a[0].'2">0</div><span id="'.$a[0].'1"><button type="button" class="btn-step" onclick="return changeValue(1,\''.$a[0].'\')">+</button></span></div></td><td><input id="'.$a[0].'" name="'.$a[0].'" type="hidden" value="0"><span id="'.$a[0].'2v">0</span></td></tr>'; }?>
<td>Off-Bonus</td> </tbody>
<td align="center"><?php echo ($hero['ob']-1)*100; ?>%</td> </table>
<td align="center"><?php echo $hero['attackbonus'];?></td> <div style="text-align:center;margin-top:10px;font-size:12px;">Level nou: <b><span id="hlvl">0</span></b></div>
<td align="center" id="hob0"><font color="grey">(-)</font></td> </div>
<td align="center" id="hob1"><a href="#" onclick="return changeValue(1,'hob')">(+)</a></td> </div>
<td align="center" style="font-weight:bold"><div id="hob2">0</div><input id="hob" name="hob" type="hidden" value="0"></td>
</tr> <div class="actions">
<tr> <a href="admin.php?p=player&uid=<?php echo $id;?>" class="btn btn-back" onclick="return go_url(this.href)"> Back</a>
<td>Def-Bonus</td> <button type="submit" class="btn btn-save">💾 Save Hero</button>
<td align="center"><?php echo ($hero['db']-1)*100; ?>%</td> </div>
<td align="center"><?php echo $hero['defencebonus'];?></td> </form>
<td align="center" id="hdb0"><font color="grey">(-)</font></td> </div>
<td align="center" id="hdb1"><a href="#" onclick="return changeValue(1,'hdb')">(+)</a></td> <?php
<td align="center" style="font-weight:bold"><div id="hdb2">0</div><input id="hdb" name="hdb" type="hidden" value="0"></td> }
</tr> if(isset($_GET['e'])){ echo '<div style="text-align:center;color:red;margin-top:10px;"><b>Please fill hero name</b></div>'; }
<tr> ?>
<td>Regeneration</td>
<td align="center"><?php echo ($hero['regeneration']*5*SPEED); ?>/Day</font></td>
<td align="center"><?php echo $hero['regeneration'];?></td>
<td align="center" id="hrege0"><font color="grey">(-)</font></td>
<td align="center" id="hrege1"><a href="#" onclick="return changeValue(1,'hrege')">(+)</a></td>
<td align="center" style="font-weight:bold"><div id="hrege2">0</div><input id="hrege" name="hrege" type="hidden" value="0"></td>
<tr>
<?php
$count_level_exp=500-intval($hero['attack']+$hero['defence']+$hero['attackbonus']+$hero['defencebonus']+$hero['regeneration']);
if ($hero['points']>$count_level_exp) $hero['points']=$count_level_exp;
if($hero['experience'] < 495000){ ?>
<td>Experience</td>
<td colspan="2" align="center"><?php echo (int) (($hero['experience'] - $hero_levels[$hero['level']]) / ($hero_levels[$hero['level']+1] - $hero_levels[$hero['level']])*100) ?>% (
<?php echo $hero['points']; ?>)</td>
<?php }else{ ?>
<td>Experience</td>
<td colspan="2" align="center">100% (<?php echo $hero['points']; ?>)</td>
<?php } ?>
<td align="center" style="font-weight:bold" colspan="3"><div id="exp1">5</div><input id="exp" name="exp" type="hidden" value="5"></td>
</tr>
<tr>
<td>Health</td>
<td colspan="2" align="center"><?php echo round($hero['health']);?>%</td>
<td colspan="3" align="center"><input name="hhealth" class="fm fm40" maxlength="3" value="<?php echo round($hero['health']);?>">%</td>
</tr>
<tr class="thead">
<td style="border-right:none" align="left"><input name="back" type="image" id="btn_back" class="dynamic_img" src="img/x.gif" value="back" alt="back" onclick="return go_url('../Admin/admin.php?p=player&uid=<?php echo $_GET["uid"];?>')" /></td>
<td style="border-left:none" colspan="5" align="right"><input name="save" type="image" id="btn_save" class="dynamic_img" src="img/x.gif" value="save" alt="save" /></td>
</tr>
</table>
</form>
<?php
}
if(isset($_GET['e'])){
echo '<div align="center"><font color="Red"><b>Please fill hero name</font></b></div>';
}
?>
+14 -5
View File
@@ -2,11 +2,20 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename editLogSet.tpl ## ## Filename : editLogSet.tpl ##
## Developed by: ronix ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if (!isset($_SESSION)) { if (!isset($_SESSION)) {
session_start(); session_start();
+16 -5
View File
@@ -1,13 +1,24 @@
<?php <?php
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename editNewFunctions.tpl ## ## Filename : editNewFunctions.tpl ##
## Developed by: velhbxtyrj ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ## ## Developed by : velhbxtyrj (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if (!isset($_SESSION)) { if (!isset($_SESSION)) {
session_start(); session_start();
} }
+14 -5
View File
@@ -2,11 +2,20 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename editNewsboxSet.tpl ## ## Filename : editNewsboxSet.tpl ##
## Developed by: ronix ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if (!isset($_SESSION)) { if (!isset($_SESSION)) {
session_start(); session_start();
+95 -44
View File
@@ -2,51 +2,102 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename editOverall.tpl ## ## Filename : editOverall.tpl ##
## Developed by: aggenkeech ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
$id = (int)($_GET['uid'] ?? 0);
$uid = $id;
if($id){
?>
<style>
.over-wrap{max-width:700px;margin:0 auto;font-family:Verdana,Arial;}
.over-head{background:linear-gradient(135deg,#7c3aed,#5b21b6);color:#fff;border-radius:6px;padding:16px 20px;margin-bottom:14px;display:flex;align-items:center;gap:12px;}
.over-head .icon{font-size:28px;background:rgba(255,255,255,.15);width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;}
.over-head h2{margin:0;font-size:18px;}
.over-head h2 a{color:#fff;text-decoration:none;}
.over-head .sub{font-size:12px;opacity:.85;margin-top:2px;}
$id = $_GET['uid']; .card{background:#fff;border:1px solid #e5e7eb;border-radius:6px;box-shadow:0 1px 3px rgba(0,0,0,.05);overflow:hidden;}
$uid = $_GET['uid']; .card .body{padding:20px;}
if(isset($id)) .info{background:#f5f3ff;border:1px solid #ddd6fe;border-radius:5px;padding:10px 12px;font-size:12px;color:#5b21b6;margin-bottom:16px;}
{
?> .stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
<form action="../GameEngine/Admin/Mods/editOverall.php" method="POST"> @media(max-width:600px){.stats-grid{grid-template-columns:1fr;}}
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>"> .stat-box{border:1px solid #e2e8f0;border-radius:8px;padding:18px;text-align:center;background:#fafafa;transition:.2s;}
<input type="hidden" name="uid" value="<?php echo $uid; ?>" /> .stat-box:hover{transform:translateY(-2px);box-shadow:0 4px 8px rgba(0,0,0,.06);}
<input type="hidden" name="id" value="<?php echo $id; ?>" /> .stat-box.off{border-top:3px solid #dc2626;background:#fef2f2;}
<br /> .stat-box.def{border-top:3px solid #2563eb;background:#eff6ff;}
<table id="profile" cellpadding="0" cellspacing="0"> .stat-box .icon{font-size:32px;margin-bottom:8px;}
<thead> .stat-box .label{font-size:13px;font-weight:600;color:#475569;margin-bottom:4px;text-transform:uppercase;letter-spacing:.5px;}
<tr> .stat-box .current{font-size:11px;color:#64748b;margin-bottom:10px;}
<th colspan="2">Edit Overall Attack and Defence Points For: <a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo $user['username']; ?></a></th> .stat-box input{width:140px;padding:10px;border:1px solid #cbd5e1;border-radius:5px;font-size:18px;font-weight:bold;text-align:center;font-family:monospace;}
</tr> .stat-box input:focus{outline:none;box-shadow:0 0 0 3px rgba(124,58,237,.15);}
</thead> .stat-box.off input:focus{border-color:#dc2626;box-shadow:0 0 0 3px rgba(220,38,38,.15);}
<tbody> .stat-box.def input:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.15);}
<tr>
<td>Edit Attack Points</td> .actions{display:flex;justify-content:space-between;align-items:center;margin-top:20px;padding-top:14px;border-top:1px solid #e5e7eb;}
<td> .btn-back{background:#f3f4f6;border:1px solid #d1d5db;color:#16a34a;padding:9px 18px;border-radius:5px;font-size:13px;font-weight:600;text-decoration:none;display:inline-flex;align-items:center;gap:6px;}
<input class="fm" name="off" value="<?php echo $user['apall']; ?>" style="width: 60%;"> Points .btn-back:hover{background:#e5e7eb;}
</td> .btn-save{background:linear-gradient(#7c3aed,#5b21b6);border:1px solid #4c1d95;color:#fff;padding:9px 20px;border-radius:5px;font-size:13px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:6px;}
</tr> .btn-save:hover{filter:brightness(1.05);}
<tr> </style>
<td>Edit Defence Points</td>
<td> <div class="over-wrap">
<input class="fm" name="def" value="<?php echo $user['dpall']; ?>" style="width: 60%;"> Points <div class="over-head">
</td> <div class="icon"></div>
</tr> <div>
</tbody> <h2>Overall Points: <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo htmlspecialchars($user['username']);?></a></h2>
</table> <div class="sub">UID: <?php echo $uid; ?> Rank: #<?php echo (int)$user['rank']; ?></div>
<br /> </div>
<center><input type="image" value="submit" src="../img/admin/b/ok1.gif"></center> </div>
</form>
<?php <form action="../GameEngine/Admin/Mods/editOverall.php" method="POST">
} <input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
else <input type="hidden" name="uid" value="<?php echo $uid; ?>">
{ <input type="hidden" name="id" value="<?php echo $id; ?>">
include("404.tpl");
<div class="card">
<div class="body">
<div class="info">🛡 Acestea sunt punctele <b>totale</b> din statistici (nu cele săptămânale). Se adună din toate atacurile.</div>
<div class="stats-grid">
<div class="stat-box off">
<div class="icon"></div>
<div class="label">Attack Points</div>
<div class="current">Current: <?php echo number_format($user['apall']); ?></div>
<input type="number" name="off" value="<?php echo (int)$user['apall']; ?>" min="0" step="1">
</div>
<div class="stat-box def">
<div class="icon">🛡</div>
<div class="label">Defence Points</div>
<div class="current">Current: <?php echo number_format($user['dpall']); ?></div>
<input type="number" name="def" value="<?php echo (int)$user['dpall']; ?>" min="0" step="1">
</div>
</div>
</div>
</div>
<div class="actions">
<a href="admin.php?p=player&uid=<?php echo $uid;?>" class="btn-back"> Back</a>
<button type="submit" class="btn-save">💾 Save Points</button>
</div>
</form>
</div>
<?php
} else {
include("404.tpl");
} }
?> ?>
+104 -40
View File
@@ -1,45 +1,109 @@
<?php <?php
if(isset($_GET['uid']))
{
$user = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".(int) $_GET['uid']."")); ?>
<form action="../GameEngine/Admin/Mods/editPassword.php" method="POST">
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
<input type="hidden" name="uid" id="uid" value="<?php echo $_GET['uid']; ?>">
<table id="profile" cellpadding="1" cellspacing="1" > #################################################################################
<thead> ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
<tr> ## --------------------------------------------------------------------------- ##
<th colspan="2">Player <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo $user['username'];?></a></th> ## Filename : editPassword.tpl ##
</tr> ## Type : Admin Panel Frontend ##
<tr> ## --------------------------------------------------------------------------- ##
<td></td> ## Developed by : Dzoki (Original) ##
<td>New Password</td> ## Refactored by : Shadow ##
</tr> ## Redesign by : Shadow ##
</thead> ## --------------------------------------------------------------------------- ##
<tbody> ## Contact : cata7007@gmail.com ##
<tr> ## Project : TravianZ ##
<th>Password</th> ## GitHub : https://github.com/Shadowss/TravianZ ##
<td> ## --------------------------------------------------------------------------- ##
<input type="text" style="width: 80%;" class="fm" name="newpw" value="new password"> ## License : TravianZ Project ##
</td> ## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
</tr> ## --------------------------------------------------------------------------- ##
<tr> #################################################################################
<td></td>
<td></td> if(isset($_GET['uid'])) {
</tr> $uid = (int)$_GET['uid'];
<tr> $user = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT id, username, email FROM ".TB_PREFIX."users WHERE id = $uid"));
<td colspan="2"> if(!$user){ include("404.tpl"); return; }
<center> ?>
<input type="image" value="submit" src="../img/admin/b/ok1.gif" title="Edit Location"> <style>
</center> .pw-wrap{max-width:600px;margin:0 auto;font-family:Verdana,Arial;}
</td> .pw-head{background:linear-gradient(135deg,#dc2626,#991b1b);color:#fff;border-radius:6px;padding:16px 20px;margin-bottom:14px;display:flex;align-items:center;gap:12px;}
</tr> .pw-head .icon{font-size:28px;background:rgba(255,255,255,.15);width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;}
</tbody> .pw-head h2{margin:0;font-size:18px;}
</table> .pw-head h2 a{color:#fff;text-decoration:none;}
</form><?php .pw-head .sub{font-size:12px;opacity:.85;margin-top:2px;}
.card{background:#fff;border:1px solid #e5e7eb;border-radius:6px;box-shadow:0 1px 3px rgba(0,0,0,.05);overflow:hidden;}
.card .body{padding:20px;}
.warning{background:#fef2f2;border:1px solid #fecaca;border-radius:5px;padding:10px 12px;font-size:12px;color:#991b1b;margin-bottom:16px;display:flex;gap:8px;align-items:flex-start;}
.form-group{margin-bottom:16px;}
.form-group label{display:block;font-size:12px;font-weight:600;color:#374151;margin-bottom:6px;}
.input-wrap{position:relative;display:flex;align-items:center;}
.input-wrap input{width:100%;padding:10px 40px 10px 12px;border:1px solid #d1d5db;border-radius:5px;font-size:14px;font-family:monospace;box-sizing:border-box;}
.input-wrap input:focus{border-color:#dc2626;outline:none;box-shadow:0 0 0 3px rgba(220,38,38,.15);}
.toggle-eye{position:absolute;right:8px;background:none;border:none;cursor:pointer;font-size:18px;color:#6b7280;padding:4px;}
.btn-gen{background:#f3f4f6;border:1px solid #d1d5db;color:#374151;padding:6px 12px;border-radius:4px;font-size:12px;cursor:pointer;margin-top:6px;}
.btn-gen:hover{background:#e5e7eb;}
.actions{display:flex;justify-content:space-between;align-items:center;margin-top:20px;padding-top:14px;border-top:1px solid #e5e7eb;}
.btn-back{background:#f3f4f6;border:1px solid #d1d5db;color:#16a34a;padding:9px 18px;border-radius:5px;font-size:13px;font-weight:600;text-decoration:none;display:inline-flex;align-items:center;gap:6px;}
.btn-back:hover{background:#e5e7eb;}
.btn-save{background:linear-gradient(#dc2626,#b91c1c);border:1px solid #991b1b;color:#fff;padding:9px 20px;border-radius:5px;font-size:13px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:6px;box-shadow:0 1px 2px rgba(0,0,0,.1);}
.btn-save:hover{filter:brightness(1.05);}
</style>
<script>
function togglePw(){
const i = document.getElementById('newpw');
i.type = i.type === 'password' ? 'text' : 'password';
} }
else function genPw(){
{ const chars = 'ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz23456789!@#';
include("404.tpl"); let pw = '';
for(let i=0;i<12;i++) pw += chars.charAt(Math.floor(Math.random()*chars.length));
document.getElementById('newpw').value = pw;
document.getElementById('newpw').type = 'text';
}
</script>
<div class="pw-wrap">
<div class="pw-head">
<div class="icon">🔐</div>
<div>
<h2>Change Password: <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo htmlspecialchars($user['username']);?></a></h2>
<div class="sub">UID: <?php echo $uid; ?> <?php echo htmlspecialchars($user['email']); ?></div>
</div>
</div>
<form action="../GameEngine/Admin/Mods/editPassword.php" method="POST">
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
<input type="hidden" name="uid" value="<?php echo $uid; ?>">
<div class="card">
<div class="body">
<div class="warning">
<span></span>
<div><b>Atenție:</b> Parola se schimbă instant. Jucătorul va fi delogat. Nu se trimite email automat.</div>
</div>
<div class="form-group">
<label for="newpw">New Password</label>
<div class="input-wrap">
<input type="text" id="newpw" name="newpw" value="" placeholder="Introdu parola nouă" autocomplete="new-password" required>
<button type="button" class="toggle-eye" onclick="togglePw()" title="Show/Hide">👁</button>
</div>
<button type="button" class="btn-gen" onclick="genPw()">🎲 Generează parolă sigură</button>
</div>
</div>
</div>
<div class="actions">
<a href="admin.php?p=player&uid=<?php echo $uid;?>" class="btn-back"> Back</a>
<button type="submit" class="btn-save">🔐 Change Password</button>
</div>
</form>
</div>
<?php
} else {
include("404.tpl");
} }
?> ?>
+115 -83
View File
@@ -1,89 +1,121 @@
<?php <?php
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename editPlus.tpl ## ## Filename : editPlus.tpl ##
## Developed by: aggenkeech ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
$id = $_GET['uid']; $id = (int)($_GET['uid']?? 0);
$uid = $_GET['uid']; $uid = $id;
if(isset($id)) if($id){
{ ?>
?> <style>
<form action="../GameEngine/Admin/Mods/editPlus.php" method="POST"> .plus-wrap{max-width:900px;margin:0 auto;font-family:Verdana,Arial;}
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>"> .plus-head{background:linear-gradient(135deg,#f59e0b,#d97706);color:#fff;border-radius:6px;padding:16px 20px;margin-bottom:14px;display:flex;justify-content:space-between;align-items:center;}
<input type="hidden" name="uid" value="<?php echo $uid; ?>" /> .plus-head h2{margin:0;font-size:20px;}.plus-head h2 a{color:#fff;}
<input type="hidden" name="id" value="<?php echo $id; ?>" /> .card{background:#fff;border:1px solid #e5e7eb;border-radius:6px;margin-bottom:14px;box-shadow:0 1px 3px rgba(0,0,0,.05);}
<br> .card h3{margin:0;padding:10px 14px;background:#f9fafb;border-bottom:1px solid #e5e7eb;font-size:13px;text-transform:uppercase;color:#374151;}
<p>Adding the value in days it is delivered to the already existing value. In order to remove the bonus it is necessary to put a minus value.</p> .card.body{padding:14px;}
<br> .info-box{background:#fffbeb;border:1px solid #fde68a;border-radius:4px;padding:10px;font-size:12px;color:#92400e;margin-bottom:12px;}
<table id="profile">
<tbody> /* NOU: grid frumos pentru bonusuri active */
<td class="details"> .active-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;}
<table> .active-item{background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;padding:10px;text-align:center;}
<thead> .active-item.name{font-size:12px;font-weight:600;color:#334155;margin-bottom:4px;}
<tr> .active-item.time{font-size:13px;font-weight:bold;color:#0f172a;}
<th colspan="2">Plus and Resource Bonuses for: <a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo $user['username']; ?></a></th> .active-item.icon{font-size:20px;margin-bottom:4px;}
</tr> .active-item.plus{border-color:#fbbf24;background:#fffbeb;}
</thead> .active-item.wood{border-color:#16a34a;background:#f0fdf4;}
<tbody> .active-item.clay{border-color:#ea580c;background:#fff7ed;}
<?php include("playerplusbonus.tpl"); ?> .active-item.iron{border-color:#64748b;background:#f8fafc;}
<tbody> .active-item.crop{border-color:#eab308;background:#fefce8;}
</table> .active-item.none{opacity:.5;}
</td>
</tbody> .bonus-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;}
</table> .bonus-item{background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;padding:12px;text-align:center;transition:.2s;}
<br /> .bonus-item.icon{font-size:26px;}
<table id="profile" cellpadding="0" cellspacing="0"> .bonus-item input{width:70px;text-align:center;padding:5px;margin-top:6px;border:1px solid #cbd5e1;border-radius:4px;font-weight:bold;}
<thead> .bonus-item input:focus{border-color:#f59e0b;outline:none;box-shadow:0 0 0 2px rgba(245,158,11,.2);}
<tr>
<th colspan="2">Edit Plus & Bonus</th> /* BUTOANE CA LA HERO */
</tr> .actions{display:flex;justify-content:space-between;align-items:center;margin-top:18px;padding-top:14px;border-top:1px solid #e5e7eb;}
</thead> .btn-back{background:#f3f4f6;border:1px solid #d1d5db;color:#16a34a;padding:9px 18px;border-radius:5px;font-size:13px;font-weight:600;text-decoration:none;display:inline-flex;align-items:center;gap:6px;}
<tbody> .btn-back:hover{background:#e5e7eb;}
<tr> .btn-save{background:linear-gradient(#22c55e,#16a34a);border:1px solid #15803d;color:#fff;padding:9px 20px;border-radius:5px;font-size:13px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:6px;box-shadow:0 1px 2px rgba(0,0,0,.1);}
<td>Give Plus Bonus</td> .btn-save:hover{filter:brightness(1.05);}
<td> </style>
<input class="fm" name="plus" value="0" style="width: 60%;"> Days
</td> <div class="plus-wrap">
</tr> <div class="plus-head">
<tr> <h2> Plus & Bonuses: <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo htmlspecialchars($user['username']);?></a></h2>
<td>Give +25% Wood</td> <div>UID: <?php echo $uid;?></div>
<td> </div>
<input class="fm" name="wood" value="0" style="width: 60%;"> Days
</td> <form action="../GameEngine/Admin/Mods/editPlus.php" method="POST">
</tr> <input type="hidden" name="admid" value="<?php echo $_SESSION['id'];?>">
<tr> <input type="hidden" name="uid" value="<?php echo $uid;?>">
<td>Give +25% Clay</td> <input type="hidden" name="id" value="<?php echo $id;?>">
<td>
<input class="fm" name="clay" value="0" style="width: 60%;"> Days <div class="info-box"> The values add up. Put 5 to add 5 days.</div>
</td>
</tr> <div class="card">
<tr> <h3>📊 Current Active Bonuses</h3>
<td>Give +25% Iron</td> <div class="body">
<td> <div class="active-grid">
<input class="fm" name="iron" value="0" style="width: 60%;"> Days <?php
</td> // Citim datele direct din DB ca nu mai depindem de playerplusbonus.tpl urât
</tr> $p = $database->getUserField($uid, 'plus', 0);
<tr> $b = [
<td>Give +25% Crop</td> 'plus' => ['Plus','⭐',$p],
<td> 'b1' => ['Wood','🌲',$database->getUserField($uid,'b1',0)],
<input class="fm" name="crop" value="0" style="width: 60%;"> Days 'b2' => ['Clay','🧱',$database->getUserField($uid,'b2',0)],
</td> 'b3' => ['Iron','⛏️',$database->getUserField($uid,'b3',0)],
</tr> 'b4' => ['Crop','🌾',$database->getUserField($uid,'b4',0)],
</tbody> ];
</table> foreach($b as $k=>$v){
<br /> $end = (int)$v[2];
<center><input type="image" value="submit" src="../img/admin/b/ok1.gif"></center> $left = $end - time();
</form> $cls = strtolower($v[0]);
<?php if($left > 0){
} $d = floor($left/86400); $h = floor(($left%86400)/3600); $m = floor(($left%3600)/60);
else echo "<div class='active-item $cls'><div class='icon'>{$v[1]}</div><div class='name'>{$v[0]}</div><div class='time'>{$d}d {$h}h {$m}m</div></div>";
{ } else {
include("404.tpl"); echo "<div class='active-item $cls none'><div class='icon'>{$v[1]}</div><div class='name'>{$v[0]}</div><div class='time'>—</div></div>";
} }
?> }
?>
</div>
</div>
</div>
<div class="card">
<h3> Add / Remove Days</h3>
<div class="body">
<div class="bonus-grid">
<?php $items=['plus'=>['⭐','Travian Plus'],'wood'=>['🌲','+25% Wood'],'clay'=>['🧱','+25% Clay'],'iron'=>['⛏️','+25% Iron'],'crop'=>['🌾','+25% Crop']];
foreach($items as $k=>$v){ echo "<div class='bonus-item'><div class='icon'>{$v[0]}</div><div>{$v[1]}</div><input type='number' name='$k' value='0'><div style='font-size:11px;color:#666'>days</div></div>"; }?>
</div>
</div>
</div>
<div class="actions">
<a href="admin.php?p=player&uid=<?php echo $uid;?>" class="btn-back"> Back</a>
<button type="submit" class="btn-save">💾 Apply Bonuses</button>
</div>
</form>
</div>
<?php } else { include("404.tpl"); }?>
+16 -5
View File
@@ -1,13 +1,24 @@
<?php <?php
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename editPlusSet.tpl ## ## Filename : editPlusSet.tpl ##
## Developed by: martinambrus ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2017. All rights reserved. ## ## Developed by : martinambrus (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if (!isset($_SESSION)) { if (!isset($_SESSION)) {
session_start(); session_start();
} }
+107 -39
View File
@@ -2,46 +2,114 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename editProtection.tpl ## ## Filename : editProtection.tpl ##
## Developed by: aggenkeech ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : aggenkeech (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
$id = (int)($_GET['uid'] ?? 0);
$id = $_GET['uid']; $uid = $id;
$uid = $_GET['uid'];
$user = $database->getUserArray($id,1); $user = $database->getUserArray($id,1);
if(isset($id)) if($id && $user){
{ $now = time();
?> $prot = (int)$user['protect'];
<form action="../GameEngine/Admin/Mods/editProtection.php" method="POST"> $isActive = $prot > $now;
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>"> $ends = $isActive ? date('d.m.Y H:i', $prot) : 'Expired';
<input type="hidden" name="uid" value="<?php echo $uid; ?>" /> $left = $isActive ? ceil(($prot - $now)/86400) : 0;
<input type="hidden" name="id" value="<?php echo $id; ?>" /> ?>
<br /> <style>
<table id="profile" cellpadding="0" cellspacing="0"> .prot-wrap{max-width:550px;margin:0 auto;font-family:Verdana,Arial;}
<thead> .prot-head{background:linear-gradient(135deg,#0ea5e9,#0284c7);color:#fff;border-radius:6px;padding:16px 20px;margin-bottom:14px;display:flex;align-items:center;gap:12px;}
<tr> .prot-head .icon{font-size:28px;background:rgba(255,255,255,.15);width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;}
<th colspan="2">Edit Protection For: <a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo $user['username']; ?></a></th> .prot-head h2{margin:0;font-size:18px;}
</tr> .prot-head h2 a{color:#fff;text-decoration:none;}
</thead> .prot-head .sub{font-size:12px;opacity:.85;margin-top:2px;}
<tbody>
<tr> .card{background:#fff;border:1px solid #e5e7eb;border-radius:6px;box-shadow:0 1px 3px rgba(0,0,0,.05);overflow:hidden;}
<td>Give Protection For</td> .card .body{padding:20px;}
<td>
<input class="fm" name="protect" value="0" style="width: 60%;"> Days .status-box{text-align:center;padding:16px;border-radius:6px;margin-bottom:18px;border:1px solid;}
</td> .status-box.active{background:#ecfdf5;border-color:#a7f3d0;color:#065f46;}
</tr> .status-box.expired{background:#fef2f2;border-color:#fecaca;color:#991b1b;}
</tbody> .status-box .label{font-size:12px;text-transform:uppercase;font-weight:600;opacity:.8;}
</table> .status-box .date{font-size:18px;font-weight:bold;margin:4px 0;}
<br /> .status-box .left{font-size:12px;}
<center><input type="image" value="submit" src="../img/admin/b/ok1.gif"></center>
</form> .input-group{display:flex;align-items:center;justify-content:center;gap:10px;margin:18px 0;}
<?php .input-group input{width:100px;padding:10px;border:2px solid #cbd5e1;border-radius:5px;font-size:18px;font-weight:bold;text-align:center;}
} .input-group input:focus{outline:none;border-color:#0ea5e9;box-shadow:0 0 0 3px rgba(14,165,233,.2);}
else .input-group span{font-size:14px;color:#475569;font-weight:600;}
{
include("404.tpl"); .quick-btns{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-bottom:10px;}
.quick-btns button{background:#f1f5f9;border:1px solid #cbd5e1;padding:5px 10px;border-radius:4px;font-size:12px;cursor:pointer;}
.quick-btns button:hover{background:#e2e8f0;}
.info{background:#eff6ff;border:1px solid #bfdbfe;border-radius:5px;padding:10px;font-size:12px;color:#1e40af;text-align:center;}
.actions{display:flex;justify-content:space-between;align-items:center;margin-top:20px;padding-top:14px;border-top:1px solid #e5e7eb;}
.btn-back{background:#f3f4f6;border:1px solid #d1d5db;color:#16a34a;padding:9px 18px;border-radius:5px;font-size:13px;font-weight:600;text-decoration:none;}
.btn-save{background:linear-gradient(#0ea5e9,#0284c7);border:1px solid #0369a1;color:#fff;padding:9px 20px;border-radius:5px;font-size:13px;font-weight:600;cursor:pointer;}
</style>
<script>
function setDays(d){ document.getElementById('protect').value = d; }
</script>
<div class="prot-wrap">
<div class="prot-head">
<div class="icon">🛡</div>
<div>
<h2>Protection: <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo htmlspecialchars($user['username']);?></a></h2>
<div class="sub">UID: <?php echo $uid; ?></div>
</div>
</div>
<form action="../GameEngine/Admin/Mods/editProtection.php" method="POST">
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
<input type="hidden" name="uid" value="<?php echo $uid; ?>">
<input type="hidden" name="id" value="<?php echo $id; ?>">
<div class="card">
<div class="body">
<div class="status-box <?php echo $isActive ? 'active' : 'expired'; ?>">
<div class="label">Current Status</div>
<div class="date"><?php echo $isActive ? 'ACTIVE' : 'EXPIRED'; ?></div>
<div class="left">Ends: <?php echo $ends; ?><?php if($isActive) echo " ($left days left)"; ?></div>
</div>
<div class="input-group">
<input type="number" id="protect" name="protect" value="0" min="0" max="365">
<span>Days</span>
</div>
<div class="quick-btns">
<button type="button" onclick="setDays(1)">+1 day</button>
<button type="button" onclick="setDays(3)">+3 days</button>
<button type="button" onclick="setDays(7)">+7 days</button>
<button type="button" onclick="setDays(0)">Remove</button>
</div>
<div class="info">💡 Pune 0 ca scoți protecția. Protecția se adaugă de la momentul salvării.</div>
</div>
</div>
<div class="actions">
<a href="admin.php?p=player&uid=<?php echo $uid;?>" class="btn-back"> Back</a>
<button type="submit" class="btn-save">💾 Save Protection</button>
</div>
</form>
</div>
<?php
} else {
include("404.tpl");
} }
?> ?>
+83 -74
View File
@@ -1,81 +1,90 @@
<?php <?php
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename editResources.tpl ## ## Filename : editResources.tpl ##
## Developed by: aggenkeech ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : aggenkeech (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
$id = $_GET['did']; $id = (int)$_GET['did'];
if(isset($id)) if($id){
{ $coor = $database->getCoor($village['wref']);
$coor = $database->getCoor($village['wref']); include("search2.tpl"); ?>
//$varray = $database->getProfileVillages($village['owner']); <style>
//$type = $database->getVillageType($village['wref']); .res-wrap{font-family:system-ui;max-width:600px;margin:12px auto}
//$fdata = $database->getResourceLevel($village['wref']); .res-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;box-shadow:0 4px 12px rgba(0,0,0,.06)}
.res-head{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:12px 16px;font-weight:600;font-size:14px}
.res-table{width:100%;border-collapse:collapse}
.res-table thead td{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;font-weight:600;padding:8px 12px;border-bottom:1px solid #e5e7eb}
.res-table tbody td{padding:10px 12px;border-bottom:1px solid #f1f5f9;font-size:13px}
.res-table tbody tr:last-child td{border-bottom:0}
.res-name{display:flex;align-items:center;gap:8px;font-weight:500;color:#334155}
.res-name img{width:18px;height:18px}
.res-input{width:100%;padding:7px 10px;border:1px solid #d1d5db;border-radius:6px;font-size:13px;box-sizing:border-box}
.res-input:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.15)}
.res-actions{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#f8fafc;border-top:1px solid #e5e7eb}
.btn-back{color:#64748b;text-decoration:none;font-size:13px}
.btn-back:hover{color:#0f172a}
.btn-save{background:#2563eb;color:#fff;border:0;padding:8px 16px;border-radius:8px;font-weight:600;cursor:pointer;font-size:13px}
.btn-save:hover{background:#1d4ed8}
</style>
include("search2.tpl"); ?> <div class="res-wrap">
<form action="../GameEngine/Admin/Mods/editResources.php" method="POST"> <form action="../GameEngine/Admin/Mods/editResources.php" method="POST">
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>"> <input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
<input type="hidden" name="did" id="did" value="<?php echo $_GET['did']; ?>"> <input type="hidden" name="did" value="<?php echo $id; ?>">
<br />
<div class="res-card">
<table id="member" cellpadding="1" cellspacing="1" > <div class="res-head">Modify Resources <?php echo $village['name']; ?> (<?php echo $coor['x']; ?>|<?php echo $coor['y']; ?>)</div>
<thead>
<tr> <table class="res-table">
<th colspan="4">Modify Resources</th> <thead>
</tr> <tr>
<tr> <td style="width:140px">Resource</td>
<td class="on">Resource</td> <td>Amount</td>
<td class="hab">Amount</td> <td style="width:160px">Maximum Capacity</td>
<td class="hab">Maximum Capacity</td> </tr>
</tr> </thead>
</thead> <tbody>
<tbody> <tr>
<tr> <td><div class="res-name"><img src="../img/admin/r/1.gif"> Wood</div></td>
<td class="on"><img src="../img/admin/r/1.gif"> Wood</td> <td><input class="res-input" name="wood" value="<?php echo round($village['wood'],0); ?>"></td>
<td class="hab"><input class="fm" name="wood" value="<?php echo round($village['wood'], 0); ?>"></td> <td rowspan="3"><input class="res-input" name="maxstore" value="<?php echo round($village['maxstore'],0); ?>"></td>
<td rowspan="3" class="hab"> </tr>
<input class="fm" name="maxstore" value="<?php echo round($village['maxstore'], 0); ?>"> <tr>
</tr> <td><div class="res-name"><img src="../img/admin/r/2.gif"> Clay</div></td>
</tr> <td><input class="res-input" name="clay" value="<?php echo round($village['clay'],0); ?>"></td>
</tr> </tr>
<tr> <tr>
<td class="on"><img src="../img/admin/r/2.gif"> Clay</td> <td><div class="res-name"><img src="../img/admin/r/3.gif"> Iron</div></td>
<td class="hab"> <td><input class="res-input" name="iron" value="<?php echo round($village['iron'],0); ?>"></td>
<input class="fm" name="clay" value="<?php echo round($village['clay'], 0); ?>"> </tr>
</td> <tr>
</tr> <td><div class="res-name"><img src="../img/admin/r/4.gif"> Crop</div></td>
<tr> <td><input class="res-input" name="crop" value="<?php echo round($village['crop'],0); ?>"></td>
<td class="on"><img src="../img/admin/r/3.gif"> Iron</td> <td><input class="res-input" name="maxcrop" value="<?php echo round($village['maxcrop'],0); ?>"></td>
<td class="hab"> </tr>
<input class="fm" name="iron" value="<?php echo round($village['iron'], 0); ?>"> </tbody>
</td> </table>
</tr>
<tr> <div class="res-actions">
<td class="on"><img src="../img/admin/r/4.gif"> Crop</td> <a href="../Admin/admin.php?p=village&did=<?php echo $_GET['did'];?>" class="btn-back"> Back to village</a>
<td class="hab"> <button type="submit" class="btn-save">Save Changes</button>
<input class="fm" name="crop" value="<?php echo round($village['crop'], 0); ?>"> </div>
</td> </div>
<td class="hab"> </form>
<input class="fm" name="maxcrop" value="<?php echo round($village['maxcrop'], 0); ?>"> </div>
</td> <?php } else { include("404.tpl"); } ?>
</tr>
</tbody>
</table>
<br />
<table id="ejas" border="0" width="100%">
<tr><td align="left"><a href="../Admin/admin.php?p=village&did=<?php echo $_GET['did'];?>"><< back</a></td>
<td align="right"><input type="image" border="0" src="../img/admin/b/ok1.gif"></td>
</tr>
</table>
</form><?php
}
else
{
include("404.tpl");
}
?>
+14 -5
View File
@@ -2,11 +2,20 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename editServerSet.tpl ## ## Filename : editServerSet.tpl ##
## Developed by: ronix ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ## ## Developed by : ronix (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if (!isset($_SESSION)) { if (!isset($_SESSION)) {
session_start(); session_start();
+105 -69
View File
@@ -2,76 +2,112 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename editSitter.tpl ## ## Filename : editSitter.tpl ##
## Developed by: aggenkeech ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
$id = (int)($_GET['uid'] ?? 0);
$uid = $id;
if($id){
$sitter1 = $user['sit1'] ? $database->getUserArray($user['sit1'], 1) : null;
$sitter2 = $user['sit2'] ? $database->getUserArray($user['sit2'], 1) : null;
?>
<style>
.sit-wrap{max-width:700px;margin:0 auto;font-family:Verdana,Arial;}
.sit-head{background:linear-gradient(135deg,#0ea5e9,#0284c7);color:#fff;border-radius:6px;padding:16px 20px;margin-bottom:14px;display:flex;align-items:center;gap:12px;}
.sit-head .icon{font-size:28px;background:rgba(255,255,255,.15);width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;}
.sit-head h2{margin:0;font-size:18px;}
.sit-head h2 a{color:#fff;text-decoration:none;}
.sit-head .sub{font-size:12px;opacity:.85;margin-top:2px;}
$id = $_GET['uid']; .card{background:#fff;border:1px solid #e5e7eb;border-radius:6px;box-shadow:0 1px 3px rgba(0,0,0,.05);margin-bottom:14px;overflow:hidden;}
$uid = $_GET['uid']; .card h3{margin:0;padding:10px 14px;background:#f9fafb;border-bottom:1px solid #e5e7eb;font-size:13px;text-transform:uppercase;color:#374151;}
if(isset($id)) .card .body{padding:16px;}
{ .info{background:#eff6ff;border:1px solid #bfdbfe;border-radius:5px;padding:10px 12px;font-size:12px;color:#1e40af;margin-bottom:14px;}
?>
<form action="../GameEngine/Admin/Mods/editSitter.php" method="POST"> .sitter-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>"> @media(max-width:600px){.sitter-grid{grid-template-columns:1fr;}}
<input type="hidden" name="uid" value="<?php echo $uid; ?>" /> .sitter-box{border:1px solid #e2e8f0;border-radius:6px;padding:14px;background:#f8fafc;}
<input type="hidden" name="id" value="<?php echo $id; ?>" /> .sitter-box h4{margin:0 0 10px;font-size:13px;color:#334155;display:flex;align-items:center;gap:6px;}
<br /> .sitter-box input{width:100%;padding:8px;border:1px solid #cbd5e1;border-radius:4px;font-size:14px;text-align:center;font-weight:bold;box-sizing:border-box;}
<p>To change sitters, you must use their "uid" you can find this using the search. Delete a sitter, put 0 as sitter.</p> .sitter-box input:focus{border-color:#0ea5e9;outline:none;box-shadow:0 0 0 2px rgba(14,165,233,.2);}
<br /> .sitter-current{margin-top:8px;font-size:12px;text-align:center;min-height:20px;}
<table id="profile" cellpadding="0" cellspacing="0"> .sitter-current a{color:#0284c7;text-decoration:none;font-weight:600;}
<thead> .sitter-current a:hover{text-decoration:underline;}
<tr> .sitter-current.none{color:#94a3b8;font-style:italic;}
<th colspan="2">Edit Sitters For: <a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo $user['username']; ?></a></th> .btn-clear{background:#fee2e2;border:1px solid #fca5a5;color:#b91c1c;padding:4px 8px;border-radius:3px;font-size:11px;cursor:pointer;margin-top:6px;}
</tr> .btn-clear:hover{background:#fecaca;}
</thead>
<tbody> .actions{display:flex;justify-content:space-between;align-items:center;margin-top:18px;padding-top:14px;border-top:1px solid #e5e7eb;}
<tr> .btn-back{background:#f3f4f6;border:1px solid #d1d5db;color:#16a34a;padding:9px 18px;border-radius:5px;font-size:13px;font-weight:600;text-decoration:none;display:inline-flex;align-items:center;gap:6px;}
<td>Sitter 1</td> .btn-back:hover{background:#e5e7eb;}
<td> .btn-save{background:linear-gradient(#0ea5e9,#0284c7);border:1px solid #0369a1;color:#fff;padding:9px 20px;border-radius:5px;font-size:13px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:6px;}
<input class="fm" name="sitter1" value="<?php echo $user['sit1']; ?>"><br /> .btn-save:hover{filter:brightness(1.05);}
<?php </style>
$sitter1 = $database->getUserArray($user['sit1'], 1); <script>
if($user['sit1'] ==0) function clearSitter(n){ document.getElementById('sit'+n).value = '0'; }
{ </script>
echo 'No Sitter';
} <div class="sit-wrap">
else <div class="sit-head">
{ <div class="icon">👥</div>
echo '<a href="admin.php?p=player&uid='.$sitter1['id'].'">'.$sitter1['username'].'</a>'; <div>
} <h2>Edit Sitters: <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo htmlspecialchars($user['username']);?></a></h2>
?> <div class="sub">UID: <?php echo $uid; ?></div>
</td> </div>
</tr> </div>
<tr>
<td>Sitter 2</td> <form action="../GameEngine/Admin/Mods/editSitter.php" method="POST">
<td> <input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
<input class="fm" name="sitter2" value="<?php echo $user['sit2']; ?>"><br /> <input type="hidden" name="uid" value="<?php echo $uid; ?>">
<?php <input type="hidden" name="id" value="<?php echo $id; ?>">
$sitter2 = $database->getUserArray($user['sit2'], 1);
if($user['sit2'] ==0) <div class="card">
{ <h3> Sitter Settings</h3>
echo 'No Sitter'; <div class="body">
} <div class="info">💡 Folosește UID-ul jucătorului. Pune <b>0</b> ca ștergi sitter-ul. Găsești UID-ul din Search.</div>
else
{ <div class="sitter-grid">
echo '<a href="admin.php?p=player&uid='.$sitter2['id'].'">'.$sitter2['username'].'</a>'; <div class="sitter-box">
} <h4>👤 Sitter 1</h4>
?> <input type="number" id="sit1" name="sitter1" value="<?php echo (int)$user['sit1']; ?>" min="0">
</td> <div class="sitter-current <?php echo $sitter1 ? '' : 'none'; ?>">
</td> <?php if($sitter1){ echo '→ <a href="admin.php?p=player&uid='.$sitter1['id'].'">'.htmlspecialchars($sitter1['username']).'</a> (UID '.$sitter1['id'].')'; } else { echo 'No Sitter'; } ?>
</tr> </div>
</tbody> <?php if($sitter1){ echo '<div style="text-align:center"><button type="button" class="btn-clear" onclick="clearSitter(1)">✕ Remove</button></div>'; } ?>
</table> </div>
<br />
<center><input type="image" value="submit" src="../img/admin/b/ok1.gif"></center> <div class="sitter-box">
</form> <h4>👤 Sitter 2</h4>
<?php <input type="number" id="sit2" name="sitter2" value="<?php echo (int)$user['sit2']; ?>" min="0">
} <div class="sitter-current <?php echo $sitter2 ? '' : 'none'; ?>">
else <?php if($sitter2){ echo '→ <a href="admin.php?p=player&uid='.$sitter2['id'].'">'.htmlspecialchars($sitter2['username']).'</a> (UID '.$sitter2['id'].')'; } else { echo 'No Sitter'; } ?>
{ </div>
include("404.tpl"); <?php if($sitter2){ echo '<div style="text-align:center"><button type="button" class="btn-clear" onclick="clearSitter(2)">✕ Remove</button></div>'; } ?>
</div>
</div>
</div>
</div>
<div class="actions">
<a href="admin.php?p=player&uid=<?php echo $uid;?>" class="btn-back"> Back</a>
<button type="submit" class="btn-save">💾 Save Sitters</button>
</div>
</form>
</div>
<?php
} else {
include("404.tpl");
} }
?> ?>
+186 -161
View File
@@ -2,169 +2,194 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename editUser.tpl ## ## Filename : editUser.tpl ##
## Developed by: Dzoki ## ## Type : Admin Panel Frontend ##
## Reworked: aggenkeech ## ## --------------------------------------------------------------------------- ##
## License: TravianZ Project ## ## Developed by : Dzoki (Original) ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Refactored by : Shadow ##
## ## ## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
$id = $_GET['uid']; $id = (int)$_GET['uid'];
if(isset($id)) if(isset($id) && $id > 0) {
{ $varray = $database->getProfileVillages($id);
$varray = $database->getProfileVillages($id); $varmedal = $database->getProfileMedal($id);
$varmedal = $database->getProfileMedal($id); ?> $uid = $id;
?>
<style type="text/css"> <style>
select.dropdown .editUser-wrap { max-width:1100px; margin:0 auto; font-family:Verdana,Arial; }
{ .editUser-head {
border: 1px solid #71D000; background: linear-gradient(#f8f8f8,#e9e9e9);
margin: 0; border:1px solid #c0c0c0; padding:10px 14px; margin-bottom:12px;
padding: 1px 1px; border-radius:4px; display:flex; align-items:center; justify-content:space-between;
width: 90%;
}
</style>
<form action="../GameEngine/Admin/Mods/editUser.php" method="POST">
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
<input type="hidden" name="uid" value="<?php echo $uid; ?>" />
<input type="hidden" name="id" value="<?php echo $id; ?>" />
<table id="profile" cellpadding="1" cellspacing="1">
<thead>
<tr>
<th colspan="2">Player <a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo $user['username']; ?></a></th>
</tr>
<tr>
<td>Details</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td class="details">
<table cellpadding="0" cellspacing="0">
<tr>
<th>Tribe</th>
<td>
<select name="tribe" class="dropdown">
<option value="1" <?php if($user['tribe'] == 1) { echo "selected='selected'"; } else {} ?>>Roman</option>
<option value="2" <?php if($user['tribe'] == 2) { echo "selected='selected'"; } else {} ?>>Teuton</option>
<option value="3" <?php if($user['tribe'] == 3) { echo "selected='selected'"; } else {} ?>>Gaul</option>
<option value="4" <?php if($user['tribe'] == 4) { echo "selected='selected'"; } else {} ?>>Nature</option>
<option value="5" <?php if($user['tribe'] == 5) { echo "selected='selected'"; } else {} ?>>Natars</option>
</select>
</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<th>Location</th>
<td><input class="fm" name="location" value="<?php echo $user['location']; ?>"></td>
</tr>
<tr>
<th>E-mail</th><td><input class="fm" name="email" value="<?php echo $user['email']; ?>"></td></tr>
<tr>
<tr>
<th>Quest</th><td><input class="fm" name="quest" value="<?php echo $user['quest']; ?>"></td></tr>
<tr>
<td colspan="2" class="empty"></td>
</tr>
<tr>
<td colspan="2"><a href="?p=player&uid=<?php echo $user['id']; ?>"><span class="rn2" >&raquo;</span> Go back</a></td>
</tr>
<tr>
<td colspan="2" class="empty"></td>
</tr>
<tr>
<td colspan="2" class="desc2"><textarea cols="25" rows="14" tabindex="1" name="desc1"><?php echo $user['desc1']; ?></textarea></td>
</tr>
</table>
</td>
<td class="desc1">
<textarea tabindex="8" cols="30" rows="20" name="desc2"><?php echo $user['desc2']; ?></textarea>
</td>
</tr>
<tr>
<td colspan="2" class="empty"></td>
</tr>
</tbody>
</table>
<table cellspacing="1" cellpadding="2" id="member">
<thead>
<tr>
<th colspan="4">Medals</th>
</tr>
<tr>
<td>Category</td>
<td>Rank</td>
<td>Week</td>
<td>BB-Code</td>
</tr>
</thead>
<tbody>
<?php
foreach($varmedal as $medal)
{
$titel="Bonus";
switch ($medal['categorie'])
{
case "1":
$titel="Attacker of the Week";
break;
case "2":
$titel="Defender of the Week";
break;
case "3":
$titel="Climber of the week";
break;
case "4":
$titel="Robber of the week";
break;
}
echo"
<tr>
<td> ".$titel."</td>
<td>".$medal['plaats']."</td>
<td>".$medal['week']."</td>
<td>[#".$medal['id']."]</td>
</tr>";
}
?>
<tr>
<td>Beginners Protection</td>
<td></td>
<td></td>
<td>[#0]</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="4">
<center>
<input type="image" src="../img/admin/b/ok1.gif" value="submit">
</center>
</td>
</tr>
</tfoot>
</table>
</form><?php
} }
else .editUser-head h2 { margin:0; font-size:18px; color:#333; }
{ .editUser-head h2 a { color:#71D000; text-decoration:none; }
echo "<br /><br />Not found. <a href=\"javascript: history.go(-1)\"> Go Back</a>"; .editUser-head .meta { font-size:12px; color:#666; }
.editUser-grid { display:grid; grid-template-columns: 380px 1fr; gap:12px; }
@media(max-width:900px){ .editUser-grid{grid-template-columns:1fr;} }
.card { background:#fff; border:1px solid #d0d0d0; border-radius:4px; box-shadow:0 1px 2px rgba(0,0,0,.05); overflow:hidden; }
.card h3 { margin:0; padding:8px 12px; background:#f0f0f0; border-bottom:1px solid #d0d0d0; font-size:13px; text-transform:uppercase; color:#444; letter-spacing:.5px; }
.card .body { padding:12px; }
.form-row { display:flex; margin-bottom:10px; align-items:center; }
.form-row label { width:110px; font-size:12px; color:#333; font-weight:bold; }
.form-row input.fm, .form-row select.dropdown { flex:1; border:1px solid #bbb; padding:5px 6px; font-size:12px; border-radius:3px; background:#fff; }
.form-row input.fm:focus, select.dropdown:focus { border-color:#71D000; outline:none; box-shadow:0 0 3px rgba(113,208,0,.4); }
select.dropdown { width:100%; }
.username-row { background:#f9fff0; border:1px solid #d4edaa; border-radius:3px; padding:8px; margin-bottom:12px; }
.username-row .form-row { margin-bottom:0; }
.btn-mini { background:linear-gradient(#7ed321,#5eae0f); border:1px solid #4a8a0c; color:#fff; padding:5px 10px; font-size:11px; font-weight:bold; border-radius:3px; cursor:pointer; margin-left:6px; }
.btn-mini:hover { filter:brightness(1.05); }
.desc-box textarea { width:100%; box-sizing:border-box; border:1px solid #bbb; border-radius:3px; padding:6px; font-family:Consolas,monospace; font-size:12px; resize:vertical; }
.desc-box textarea:focus { border-color:#71D000; outline:none; }
.medals-table { width:100%; border-collapse:collapse; font-size:12px; }
.medals-table th { background:#f5f5f5; padding:6px; border:1px solid #ddd; text-align:left; }
.medals-table td { padding:6px; border:1px solid #eee; }
.medals-table tr:nth-child(even){ background:#fafafa; }
.badge { display:inline-block; padding:2px 6px; border-radius:3px; font-size:11px; color:#fff; }
.badge.att { background:#c00; } .badge.def { background:#069; } .badge.climb { background:#e67e00; } .badge.rob { background:#6a0dad; }
.actions { margin-top:14px; text-align:center; }
.btn-save { background:linear-gradient(#7ed321,#5eae0f); border:1px solid #4a8a0c; color:#fff; padding:8px 24px; font-size:14px; font-weight:bold; border-radius:4px; cursor:pointer; text-shadow:0 -1px 0 rgba(0,0,0,.2); }
.btn-save:hover { filter:brightness(1.05); }
.back-link { font-size:12px; margin-left:12px; }
.back-link a { color:#0066cc; text-decoration:none; }
.back-link a:hover { text-decoration:underline; }
</style>
<div class="editUser-wrap">
<div class="editUser-head">
<h2> Edit Player: <a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo htmlspecialchars($user['username']); ?></a></h2>
<div class="meta">ID: <?php echo $id; ?> | Villages: <?php echo count($varray); ?> | Gold: <?php echo $user['gold']; ?> <img src="../img/x.gif" class="gold" style="vertical-align:-2px;"></div>
</div>
<div class="editUser-grid">
<!-- LEFT: DETAILS -->
<div class="card">
<h3>👤 Account Details</h3>
<div class="body">
<!-- USERNAME EDIT - NOU -->
<div class="username-row">
<form action="../GameEngine/Admin/Mods/editUsername.php" method="POST">
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
<input type="hidden" name="uid" value="<?php echo $uid; ?>">
<div class="form-row">
<label>👤 Username</label>
<input class="fm" name="username" value="<?php echo htmlspecialchars($user['username']); ?>" style="flex:1;">
<button type="submit" class="btn-mini" title="Change Username">💾 Save</button>
</div>
</form>
</div>
<!-- RESTUL FORMULUI PRINCIPAL -->
<form action="../GameEngine/Admin/Mods/editUser.php" method="POST">
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
<input type="hidden" name="uid" value="<?php echo $uid; ?>" />
<input type="hidden" name="id" value="<?php echo $id; ?>" />
<div class="form-row">
<label> Tribe</label>
<select name="tribe" class="dropdown">
<option value="1" <?php if($user['tribe']==1)echo"selected"; ?>>1. Roman</option>
<option value="2" <?php if($user['tribe']==2)echo"selected"; ?>>2. Teuton</option>
<option value="3" <?php if($user['tribe']==3)echo"selected"; ?>>3. Gaul</option>
</select>
</div>
<div class="form-row">
<label>📍 Location</label>
<input class="fm" name="location" value="<?php echo htmlspecialchars($user['location']); ?>">
</div>
<div class="form-row">
<label> E-mail</label>
<input class="fm" name="email" value="<?php echo htmlspecialchars($user['email']); ?>">
</div>
<div class="form-row">
<label>🎯 Quest</label>
<input class="fm" name="quest" value="<?php echo (int)$user['quest']; ?>">
</div>
<div style="margin-top:14px; border-top:1px dashed #ddd; padding-top:10px;">
<label style="font-weight:bold; font-size:12px; display:block; margin-bottom:4px;">📝 Profile Description (left)</label>
<div class="desc-box">
<textarea name="desc1" rows="10"><?php echo htmlspecialchars($user['desc1']); ?></textarea>
</div>
</div>
</div>
</div>
<!-- RIGHT: DESCRIPTION -->
<div class="card">
<h3>📄 Profile Description (right)</h3>
<div class="body desc-box">
<textarea name="desc2" rows="22"><?php echo htmlspecialchars($user['desc2']); ?></textarea>
<div style="font-size:11px; color:#777; margin-top:4px;">Suport BBCode. Folosește Enter pentru linii noi.</div>
</div>
</div>
</div>
<!-- MEDALS -->
<div class="card" style="margin-top:12px;">
<h3>🏅 Medals</h3>
<div class="body" style="padding:0;">
<table class="medals-table">
<thead>
<tr>
<th style="width:35%;">Category</th>
<th style="width:15%;">Rank</th>
<th style="width:15%;">Week</th>
<th>BB-Code</th>
</tr>
</thead>
<tbody>
<?php
foreach($varmedal as $medal){
$titel="Bonus"; $class=""; $icon="⭐";
switch($medal['categorie']){
case "1": $titel="Attacker of the Week"; $class="att"; $icon="⚔️"; break;
case "2": $titel="Defender of the Week"; $class="def"; $icon="🛡️"; break;
case "3": $titel="Climber of the Week"; $class="climb"; $icon="📈"; break;
case "4": $titel="Robber of the Week"; $class="rob"; $icon="💰"; break;
}
echo "<tr>
<td><span class='badge $class'>$icon</span> $titel</td>
<td>#".$medal['plaats']."</td>
<td>".$medal['week']."</td>
<td><code>[#".$medal['id']."]</code></td>
</tr>";
}
?>
<tr>
<td><span class="badge" style="background:#999;">🔰</span> Beginners Protection</td>
<td>-</td><td>-</td><td><code>[#0]</code></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="actions">
</form> <!-- închidem form-ul principal aici -->
<button type="submit" form="dummy" onclick="document.querySelector('form[action*=\'editUser.php\']').submit()" class="btn-save">💾 Save Changes</button>
<span class="back-link"><a href="?p=player&uid=<?php echo $user['id']; ?>">« Go back to player</a></span>
</div>
</div>
<?php
} else {
echo "<div style='padding:20px; text-align:center;'>❌ Player not found. <a href=\"javascript:history.go(-1)\">Go Back</a></div>";
} }
?> ?>
+14 -5
View File
@@ -2,11 +2,20 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename editVillage.tpl ## ## Filename : editVillage.tpl ##
## Developed by: aggenkeech ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
$id = $_GET['did']; $id = $_GET['did'];
+104 -50
View File
@@ -2,57 +2,111 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename editWeek.tpl ## ## Filename : editWeek.tpl ##
## Developed by: aggenkeech ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
$id = (int)($_GET['uid'] ?? 0);
$uid = $id;
if($id){
?>
<style>
.week-wrap{max-width:800px;margin:0 auto;font-family:Verdana,Arial;}
.week-head{background:linear-gradient(135deg,#059669,#047857);color:#fff;border-radius:6px;padding:16px 20px;margin-bottom:14px;display:flex;align-items:center;gap:12px;}
.week-head .icon{font-size:28px;background:rgba(255,255,255,.15);width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;}
.week-head h2{margin:0;font-size:18px;}
.week-head h2 a{color:#fff;text-decoration:none;}
.week-head .sub{font-size:12px;opacity:.85;margin-top:2px;}
$id = $_GET['uid']; .card{background:#fff;border:1px solid #e5e7eb;border-radius:6px;box-shadow:0 1px 3px rgba(0,0,0,.05);overflow:hidden;}
$uid = $_GET['uid']; .card .body{padding:20px;}
if(isset($id)) .info{background:#ecfdf5;border:1px solid #a7f3d0;border-radius:5px;padding:10px 12px;font-size:12px;color:#065f46;margin-bottom:16px;}
{
?> .stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;}
<form action="../GameEngine/Admin/Mods/editWeek.php" method="POST"> @media(max-width:700px){.stats-grid{grid-template-columns:1fr;}}
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>"> .stat-box{border:1px solid #e2e8f0;border-radius:8px;padding:16px;text-align:center;background:#fafafa;transition:.2s;}
<input type="hidden" name="uid" value="<?php echo $uid; ?>" /> .stat-box:hover{transform:translateY(-2px);box-shadow:0 4px 8px rgba(0,0,0,.06);}
<input type="hidden" name="id" value="<?php echo $id; ?>" /> .stat-box.off{border-top:3px solid #dc2626;background:#fef2f2;}
<br /> .stat-box.def{border-top:3px solid #2563eb;background:#eff6ff;}
<table id="profile" cellpadding="0" cellspacing="0"> .stat-box.raid{border-top:3px solid #d97706;background:#fffbeb;}
<thead> .stat-box .icon{font-size:28px;margin-bottom:6px;}
<tr> .stat-box .label{font-size:12px;font-weight:600;color:#475569;margin-bottom:3px;text-transform:uppercase;}
<th colspan="2">Edit Off, Def, Raid Points This Week For: <a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo $user['username']; ?></a></th> .stat-box .current{font-size:11px;color:#64748b;margin-bottom:8px;}
</tr> .stat-box input{width:120px;padding:8px;border:1px solid #cbd5e1;border-radius:5px;font-size:16px;font-weight:bold;text-align:center;font-family:monospace;}
</thead> .stat-box input:focus{outline:none;}
<tbody> .stat-box.off input:focus{border-color:#dc2626;box-shadow:0 0 0 3px rgba(220,38,38,.15);}
<tr> .stat-box.def input:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.15);}
<td>Edit Attack Points</td> .stat-box.raid input:focus{border-color:#d97706;box-shadow:0 0 0 3px rgba(217,119,6,.15);}
<td>
<input class="fm" name="off" value="<?php echo $user['ap']; ?>" style="width: 60%;"> Points .actions{display:flex;justify-content:space-between;align-items:center;margin-top:20px;padding-top:14px;border-top:1px solid #e5e7eb;}
</td> .btn-back{background:#f3f4f6;border:1px solid #d1d5db;color:#16a34a;padding:9px 18px;border-radius:5px;font-size:13px;font-weight:600;text-decoration:none;display:inline-flex;align-items:center;gap:6px;}
</tr> .btn-back:hover{background:#e5e7eb;}
<tr> .btn-save{background:linear-gradient(#059669,#047857);border:1px solid #065f46;color:#fff;padding:9px 20px;border-radius:5px;font-size:13px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:6px;}
<td>Edit Defence Points</td> .btn-save:hover{filter:brightness(1.05);}
<td> </style>
<input class="fm" name="def" value="<?php echo $user['dp']; ?>" style="width: 60%;"> Points
</td> <div class="week-wrap">
</tr> <div class="week-head">
<tr> <div class="icon">📅</div>
<td>Edit Resources Raided</td> <div>
<td> <h2>Weekly Stats: <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo htmlspecialchars($user['username']);?></a></h2>
<input class="fm" name="res" value="<?php echo $user['RR']; ?>" style="width: 60%;"> Points <div class="sub">UID: <?php echo $uid; ?> Reset săptămânal</div>
</td> </div>
</tr> </div>
</tbody>
</table> <form action="../GameEngine/Admin/Mods/editWeek.php" method="POST">
<br /> <input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
<center><input type="image" value="submit" src="../img/admin/b/ok1.gif"></center> <input type="hidden" name="uid" value="<?php echo $uid; ?>">
</form> <input type="hidden" name="id" value="<?php echo $id; ?>">
<?php
} <div class="card">
else <div class="body">
{ <div class="info">📊 Acestea sunt punctele <b>din săptămâna curentă</b> pentru top 10. Se resetează automat.</div>
include("404.tpl");
<div class="stats-grid">
<div class="stat-box off">
<div class="icon"></div>
<div class="label">Attack</div>
<div class="current">Now: <?php echo number_format($user['ap']); ?></div>
<input type="number" name="off" value="<?php echo (int)$user['ap']; ?>" min="0">
</div>
<div class="stat-box def">
<div class="icon">🛡</div>
<div class="label">Defence</div>
<div class="current">Now: <?php echo number_format($user['dp']); ?></div>
<input type="number" name="def" value="<?php echo (int)$user['dp']; ?>" min="0">
</div>
<div class="stat-box raid">
<div class="icon">💰</div>
<div class="label">Raid</div>
<div class="current">Now: <?php echo number_format($user['RR']); ?></div>
<input type="number" name="res" value="<?php echo (int)$user['RR']; ?>" min="0">
</div>
</div>
</div>
</div>
<div class="actions">
<a href="admin.php?p=player&uid=<?php echo $uid;?>" class="btn-back"> Back</a>
<button type="submit" class="btn-save">💾 Save Week</button>
</div>
</form>
</div>
<?php
} else {
include("404.tpl");
} }
?> ?>
+18 -1
View File
@@ -1,7 +1,24 @@
<?php <?php
################################################################################# #################################################################################
## givePlus.tpl - REDESIGN 2025 ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : givePlus.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!"); if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
$id = $_SESSION['id']; $id = $_SESSION['id'];
?> ?>
+18 -1
View File
@@ -1,7 +1,24 @@
<?php <?php
################################################################################# #################################################################################
## givePlusRes.tpl - REDESIGN 2025 ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : givePlusRes.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!"); if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
$id = $_SESSION['id']; $id = $_SESSION['id'];
?> ?>
+18 -3
View File
@@ -1,6 +1,21 @@
<?php <?php
################################################################################# #################################################################################
## gold.tpl - REDESIGN 2025 ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : gold.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!"); if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
$id = $_SESSION['id']; $id = $_SESSION['id'];
@@ -34,7 +49,7 @@ $id = $_SESSION['id'];
<svg viewBox="0 0 24 24"><path d="M12 2L9 8H3l5 4-2 6 6-4 6 4-2-6 5-4h-6z"/></svg> <svg viewBox="0 0 24 24"><path d="M12 2L9 8H3l5 4-2 6 6-4 6 4-2-6 5-4h-6z"/></svg>
</div> </div>
<h3>Give Everyone Free Gold</h3> <h3>Give Everyone Free Gold</h3>
<p>Acest gold va fi adăugat la TOȚI jucătorii activi de pe server.</p> <p>This gold will be added to ALL active players on the server.</p>
<form action="../GameEngine/Admin/Mods/gold.php" method="POST" class="gold-form"> <form action="../GameEngine/Admin/Mods/gold.php" method="POST" class="gold-form">
<input type="hidden" name="admid" value="<?php echo $id; ?>"> <input type="hidden" name="admid" value="<?php echo $id; ?>">
@@ -47,6 +62,6 @@ $id = $_SESSION['id'];
</div> </div>
<?php if(isset($_GET['g'])){ ?> <?php if(isset($_GET['g'])){ ?>
<div class="gold-success"> Gold a fost adăugat cu succes la toți jucătorii!</div> <div class="gold-success"> Gold has been successfully added to all players!</div>
<?php } ?> <?php } ?>
</div> </div>
+16 -11
View File
@@ -1,19 +1,24 @@
<?php <?php
################################################################################# #################################################################################
## -= YOU MUST NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : home.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Project: TravianZ ##
## Version: 22.05.2026 ##
## Filename: Admin\Templates\home.php ##
## Developed by: Dzoki ##
## Refactored by: Shadow ##
## License: TravianZ Project ##
## Copyright: TravianZ (c) 2010-2026. All rights reserved. ##
## URLs: https://travianz.org ##
## https://github.com/Shadowss/TravianZ ##
## ##
################################################################################# #################################################################################
if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!"); if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!");
// ---- STATS ---- // ---- STATS ----
+18 -1
View File
@@ -1,7 +1,24 @@
<?php <?php
################################################################################# #################################################################################
## inactive.tpl - FIXED 2025 ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : inactive.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!"); if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!");
global $database; global $database;
+106 -44
View File
@@ -1,53 +1,115 @@
<?php <?php
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename login.tpl ## ## Filename : login.tpl ##
## Developed by: Dzoki ## ## Type : Admin Panel Frontend ##
## Reworked: aggenkeech ## ## --------------------------------------------------------------------------- ##
## License: TravianZ Project ## ## Developed by : Dzoki (Original) ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Refactored by : Shadow ##
## ## ## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
?> ?>
<div align="center"> <style>
<img src="../img/admin/admin.gif" width="468" height="60" border="0"> @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Cinzel:wght@600&display=swap');
</div> *{box-sizing:border-box}
body{margin:0;background:#0a0f1c;font-family:'Inter',sans-serif;color:#e2e8f0}
/* ASCUNDE ELEMENTELE VECHI */
body > img[src*="Travian"], img[src*="admin.gif"]{display:none !important}
<img src="../<?php echo GP_LOCATE; ?>lang/en/t1/login.gif"> .login-page{min-height:100vh;display:flex;align-items:flex-start;justify-content:center;padding:60px 20px 20px;position:relative;background:#0a0f1c}
.login-page::before{content:"";position:absolute;inset:0;background:url('https://i.imgur.com/8Km9tLL.jpg') center/cover no-repeat;opacity:.25;filter:brightness(.6);z-index:0}
.login-page::before{display:none}
<form method="post" action="admin.php"> .login-container{position:relative;z-index:2;width:100%;max-width:420px;margin-top:0}
<input type="hidden" name="action" value="login"> .login-header{text-align:center;margin-bottom:24px}
<p class="old_p1"> .travian-logo{font-family:'Cinzel',serif;font-size:38px;font-weight:600;color:#fff;letter-spacing:2px;text-shadow:0 0 20px rgba(14,165,233,.6);margin-bottom:8px}
<table width="75%" cellspacing="1" cellpadding="0" id="profile"> .travian-logo span{color:#0ea5e9}
<thead> .admin-badge{display:inline-flex;align-items:center;gap:6px;background:rgba(14,165,233,.15);border:1px solid rgba(14,165,233,.3);padding:4px 12px;border-radius:20px;font-size:11px;color:#7dd3fc;text-transform:uppercase;letter-spacing:1px}
<tr>
<th colspan="2">Server Admin Login</th> .login-card{background:rgba(15,23,42,.9);backdrop-filter:blur(20px);border:1px solid rgba(148,163,184,.15);border-radius:20px;padding:32px;box-shadow:0 25px 50px rgba(0,0,0,.7)}
</td> .login-title{text-align:center;margin-bottom:28px}
</thead> .login-title h2{margin:0;font-size:20px;font-weight:600;color:#fff}
<tbody> .login-title p{margin:6px 0 0;font-size:13px;color:#94a3b8}
<tr>
<td>Username</td> .form-group{margin-bottom:18px}
<td> .form-group label{display:block;font-size:12px;color:#cbd5e1;margin-bottom:6px;font-weight:500}
<input class="fm fm110" type="text" name="name" value="<?php echo (isset($_SESSION['admin_username']) ? $_SESSION['admin_username'] : '')?>" maxlength="20"> .form-input{width:100%;padding:12px 14px;background:#1e293b;border:1px solid #334155;border-radius:10px;color:#f1f5f9;font-size:14px;transition:all .2s}
</td> .form-input:focus{outline:none;border-color:#0ea5e9;background:#0f172a;box-shadow:0 0 0 3px rgba(14,165,233,.15)}
</tr> .form-input::placeholder{color:#64748b}
<tr>
<td>Password:</td> .login-btn{width:100%;padding:13px;background:linear-gradient(135deg,#0ea5e9 0%,#0284c7 100%);border:none;border-radius:10px;color:#fff;font-weight:600;font-size:14px;cursor:pointer;transition:all .2s;margin-top:8px;box-shadow:0 4px 14px rgba(2,132,199,.35)}
<td> .login-btn:hover{transform:translateY(-1px);box-shadow:0 6px 20px rgba(2,132,199,.45)}
<input class="fm fm110" type="password" name="pw" value="" maxlength="20"> .login-btn:active{transform:translateY(0)}
</td>
</tr> .login-footer{margin-top:28px;padding-top:20px;border-top:1px solid rgba(148,163,184,.1);text-align:center;font-size:11px;color:#64748b}
<tr> .login-footer a{color:#38bdf8;text-decoration:none}
<td colspan="2">
<center> .tribes{display:flex;justify-content:center;gap:24px;margin-top:24px;opacity:.6}
<input type="image" border="0" src="../img/admin/b/l1.gif" width="80" height="20"> .tribe-icon{width:36px;height:36px;border-radius:50%;background:rgba(30,41,59,.8);display:flex;align-items:center;justify-content:center;font-size:18px;border:1px solid rgba(148,163,184,.2)}
</center>
</td> /* CREDIT SHADOW - ELEGANT */
</tr> .credits{margin-top:22px;text-align:center;font-size:11px;color:#64748b;letter-spacing:.4px;opacity:.9}
</tbody> .credits .shadow{color:#38bdf8;font-weight:700;text-shadow:0 0 12px rgba(56,189,248,.45)}
</table> .credits a{color:#7dd3fc;text-decoration:none;border-bottom:1px solid rgba(125,211,252,.25);padding-bottom:1px;transition:all .2s}
</p> .credits a:hover{color:#fff;border-bottom-color:#38bdf8;text-shadow:0 0 10px rgba(56,189,248,.7)}
<img align="right" src="../<?php echo GP_LOCATE; ?>img/new/background_plus.png" width="500"> </style>
</form>
<div class="login-page">
<div class="login-container">
<div class="login-header">
<div class="travian-logo">TRA<span>VIAN</span>Z</div>
<div class="admin-badge">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10z"/></svg>
Admin Control
</div>
</div>
<div class="login-card">
<div class="login-title">
<h2>Server Administration</h2>
<p>Secure access to TravianZ panel</p>
</div>
<form method="post" action="admin.php">
<input type="hidden" name="action" value="login">
<div class="form-group">
<label>Username</label>
<input class="form-input" type="text" name="name" value="<?php echo (isset($_SESSION['admin_username']) ? $_SESSION['admin_username'] : '')?>" maxlength="20" placeholder="Enter admin username" autocomplete="username" required>
</div>
<div class="form-group">
<label>Password</label>
<input class="form-input" type="password" name="pw" value="" maxlength="20" placeholder="••••••••" autocomplete="current-password" required>
</div>
<button type="submit" class="login-btn">Access Panel</button>
</form>
<div class="login-footer">
© 2010-2026 TravianZ Project • v5.0
</div>
</div>
<div class="tribes">
<div class="tribe-icon" title="Romans">⚔️</div>
<div class="tribe-icon" title="Teutons">🪓</div>
<div class="tribe-icon" title="Gauls">🛡️</div>
</div>
<div class="credits">
Admin Panel Redesigned & Refactored by <span class="shadow">Shadow</span> <a href="https://github.com/Shadowss/TravianZ" target="_blank" rel="noopener">TravianZ Copyright</a>
</div>
</div>
</div>
+70 -35
View File
@@ -1,45 +1,80 @@
<?php <?php
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename maintenance.tpl ## ## Filename : maintenance.tpl ##
## Developed by: aggenkeech ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : Shadow (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if(isset($_POST['startMaint_x'])) { global $database;
$database->setUsersOk(2);
$error = "The maintenance has started"; $uid = 0;
} if(isset($_SESSION['id'])) {
elseif($_POST['removeMaint_x']) { $uid = (int)$_SESSION['id'];
$database->setUsersOk(0); } elseif(isset($GLOBALS['session']->uid)) {
$error = "The maintenance has been removed"; $uid = (int)$GLOBALS['session']->uid;
} }
if(isset($_POST['startMaint'])) {
$database->setMaintenance(1, $uid);
$error = "Maintenance ACTIVAT";
}
if(isset($_POST['removeMaint'])) {
$database->setMaintenance(0, $uid);
$error = "Maintenance OPRIT";
}
$maint = $database->getMaintenance();
$starterName = 'Necunoscut';
if($maint['started_by'] > 0){
$u = $database->getUserArray($maint['started_by'], 1);
$starterName = $u['username'] ?? 'UID '.$maint['started_by'];
}
?> ?>
<form action="../Admin/admin.php?p=maintenance" method="POST"> <style>
<p><div style="text-align: center;color: red"><?php echo $error; ?></div></p> .maint-card{max-width:520px;margin:12px auto;background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;font-family:system-ui}
<table id="member" cellpadding="1" cellspacing="1" > .maint-head{background:#0f172a;color:#fff;padding:10px 14px;font-weight:600}
<thead> .maint-status{padding:14px;text-align:center;font-weight:600}
<tr> .maint-status.on{color:#dc2626;background:#fef2f2}
<th colspan="2">Server Maintenance</th> .maint-status.off{color:#16a34a;background:#f0fdf4}
</tr> .maint-row{display:grid;grid-template-columns:1fr 120px;padding:12px 14px;border-top:1px solid #f1f5f9;align-items:center}
<tr> .maint-btn{padding:8px;border:0;border-radius:6px;color:#fff;font-weight:500;cursor:pointer;width:100%}
<td class="on">Description</td> .start{background:#16a34a}.stop{background:#dc2626}
<td class="hab">Execute</td> .maint-info{font-size:12px;color:#64748b;padding:0 14px 10px}
</tr> .msg{padding:8px 12px;margin:8px auto;max-width:520px;background:#f0fdf4;border:1px solid #bbf7d0;color:#166534;border-radius:6px;font-weight:600}
</thead> </style>
<tbody>
<tr> <?php if(!empty($error)) echo '<div class="msg">'.$error.'</div>'; ?>
<td class="hab">Start a maintenance</td>
<td class="hab"><div style="text-align: center"><input name="startMaint" type="image" src="../img/admin/b/ok1.gif"/></div></td> <form method="POST">
</tr> <div class="maint-card">
<tr> <div class="maint-head">Server Maintenance</div>
<td class="hab">Remove a Maintenance</td> <div class="maint-status <?= $maint['active'] ? 'on' : 'off' ?>">
<td class="hab"><div style="text-align: center"><input name="removeMaint" type="image" src="../img/admin/b/ok1.gif"></div></td> <?= $maint['active'] ? 'ACTIV din '.($maint['started_at'] ? date('H:i d.m.Y',$maint['started_at']) : '-') : 'INACTIV server deschis' ?>
</tr> </div>
</tbody> <?php if($maint['active']){ ?>
</table> <div class="maint-info">Pornit de: <b><?= htmlspecialchars($starterName) ?></b> (UID: <?= (int)$maint['started_by'] ?>)</div>
<?php } ?>
<div class="maint-row">
<div>Activeaza mentenanta</div>
<button type="submit" name="startMaint" class="maint-btn start">Start</button>
</div>
<div class="maint-row">
<div>Dezactiveaza mentenanta</div>
<button type="submit" name="removeMaint" class="maint-btn stop">Stop</button>
</div>
</div>
</form> </form>
+23 -6
View File
@@ -1,7 +1,24 @@
<?php <?php
################################################################################# #################################################################################
## MaintenenceResetGold.tpl - REDESIGN 2025 ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : maintenenceResetGold.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!"); if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
?> ?>
<style> <style>
@@ -23,7 +40,7 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
<div class="resetgold-wrap"> <div class="resetgold-wrap">
<div class="resetgold-head"> <div class="resetgold-head">
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 2v10l4-4" stroke="#e74c3c" stroke-width="2" stroke-linecap="round"/><circle cx="12" cy="17" r="5" fill="#c0392b"/></svg> <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 2v10l4-4" stroke="#e74c3c" stroke-width="2" stroke-linecap="round"/><circle cx="12" cy="17" r="5" fill="#c0392b"/></svg>
<h2>Maintenance</h2> <h2>Reset Gold for all players</h2>
</div> </div>
<div class="resetgold-card"> <div class="resetgold-card">
@@ -31,13 +48,13 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
<svg viewBox="0 0 24 24"><path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/></svg> <svg viewBox="0 0 24 24"><path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/></svg>
</div> </div>
<h3>Reset All Players Gold</h3> <h3>Reset All Players Gold</h3>
<p>Această acțiune va seta gold-ul la <b>0</b> pentru TOȚI jucătorii de pe server.</p> <p>This action will set the gold to <b>0</b> for ALL players from the server.</p>
<div class="danger-box"> <div class="danger-box">
⚠️ ATENȚIE: Acțiunea este ireversibilă! Asigură-te că ai backup înainte. ⚠️ WARNING: The action is irreversible! Make sure you have backup first.
</div> </div>
<form action="../GameEngine/Admin/Mods/mainteneceResetGold.php" method="POST" class="resetgold-form" onsubmit="return confirm('Ești SIGUR că vrei să resetezi gold-ul la TOȚI jucătorii?');"> <form action="../GameEngine/Admin/Mods/mainteneceResetGold.php" method="POST" class="resetgold-form" onsubmit="return confirm('Are you SURE you want to reset gold to ALL players?');">
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>"> <input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
<button type="submit"> <button type="submit">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none"><path d="M3 6h18M8 6V4h8v2m-1 0v14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V6h10z" stroke="#fff" stroke-width="2" stroke-linecap="round"/></svg> <svg width="18" height="18" viewBox="0 0 24 24" fill="none"><path d="M3 6h18M8 6V4h8v2m-1 0v14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V6h10z" stroke="#fff" stroke-width="2" stroke-linecap="round"/></svg>
@@ -47,6 +64,6 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
</div> </div>
<?php if(isset($_GET['g'])){ ?> <?php if(isset($_GET['g'])){ ?>
<div class="resetgold-success"> Gold-ul tuturor jucătorilor a fost resetat!</div> <div class="resetgold-success"> All players gold has been reset!</div>
<?php } ?> <?php } ?>
</div> </div>
+23 -6
View File
@@ -1,7 +1,24 @@
<?php <?php
################################################################################# #################################################################################
## MaintenenceResetPlus.tpl - REDESIGN 2025 ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : maintenenceResetPlus.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!"); if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
?> ?>
<style> <style>
@@ -23,7 +40,7 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
<div class="resetplus-wrap"> <div class="resetplus-wrap">
<div class="resetplus-head"> <div class="resetplus-head">
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 2v10l4-4" stroke="#8e44ad" stroke-width="2" stroke-linecap="round"/><circle cx="12" cy="17" r="5" fill="#6c3483"/></svg> <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 2v10l4-4" stroke="#8e44ad" stroke-width="2" stroke-linecap="round"/><circle cx="12" cy="17" r="5" fill="#6c3483"/></svg>
<h2>Maintenance</h2> <h2>Reset All Players Plus</h2>
</div> </div>
<div class="resetplus-card"> <div class="resetplus-card">
@@ -31,13 +48,13 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
<svg viewBox="0 0 24 24"><path d="M12 4v16M4 12h16" stroke="white" stroke-width="3" stroke-linecap="round"/></svg> <svg viewBox="0 0 24 24"><path d="M12 4v16M4 12h16" stroke="white" stroke-width="3" stroke-linecap="round"/></svg>
</div> </div>
<h3>Reset All Players Plus</h3> <h3>Reset All Players Plus</h3>
<p>Această acțiune va dezactiva Travian Plus pentru TOȚI jucătorii.</p> <p>This action will disable Travian Plus for ALL players.</p>
<div class="danger-box"> <div class="danger-box">
⚠️ Plus-ul va fi setat la 0 zile pentru toată lumea. ⚠️ Plus it will be set to 0 days for everyone.
</div> </div>
<form action="../GameEngine/Admin/Mods/mainteneceResetPlus.php" method="POST" class="resetplus-form" onsubmit="return confirm('Ești SIGUR că vrei să resetezi Plus-ul la TOȚI jucătorii?');"> <form action="../GameEngine/Admin/Mods/mainteneceResetPlus.php" method="POST" class="resetplus-form" onsubmit="return confirm('Are you SURE you want to reset the Plus to ALL players?');">
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>"> <input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
<button type="submit"> <button type="submit">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none"><path d="M3 6h18M8 6V4h8v2m-1 0v14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V6h10z" stroke="#fff" stroke-width="2" stroke-linecap="round"/></svg> <svg width="18" height="18" viewBox="0 0 24 24" fill="none"><path d="M3 6h18M8 6V4h8v2m-1 0v14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V6h10z" stroke="#fff" stroke-width="2" stroke-linecap="round"/></svg>
@@ -47,6 +64,6 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
</div> </div>
<?php if(isset($_GET['g'])){ ?> <?php if(isset($_GET['g'])){ ?>
<div class="resetplus-success"> Plus-ul tuturor jucătorilor a fost resetat!</div> <div class="resetplus-success"> Plus all the players have been reset!</div>
<?php } ?> <?php } ?>
</div> </div>
+25 -5
View File
@@ -2,6 +2,26 @@
################################################################################# #################################################################################
## MaintenenceResetPlusBonus.tpl - REDESIGN 2025 ## ## MaintenenceResetPlusBonus.tpl - REDESIGN 2025 ##
################################################################################# #################################################################################
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : maintenenceResetPlusBonus.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!"); if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
?> ?>
<style> <style>
@@ -25,7 +45,7 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
<div class="resetres-wrap"> <div class="resetres-wrap">
<div class="resetres-head"> <div class="resetres-head">
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 7h16v10H4z" fill="#27ae60"/><path d="M8 3v4M16 3v4" stroke="#16a085" stroke-width="2"/></svg> <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 7h16v10H4z" fill="#27ae60"/><path d="M8 3v4M16 3v4" stroke="#16a085" stroke-width="2"/></svg>
<h2>Maintenance</h2> <h2>Reset All Resource Bonuses</h2>
</div> </div>
<div class="resetres-card"> <div class="resetres-card">
@@ -33,7 +53,7 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
<svg viewBox="0 0 24 24"><path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"/></svg> <svg viewBox="0 0 24 24"><path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"/></svg>
</div> </div>
<h3>Reset All Resource Bonuses</h3> <h3>Reset All Resource Bonuses</h3>
<p>Această acțiune va dezactiva bonusul de 25% pentru TOATE resursele la toți jucătorii.</p> <p>This action will disable the 25% bonus for ALL resources at all players.</p>
<div class="res-icons"> <div class="res-icons">
<img src="../img/admin/r/1.gif" title="Wood"> <img src="../img/admin/r/1.gif" title="Wood">
@@ -43,10 +63,10 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
</div> </div>
<div class="danger-box"> <div class="danger-box">
⚠️ Toate bonusurile de resurse vor fi setate la 0 zile. ⚠️ All resource bonuses will be set to 0 days.
</div> </div>
<form action="../GameEngine/Admin/Mods/mainteneceResetPlusBonus.php" method="POST" class="resetres-form" onsubmit="return confirm('Ești SIGUR că vrei să resetezi bonusurile de resurse?');"> <form action="../GameEngine/Admin/Mods/mainteneceResetPlusBonus.php" method="POST" class="resetres-form" onsubmit="return confirm('Are you SURE you want to reset resource bonuses?');">
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>"> <input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
<button type="submit"> <button type="submit">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none"><path d="M3 6h18M8 6V4h8v2m-1 0v14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V6h10z" stroke="#fff" stroke-width="2" stroke-linecap="round"/></svg> <svg width="18" height="18" viewBox="0 0 24 24" fill="none"><path d="M3 6h18M8 6V4h8v2m-1 0v14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V6h10z" stroke="#fff" stroke-width="2" stroke-linecap="round"/></svg>
@@ -56,6 +76,6 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
</div> </div>
<?php if(isset($_GET['g'])){ ?> <?php if(isset($_GET['g'])){ ?>
<div class="resetres-success"> Bonusurile de resurse au fost resetate pentru toți jucătorii!</div> <div class="resetres-success"> Resource bonuses have been reset for all players!</div>
<?php } ?> <?php } ?>
</div> </div>
+223 -370
View File
@@ -2,46 +2,52 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename map.tpl ## ## Filename : map.tpl ##
## Developed by: ronix ## ## Type : Admin Panel Frontend ##
## Updated by: iopietro ## ## --------------------------------------------------------------------------- ##
## License: TravianZ Project ## ## Developed by : ronix (Original) ##
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ## ## Refactored by : iopietro ##
## ## ## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
// ----------------- PHP (logic unchanged, except $pixelDiv = 255) -----------------
$check1 = $check2 = $check3 = ""; $check1 = $check2 = $check3 = "";
$includeSize = true; $includeSize = true;
$criteria = ""; $criteria = "";
if (isset($_POST['show1']) || isset($_POST['show2']) || isset($_POST['show3'])) { if (isset($_POST['show1']) || isset($_POST['show2']) || isset($_POST['show3'])) {
$check1 = isset($_POST['show1']) ? "checked " : ""; $check1 = isset($_POST['show1'])? "checked " : "";
$check2 = isset($_POST['show2']) ? "checked " : ""; $check2 = isset($_POST['show2'])? "checked " : "";
$check3 = isset($_POST['show3']) ? "checked " : ""; $check3 = isset($_POST['show3'])? "checked " : "";
if($check1 != "" && $check2 == "" && $check3 == "") { if($check1!= "" && $check2 == "" && $check3 == "") {
$criteria = " WHERE u.tribe <> 5"; $criteria = " WHERE u.tribe <> 5";
$includeSize = false; $includeSize = false;
} }
elseif($check1 == "" && $check2 != "" && $check3 == "") { elseif($check1 == "" && $check2!= "" && $check3 == "") {
$criteria = " WHERE u.tribe = 5 AND (v.capital = 1 OR v.natar = 1)"; $criteria = " WHERE u.tribe = 5 AND (v.capital = 1 OR v.natar = 1)";
$includeSize = false; $includeSize = false;
} }
elseif($check1 != "" && $check2 != "" && $check3 == "") { elseif($check1!= "" && $check2!= "" && $check3 == "") {
$criteria = " WHERE u.tribe <> 5 OR (u.tribe = 5 AND (v.capital = 1 OR v.natar = 1))"; $criteria = " WHERE u.tribe <> 5 OR (u.tribe = 5 AND (v.capital = 1 OR v.natar = 1))";
$includeSize = false; $includeSize = false;
} }
elseif($check1 == "" && $check2 == "" && $check3 != "") { elseif($check1 == "" && $check2 == "" && $check3!= "") {
$criteria = " INNER JOIN ".TB_PREFIX."artefacts AS a ON a.vref = v.wref"; $criteria = " INNER JOIN ".TB_PREFIX."artefacts AS a ON a.vref = v.wref";
} }
elseif($check1 != "" && $check2 == "" && $check3 != ""){ elseif($check1!= "" && $check2 == "" && $check3!= ""){
$criteria = " LEFT JOIN ".TB_PREFIX."artefacts AS a ON a.vref = v.wref WHERE u.tribe <> 5 OR (u.tribe = 5 AND v.capital <> 1 AND v.natar <> 1)"; $criteria = " LEFT JOIN ".TB_PREFIX."artefacts AS a ON a.vref = v.wref WHERE u.tribe <> 5 OR (u.tribe = 5 AND v.capital <> 1 AND v.natar <> 1)";
} }
elseif($check1 == "" && $check2 != "" && $check3 != ""){ elseif($check1 == "" && $check2!= "" && $check3!= ""){
$criteria = " LEFT JOIN ".TB_PREFIX."artefacts AS a ON a.vref = v.wref WHERE u.tribe = 5"; $criteria = " LEFT JOIN ".TB_PREFIX."artefacts AS a ON a.vref = v.wref WHERE u.tribe = 5";
} }
elseif($check1 != "" && $check2 != "" && $check3 != ""){ elseif($check1!= "" && $check2!= "" && $check3!= ""){
$criteria = " LEFT JOIN ".TB_PREFIX."artefacts AS a ON a.vref = v.wref"; $criteria = " LEFT JOIN ".TB_PREFIX."artefacts AS a ON a.vref = v.wref";
} }
} }
@@ -51,414 +57,261 @@ if ($check1 == "" && $check2 == "" && $check3 == "") $criteria = "";
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title><?php echo SERVER_NAME; ?> Map</title> <title><?php echo SERVER_NAME;?> Map</title>
<link rel="stylesheet" href="../img/admin/map.css" type="text/css" media="all">
<style> <style>
:root { --map-width:510px; --map-height:510px; } /* ===== MODERN SKIN ===== */
body{margin:0;background:#f1f5f9;font-family:system-ui,-apple-system,Segoe UI,Roboto;color:#0f172a}
.map-wrap{max-width:1200px;margin:16px auto;padding:0 12px}
.map-header{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:14px 18px;margin-bottom:14px;box-shadow:0 1px 3px rgba(0,0,0,.05)}
.map-header h2{margin:0 0 4px;font-size:20px;font-weight:800}
.map-header p{margin:0;color:#64748b;font-size:13px}
.map-filters{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:12px 16px;margin-bottom:14px;display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.filter-group{display:flex;align-items:center;gap:8px}
.filter-group label{font-size:13px;font-weight:500;cursor:pointer}
.filter-group input{width:16px;height:16px;accent-color:#0f172a;cursor:pointer}
.btn-show{background:#0f172a;color:#fff;border:0;padding:7px 14px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;transition:.2s}
.btn-show:hover{background:#1e293b;transform:translateY(-1px)}
/* Container */ .map-layout{display:grid;grid-template-columns:1fr 240px;gap:14px;align-items:start}
#map { @media(max-width:900px){.map-layout{grid-template-columns:1fr}}
width: 510px; height: 510px; position: relative; overflow: hidden;
border: 1px solid #333; background: #f3f3f3;
}
#map.grab { cursor: grab; } #map.grabbing { cursor: grabbing; }
/* World layer that we translate/scale */ /* MAP CONTAINER - untouched logic */
#map_bg { #map {width:510px;height:510px;position:relative;overflow:hidden;border:1px solid #cbd5e1;background:#f8fafc;border-radius:12px;box-shadow:0 4px 12px rgba(0,0,0,.08)}
position:absolute; inset:0; width:var(--map-width); height:var(--map-height); #map.grab{cursor:grab} #map.grabbing{cursor:grabbing}
transform-origin:0 0; will-change:transform; transition: transform 80ms ease; #map_bg{position:absolute;inset:0;width:510px;height:510px;transform-origin:0 0;will-change:transform;transition:transform 80ms ease;--zoom:1}
--zoom:1; #gridSvg{position:absolute;inset:0;pointer-events:none}
} #gridSvg line{vector-effect:non-scaling-stroke;shape-rendering:crispEdges}
#gridSvg.minor{stroke:rgba(0,0,0,.08);stroke-width:1}
#gridSvg.major{stroke:rgba(0,0,0,.18);stroke-width:1}
.marker{position:absolute;transform:translate(-50%,-50%)}
#map_bg.pin{transform-origin:center;transform:scale(calc(1/var(--zoom)));cursor:pointer}
/* CRISP GRID (SVG lines) */ /* Zoom controls modern */
#gridSvg { position:absolute; inset:0; pointer-events:none; } .zoom-controls{position:absolute;top:10px;right:10px;display:flex;gap:6px;align-items:center;z-index:1000;background:#fff;padding:6px 8px;border-radius:10px;box-shadow:0 4px 12px rgba(0,0,0,.15);border:1px solid #e5e7eb}
#gridSvg line { vector-effect: non-scaling-stroke; shape-rendering: crispEdges; } .zoom-controls button{font-size:13px;padding:6px 9px;border-radius:6px;border:1px solid #e2e8f0;background:#f8fafc;cursor:pointer;font-weight:600;transition:.15s}
#gridSvg .minor { stroke: rgba(0,0,0,0.12); stroke-width: 1; } .zoom-controls button:hover{background:#e2e8f0}
#gridSvg .major { stroke: rgba(0,0,0,0.25); stroke-width: 1; } .zoom-controls span{min-width:52px;text-align:center;font:12px system-ui;font-weight:600;color:#334155}
/* Markers centered on coords; keep constant size visually */ /* Axis */
.marker { position:absolute; transform: translate(-50%,-50%); } .zoomlevels span{position:absolute;font:11px system-ui;color:#64748b;font-weight:600;background:rgba(255,255,255,.9);padding:2px 5px;border-radius:4px}
#map_bg .pin { transform-origin:center; transform: scale(calc(1 / var(--zoom))); cursor:pointer; } #zl{left:6px;top:50%;transform:translateY(-50%)} #zr{right:6px;top:50%;transform:translateY(-50%)}
#zo{right:50%;top:6px;transform:translateX(50%)} #zb{right:50%;bottom:6px;transform:translateX(50%)}
#zc{left:50%;top:50%;transform:translate(-50%,-50%)}
#lijn_hor,#lijn_ver{position:absolute;background:#94a3b8;opacity:.4}
#lijn_hor{left:0;right:0;top:50%;height:1px} #lijn_ver{top:0;bottom:0;left:50%;width:1px}
/* Zoom controls */ /* Legend cards */
.zoom-controls { .legend-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;margin-bottom:12px;box-shadow:0 1px 3px rgba(0,0,0,.05)}
position:absolute; top:8px; right:8px; display:flex; gap:6px; align-items:center; .legend-head{background:#0f172a;color:#fff;padding:8px 12px;font-size:13px;font-weight:700}
z-index:1000; background:rgba(255,255,255,.9); padding:6px 8px; border-radius:8px; .legend-body{padding:10px 12px}
box-shadow:0 2px 6px rgba(0,0,0,.15); user-select:none; .legend-body table{width:100%;border-collapse:collapse}
} .legend-body td{padding:4px 0;font-size:12px}
.zoom-controls button { font-size:12px; padding:6px 10px; border-radius:6px; border:1px solid #ccc; background:#f7f7f7; cursor:pointer; } .legend-body td:first-child{width:20px}
.zoom-controls span { min-width:56px; text-align:center; font:12px system-ui,Arial; } .legend-body img{width:11px;height:11px;display:block}
/* Axis labels & crosshair */ /* Tooltip */
.zoomlevels span { position:absolute; font:12px Arial; color:#000; } .p_info{list-style:none;margin:0;padding:0}
#zl { left:2px; top:50%; transform:translateY(-50%); } .p_info li{margin:3px 0;font-size:12px}
#zr { right:2px; top:50%; transform:translateY(-50%); } .p_actions{margin-top:8px;display:flex;gap:6px}
#zo { right:50%; top:2px; transform:translateX(50%); } .p_btn{display:inline-block;font:12px/1 system-ui;padding:5px 9px;border:1px solid #e2e8f0;border-radius:6px;background:#f8fafc;color:#0f172a;text-decoration:none;font-weight:500}
#zb { right:50%; bottom:2px; transform:translateX(50%); } .p_btn:hover{background:#e2e8f0}
#zc { left:50%; top:50%; transform:translate(-50%,-50%); background:rgba(255,255,255,.85); padding:2px 4px; border-radius:4px; } #tipBackdrop{position:absolute;inset:0;display:none;z-index:1099;background:transparent}
#lijn_hor,#lijn_ver { position:absolute; background:#666; opacity:.5; } #stickyTip{position:absolute;z-index:1100;display:none;max-width:300px;background:#fff;border:1px solid #cbd5e1;border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.18);padding:10px 12px}
#lijn_hor { left:0; right:0; top:50%; height:1px; } .badge-tribe{display:inline-block;padding:1px 6px;border-radius:5px;font-size:10.5px;font-weight:600;background:#e2e8f0;color:#334155}
#lijn_ver { top:0; bottom:0; left:50%; width:1px; }
/* Ensure tooltip list looks same for hover & sticky */
.p_info { list-style:none; margin:0; padding:0; }
.p_info li { margin:2px 0; }
/* Buttons inside tooltip */
.p_actions { margin-top:6px; display:flex; gap:6px; }
.p_btn {
display:inline-block; font:12px/1 Arial; padding:4px 8px;
border:1px solid #bbb; border-radius:6px; background:#fff; color:#2a2a2a; text-decoration:none;
}
.p_btn:hover { background:#f2f2f2; }
/* Sticky tooltip (same style family as your hover) */
#tipBackdrop { position:absolute; inset:0; display:none; z-index:1099; background:transparent; }
#stickyTip {
position:absolute; z-index:1100; display:none; max-width:320px;
background:#fff; border:1px solid #aaa; border-radius:8px;
box-shadow:0 8px 24px rgba(0,0,0,.25); padding:8px 10px;
}
</style> </style>
</head> </head>
<body> <body>
<div id="start"> <div class="map-wrap">
<div class="clear"><h2 class="left"><?php echo SERVER_NAME;?> Map!</h2></div> <div class="map-header">
<p>This is the map of <?php echo SERVER_NAME;?>. Search and find players.</p> <h2><?php echo SERVER_NAME;?> Map</h2>
<p>Interactive world map search players, villages and artifacts</p>
</div>
<h1>Show Option</h1> <form id="show" action="admin.php?p=map" method="POST" class="map-filters">
<form id="show" name="show" action="admin.php?p=map" method="POST"> <div class="filter-group">
<table width="70%"><tr> <input id="show1" name="show1" type="checkbox" <?php echo $check1;?> value="1">
<td><input id="show1" name="show1" type="checkbox" <?php echo $check1;?> value="1">Players</td> <label for="show1">Players</label>
<td><input id="show2" name="show2" type="checkbox" <?php echo $check2;?> value="2"><?php echo TRIBE5; ?></td> </div>
<td><input id="show3" name="show3" type="checkbox" <?php echo $check3;?> value="2">Artifacts</td> <div class="filter-group">
<td><input id="btnshow" type="submit" value="Show" style="font-size:9px"></td> <input id="show2" name="show2" type="checkbox" <?php echo $check2;?> value="2">
</tr></table> <label for="show2"><?php echo TRIBE5;?></label>
</div>
<div class="filter-group">
<input id="show3" name="show3" type="checkbox" <?php echo $check3;?> value="2">
<label for="show3">Artifacts</label>
</div>
<button type="submit" class="btn-show">Apply Filters</button>
</form> </form>
</div>
<div id="kaart"> <div class="map-layout">
<div id="map" class="grab" title=""> <div>
<!-- Zoom UI --> <div id="map" class="grab">
<div class="zoom-controls"> <div class="zoom-controls">
<button type="button" id="zoomOut"></button> <button type="button" id="zoomOut"></button>
<span id="zoomLabel">100%</span> <span id="zoomLabel">100%</span>
<button type="button" id="zoomIn">+</button> <button type="button" id="zoomIn">+</button>
<button type="button" id="zoomReset">Reset</button> <button type="button" id="zoomReset">Reset</button>
</div> </div>
<div class="zoomlevels">
<div class="zoomlevels"> <span id="zl">-<?php echo WORLD_MAX;?></span>
<span id="zl">-<?php echo WORLD_MAX;?></span> <span id="zr"><?php echo WORLD_MAX;?></span>
<span id="zr"><?php echo WORLD_MAX;?></span> <span id="zb"><?php echo WORLD_MAX;?></span>
<span id="zb"><?php echo WORLD_MAX;?></span> <span id="zo">-<?php echo WORLD_MAX;?></span>
<span id="zo">-<?php echo WORLD_MAX;?></span> <span id="zc">(0,0)</span>
<span id="zc">(0,0)</span> <div id="lijn_hor"></div>
<div id="lijn_hor"></div> <div id="lijn_ver"></div>
<div id="lijn_ver"></div> </div>
</div> <div id="map_bg">
<svg id="gridSvg" width="510" height="510" aria-hidden="true"></svg>
<!-- World layer --> <?php
<div id="map_bg"> if ($criteria!= "") {
<!-- Grid --> $artifactsEffect = ['-', VILLAGE_EFFECT, ACCOUNT_EFFECT, UNIQUE_EFFECT];
<svg id="gridSvg" width="510" height="510" aria-hidden="true"></svg> $array_tribe = ['-', TRIBE1, TRIBE2, TRIBE3, TRIBE4, TRIBE5, TRIBE6];
$q = "SELECT v.wref, v.owner, v.name, v.capital, v.pop, u.username, u.tribe, u.access, w.x, w.y"
<?php . ($includeSize? ", a.size" : "")
if ($criteria != "") { . " FROM ".TB_PREFIX."vdata AS v"
$artifactsEffect = ['-', VILLAGE_EFFECT, ACCOUNT_EFFECT, UNIQUE_EFFECT]; . " LEFT JOIN ".TB_PREFIX."users AS u ON v.owner = u.id"
$array_tribe = ['-', TRIBE1, TRIBE2, TRIBE3, TRIBE4, TRIBE5, TRIBE6]; . " LEFT JOIN ".TB_PREFIX."wdata AS w ON v.wref = w.id "
. $criteria;
$q = "SELECT v.wref, v.owner, v.name, v.capital, v.pop, u.username, u.tribe, u.access, w.x, w.y" $player_info = $database->query_return($q);
. ($includeSize ? ", a.size" : "") foreach ($player_info as $p_array) {
. " FROM ".TB_PREFIX."vdata AS v" $p_name = htmlspecialchars($p_array['username'], ENT_QUOTES);
. " LEFT JOIN ".TB_PREFIX."users AS u ON v.owner = u.id" $p_village = htmlspecialchars($p_array['name'], ENT_QUOTES);
. " LEFT JOIN ".TB_PREFIX."wdata AS w ON v.wref = w.id " $p_pop = (int)$p_array['pop'];
. $criteria; $p_tribe = $array_tribe[$p_array['tribe']];
$did = (int)$p_array['wref'];
$player_info = $database->query_return($q); $uid = (int)$p_array['owner'];
$x = (int)$p_array['x'];
foreach ($player_info as $p_array) { $y = (int)$p_array['y'];
$p_name = htmlspecialchars($p_array['username'], ENT_QUOTES); $imgName = "../img/admin/map_".(isset($p_array['size'])? "1".$p_array['size'] : ($p_array['access']!= ADMIN? $p_array['tribe'] : 0)).".gif";
$p_village= htmlspecialchars($p_array['name'], ENT_QUOTES); $pixelDiv = 255;
$p_pop = (int)$p_array['pop']; $xdiv = $pixelDiv / WORLD_MAX;
$p_tribe = $array_tribe[$p_array['tribe']]; $p_x = $pixelDiv + ($x * $xdiv);
$did = (int)$p_array['wref']; $p_y = $pixelDiv - ($y * $xdiv);
$uid = (int)$p_array['owner']; $tooltip = "<ul class='p_info'>";
$x = (int)$p_array['x']; $tooltip.= "<li>Player: <b>{$p_name}</b></li>";
$y = (int)$p_array['y']; $tooltip.= "<li>Village: <b>{$p_village}</b></li>";
$tooltip.= "<li>Coord: <b>({$x}|{$y})</b></li>";
$imgName = "../img/admin/map_".(isset($p_array['size']) ? "1".$p_array['size'] : ($p_array['access'] != ADMIN ? $p_array['tribe'] : 0)).".gif"; $tooltip.= "<li>Pop: <b>{$p_pop}</b></li>";
$tooltip.= "<li>Tribe: <b>{$p_tribe}</b></li>";
// world to pixels (510x510 world; center 255,255) if ($check3!= "" && isset($p_array['size'])) {
$pixelDiv = 255; $tooltip.= "<li>Artifact: <b>".$artifactsEffect[$p_array['size']]."</b></li>";
$xdiv = $pixelDiv / WORLD_MAX; }
$p_x = $pixelDiv + ($x * $xdiv); $tooltip.= "</ul>";
$p_y = $pixelDiv - ($y * $xdiv); $tooltip.= "<div class='p_actions'>"
. "<a class='p_btn' href='?p=village&did={$did}' target='_blank'>Village</a>"
// Tooltip HTML (shared by hover & sticky) . "<a class='p_btn' href='?p=player&uid={$uid}' target='_blank'>Profile</a>"
$tooltip = "<ul class='p_info'>"; . "</div>";
$tooltip .= "<li>Player name: <b>{$p_name}</b></li>"; $tooltipHover = str_replace(["\\", "'"], ["\\\\", "\\'"], $tooltip);
$tooltip .= "<li>Village name : <b>{$p_village}</b></li>"; $tooltipAttr = htmlspecialchars($tooltip, ENT_QUOTES);
$tooltip .= "<li>Coordinate: <b>({$x}|{$y})</b></li>"; echo '<div class="marker" style="left:'.$p_x.'px; top:'.$p_y.'px;" data-tip="'.$tooltipAttr.'">'
$tooltip .= "<li>Population: <b>{$p_pop}</b></li>"; . '<img class="pin" src="'.$imgName.'" border="0" '
$tooltip .= "<li>Tribe: <b>{$p_tribe}</b></li>"; . ' onmouseout="med_closeDescription()" '
if ($check3 != "" && isset($p_array['size'])) { . " onmousemove=\"med_mouseMoveHandler(arguments[0], '".$tooltipHover."')\" "
$tooltip .= "<li>Artifact effect: <b>".$artifactsEffect[$p_array['size']]."</b></li>"; . '>'
. '</div>';
} }
$tooltip .= "</ul>"; }
$tooltip .= "<div class='p_actions'>" ?>
. "<a class='p_btn' href='?p=village&did={$did}' target='_blank' rel='noopener'>Open village</a>" </div>
. "<a class='p_btn' href='?p=player&uid={$uid}' target='_blank' rel='noopener'>Open profile</a>" <div id="tipBackdrop"></div>
. "</div>"; <div id="stickyTip"></div>
// JS string version for hover (escape quotes and backslashes)
$tooltipHover = str_replace(["\\", "'"], ["\\\\", "\\'"], $tooltip);
// Attribute version for sticky (HTML-encode quotes)
$tooltipAttr = htmlspecialchars($tooltip, ENT_QUOTES);
echo '<div class="marker" style="left:'.$p_x.'px; top:'.$p_y.'px;" data-tip="'.$tooltipAttr.'">'
. '<img class="pin" src="'.$imgName.'" border="0" '
. ' onmouseout="med_closeDescription()" '
. " onmousemove=\"med_mouseMoveHandler(arguments[0], '".$tooltipHover."')\" "
. '>'
. '</div>';
}
}
?>
</div>
<!-- Sticky tooltip containers -->
<div id="tipBackdrop"></div>
<div id="stickyTip"></div>
</div>
<div id="legenda">
<div class="content">
<h3>Legend</h3>
<div id="items">
<div class="first"></div>
<table>
<tr><td><img src="../img/admin/map_1.gif" height="11" width="11"></td><td class="show"><?php echo TRIBE1;?></td></tr>
<tr><td><img src="../img/admin/map_2.gif" height="11" width="11"></td><td class="show"><?php echo TRIBE2;?></td></tr>
<tr><td><img src="../img/admin/map_3.gif" height="11" width="11"></td><td class="show"><?php echo TRIBE3;?></td></tr>
<tr><td><img src="../img/admin/map_5.gif" height="11" width="11"></td><td class="show"><?php echo TRIBE5;?></td></tr>
<tr><td><img src="../img/admin/map_0.gif" height="11" width="11"></td><td class="show">Multihunters</td></tr>
</table>
</div> </div>
</div> </div>
</div>
<div id="legenda"> <div>
<div class="content"> <div class="legend-card">
<h3>Artifacts Legend</h3> <div class="legend-head">Tribes</div>
<div id="items"> <div class="legend-body">
<div class="first"></div> <table>
<table> <tr><td><img src="../img/admin/map_1.gif"></td><td><?php echo TRIBE1;?></td></tr>
<tr><td><img src="../img/admin/map_11.gif" height="11" width="11"></td><td class="show"><?php echo VILLAGE_EFFECT;?></td></tr> <tr><td><img src="../img/admin/map_2.gif"></td><td><?php echo TRIBE2;?></td></tr>
<tr><td><img src="../img/admin/map_12.gif" height="11" width="11"></td><td class="show"><?php echo ACCOUNT_EFFECT;?></td></tr> <tr><td><img src="../img/admin/map_3.gif"></td><td><?php echo TRIBE3;?></td></tr>
<tr><td><img src="../img/admin/map_13.gif" height="11" width="11"></td><td class="show"><?php echo UNIQUE_EFFECT;?></td></tr> <tr><td><img src="../img/admin/map_5.gif"></td><td><?php echo TRIBE5;?></td></tr>
</table> <tr><td><img src="../img/admin/map_0.gif"></td><td>Multihunters</td></tr>
</table>
</div>
<div class="legend-card">
<div class="legend-head">Artifacts</div>
<div class="legend-body">
<table>
<tr><td><img src="../img/admin/map_11.gif"></td><td><?php echo VILLAGE_EFFECT;?></td></tr>
<tr><td><img src="../img/admin/map_12.gif"></td><td><?php echo ACCOUNT_EFFECT;?></td></tr>
<tr><td><img src="../img/admin/map_13.gif"></td><td><?php echo UNIQUE_EFFECT;?></td></tr>
</table>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- ===================== JS: crisp SVG grid + clamped pan + cursor zoom + sticky tooltip ===================== -->
<script> <script>
// === JS ORIGINAL - NEMODIFICAT ===
(function () { (function () {
const map = document.getElementById('map'); const map = document.getElementById('map');
const layer = document.getElementById('map_bg'); const layer = document.getElementById('map_bg');
const grid = document.getElementById('gridSvg'); const grid = document.getElementById('gridSvg');
const zl = document.getElementById('zl'); const zr = document.getElementById('zr');
const zl = document.getElementById('zl'); const zo = document.getElementById('zo'); const zb = document.getElementById('zb'); const zc = document.getElementById('zc');
const zr = document.getElementById('zr'); const zoomInBtn = document.getElementById('zoomIn'); const zoomOutBtn = document.getElementById('zoomOut');
const zo = document.getElementById('zo'); const zoomResetBtn = document.getElementById('zoomReset'); const zoomLabel = document.getElementById('zoomLabel');
const zb = document.getElementById('zb'); const sticky = document.getElementById('stickyTip'); const stickyBackdrop = document.getElementById('tipBackdrop');
const zc = document.getElementById('zc'); const WORLD_MAX = <?php echo json_encode(WORLD_MAX);?>;
const baseW = 510; const baseH = 510;
const zoomInBtn = document.getElementById('zoomIn'); const pixelDiv = baseW / 2; const xdiv = pixelDiv / WORLD_MAX;
const zoomOutBtn = document.getElementById('zoomOut');
const zoomResetBtn = document.getElementById('zoomReset');
const zoomLabel = document.getElementById('zoomLabel');
const sticky = document.getElementById('stickyTip');
const stickyBackdrop = document.getElementById('tipBackdrop');
const WORLD_MAX = <?php echo json_encode(WORLD_MAX); ?>;
// Base sizes (match CSS)
const baseW = parseFloat(getComputedStyle(layer).getPropertyValue('--map-width')) || 510;
const baseH = parseFloat(getComputedStyle(layer).getPropertyValue('--map-height')) || 510;
// World->pixel conversion (0,0 at center)
const pixelDiv = baseW / 2; // 255
const xdiv = pixelDiv / WORLD_MAX; // px per world unit
// Build SVG grid (even, crisp)
function buildGrid() { function buildGrid() {
const MAJOR_UNIT = 10; const MAJOR_UNIT = 10;
grid.setAttribute('viewBox', `0 0 ${baseW} ${baseH}`); grid.setAttribute('viewBox', `0 0 ${baseW} ${baseH}`); grid.innerHTML = "";
grid.innerHTML = "";
for (let x = -WORLD_MAX; x <= WORLD_MAX; x++) { for (let x = -WORLD_MAX; x <= WORLD_MAX; x++) {
const px = pixelDiv + x * xdiv; const px = pixelDiv + x * xdiv;
const v = document.createElementNS('http://www.w3.org/2000/svg','line'); const v = document.createElementNS('http://www.w3.org/2000/svg','line');
v.setAttribute('x1',px); v.setAttribute('y1',0); v.setAttribute('x1',px); v.setAttribute('y1',0); v.setAttribute('x2',px); v.setAttribute('y2',baseH);
v.setAttribute('x2',px); v.setAttribute('y2',baseH); v.setAttribute('class', (x % MAJOR_UNIT === 0)? 'major' : 'minor'); grid.appendChild(v);
v.setAttribute('class', (x % MAJOR_UNIT === 0) ? 'major' : 'minor');
grid.appendChild(v);
} }
for (let y = -WORLD_MAX; y <= WORLD_MAX; y++) { for (let y = -WORLD_MAX; y <= WORLD_MAX; y++) {
const py = pixelDiv - y * xdiv; const py = pixelDiv - y * xdiv;
const h = document.createElementNS('http://www.w3.org/2000/svg','line'); const h = document.createElementNS('http://www.w3.org/2000/svg','line');
h.setAttribute('x1',0); h.setAttribute('y1',py); h.setAttribute('x1',0); h.setAttribute('y1',py); h.setAttribute('x2',baseW); h.setAttribute('y2',py);
h.setAttribute('x2',baseW); h.setAttribute('y2',py); h.setAttribute('class', (y % MAJOR_UNIT === 0)? 'major' : 'minor'); grid.appendChild(h);
h.setAttribute('class', (y % MAJOR_UNIT === 0) ? 'major' : 'minor');
grid.appendChild(h);
} }
} }
buildGrid(); buildGrid();
const STEP_SCALE = 1.25; const MAX_Z = 16; let MIN_Z = 0;
// Zoom levels
const STEP_SCALE = 1.25;
const MAX_Z = 16;
let MIN_Z = 0;
function sFromLvl(lvl){ return Math.pow(STEP_SCALE, lvl); } function sFromLvl(lvl){ return Math.pow(STEP_SCALE, lvl); }
// Clamp pan to avoid blank
function clampPan() { function clampPan() {
const s = sFromLvl(zoomLevel); const s = sFromLvl(zoomLevel); const scaledW = baseW * s; const scaledH = baseH * s;
const scaledW = baseW * s; if (scaledW <= map.clientWidth) { tx = (map.clientWidth - scaledW) / 2; } else { const minTx = map.clientWidth - scaledW; tx = Math.max(minTx, Math.min(tx, 0)); }
const scaledH = baseH * s; if (scaledH <= map.clientHeight) { ty = (map.clientHeight - scaledH) / 2; } else { const minTy = map.clientHeight - scaledH; ty = Math.max(minTy, Math.min(ty, 0)); }
if (scaledW <= map.clientWidth) {
tx = (map.clientWidth - scaledW) / 2;
} else {
const minTx = map.clientWidth - scaledW;
tx = Math.max(minTx, Math.min(tx, 0));
}
if (scaledH <= map.clientHeight) {
ty = (map.clientHeight - scaledH) / 2;
} else {
const minTy = map.clientHeight - scaledH;
ty = Math.max(minTy, Math.min(ty, 0));
}
} }
function applyTransform(){ clampPan(); const s = sFromLvl(zoomLevel); layer.style.setProperty('--zoom', s); layer.style.transform = `translate(${tx}px, ${ty}px) scale(${s})`; zoomLabel.textContent = Math.round(s*100) + '%'; updateAxes(); }
function applyTransform(){ function screenToWorld(localX, localY){ const s = sFromLvl(zoomLevel); const lx = (localX - tx) / s; const ly = (localY - ty) / s; return { x: (lx - pixelDiv) / xdiv, y: (pixelDiv - ly) / xdiv }; }
clampPan(); function updateAxes(){ const w=map.clientWidth, h=map.clientHeight; const left = screenToWorld(0,h/2).x, right = screenToWorld(w,h/2).x; const top = screenToWorld(w/2,0).y, bottom = screenToWorld(w/2,h).y; const center = screenToWorld(w/2,h/2); zl.textContent=Math.round(left); zr.textContent=Math.round(right); zo.textContent=Math.round(top); zb.textContent=Math.round(bottom); zc.textContent=`(${Math.round(center.x)},${Math.round(center.y)})`; }
const s = sFromLvl(zoomLevel); function computeMinLevel(){ const fit = Math.max(map.clientWidth / baseW, map.clientHeight / baseH); let lvl=0, s=1; if (fit >= 1) { while (s < fit) { s *= STEP_SCALE; lvl++; } } else { while (s / STEP_SCALE >= fit) { s /= STEP_SCALE; lvl--; } } MIN_Z = lvl; }
layer.style.setProperty('--zoom', s);
layer.style.transform = `translate(${tx}px, ${ty}px) scale(${s})`;
zoomLabel.textContent = Math.round(s*100) + '%';
updateAxes();
}
// Map-local px -> world coords
function screenToWorld(localX, localY){
const s = sFromLvl(zoomLevel);
const lx = (localX - tx) / s;
const ly = (localY - ty) / s;
return { x: (lx - pixelDiv) / xdiv, y: (pixelDiv - ly) / xdiv };
}
function updateAxes(){
const w=map.clientWidth, h=map.clientHeight;
const left = screenToWorld(0,h/2).x, right = screenToWorld(w,h/2).x;
const top = screenToWorld(w/2,0).y, bottom = screenToWorld(w/2,h).y;
const center = screenToWorld(w/2,h/2);
zl.textContent=Math.round(left); zr.textContent=Math.round(right);
zo.textContent=Math.round(top); zb.textContent=Math.round(bottom);
zc.textContent=`(${Math.round(center.x)},${Math.round(center.y)})`;
}
function computeMinLevel(){
const fit = Math.max(map.clientWidth / baseW, map.clientHeight / baseH);
let lvl=0, s=1;
if (fit >= 1) { while (s < fit) { s *= STEP_SCALE; lvl++; } }
else { while (s / STEP_SCALE >= fit) { s /= STEP_SCALE; lvl--; } }
MIN_Z = lvl;
}
function clampLevel(next){ return Math.min(MAX_Z, Math.max(MIN_Z, next)); } function clampLevel(next){ return Math.min(MAX_Z, Math.max(MIN_Z, next)); }
function toLocal(e){ const r = map.getBoundingClientRect(); return { x:e.clientX-r.left, y:e.clientY-r.top }; } function toLocal(e){ const r = map.getBoundingClientRect(); return { x:e.clientX-r.left, y:e.clientY-r.top }; }
function zoomAt(deltaLevel, localX, localY){ const newLevel = clampLevel(zoomLevel + deltaLevel); if (newLevel === zoomLevel) return; const oldS = sFromLvl(zoomLevel), newS = sFromLvl(newLevel); const lx = (localX - tx) / oldS, ly = (localY - ty) / oldS; tx = localX - lx * newS; ty = localY - ly * newS; zoomLevel = newLevel; applyTransform(); }
// Zoom toward cursor
function zoomAt(deltaLevel, localX, localY){
const newLevel = clampLevel(zoomLevel + deltaLevel);
if (newLevel === zoomLevel) return;
const oldS = sFromLvl(zoomLevel), newS = sFromLvl(newLevel);
const lx = (localX - tx) / oldS, ly = (localY - ty) / oldS;
tx = localX - lx * newS; ty = localY - ly * newS;
zoomLevel = newLevel; applyTransform();
}
function zoomBy(delta){ zoomAt(delta, map.clientWidth/2, map.clientHeight/2); } function zoomBy(delta){ zoomAt(delta, map.clientWidth/2, map.clientHeight/2); }
// State
let zoomLevel = 0, tx = 0, ty = 0; let zoomLevel = 0, tx = 0, ty = 0;
zoomInBtn.addEventListener('click', ()=>zoomBy(+1)); zoomOutBtn.addEventListener('click', ()=>zoomBy(-1));
// Controls zoomResetBtn.addEventListener('click', ()=>{ computeMinLevel(); zoomLevel = MIN_Z; const s = sFromLvl(zoomLevel); tx = (map.clientWidth - baseW * s) / 2; ty = (map.clientHeight - baseH * s) / 2; applyTransform(); });
zoomInBtn.addEventListener('click', ()=>zoomBy(+1));
zoomOutBtn.addEventListener('click', ()=>zoomBy(-1));
zoomResetBtn.addEventListener('click', ()=>{
computeMinLevel(); zoomLevel = MIN_Z;
const s = sFromLvl(zoomLevel);
tx = (map.clientWidth - baseW * s) / 2;
ty = (map.clientHeight - baseH * s) / 2;
applyTransform();
});
// Wheel / dblclick
map.addEventListener('wheel', (e)=>{ e.preventDefault(); const p=toLocal(e); zoomAt(e.deltaY<0?+1:-1, p.x,p.y); }, {passive:false}); map.addEventListener('wheel', (e)=>{ e.preventDefault(); const p=toLocal(e); zoomAt(e.deltaY<0?+1:-1, p.x,p.y); }, {passive:false});
map.addEventListener('dblclick', (e)=>{ e.preventDefault(); const p=toLocal(e); zoomAt(e.shiftKey?-1:+1, p.x,p.y); }); map.addEventListener('dblclick', (e)=>{ e.preventDefault(); const p=toLocal(e); zoomAt(e.shiftKey?-1:+1, p.x,p.y); });
// Drag pan
let dragging=false, lastX=0, lastY=0; let dragging=false, lastX=0, lastY=0;
map.addEventListener('mousedown',(e)=>{ if(e.button!==0) return; dragging=true; map.classList.add('grabbing'); const p=toLocal(e); lastX=p.x; lastY=p.y; }); map.addEventListener('mousedown',(e)=>{ if(e.button!==0) return; dragging=true; map.classList.add('grabbing'); const p=toLocal(e); lastX=p.x; lastY=p.y; });
window.addEventListener('mousemove',(e)=>{ if(!dragging) return; const p=toLocal(e); tx+=(p.x-lastX); ty+=(p.y-lastY); lastX=p.x; lastY=p.y; applyTransform(); }); window.addEventListener('mousemove',(e)=>{ if(!dragging) return; const p=toLocal(e); tx+=(p.x-lastX); ty+=(p.y-lastY); lastX=p.x; lastY=p.y; applyTransform(); });
window.addEventListener('mouseup',()=>{ dragging=false; map.classList.remove('grabbing'); }); window.addEventListener('mouseup',()=>{ dragging=false; map.classList.remove('grabbing'); });
map.addEventListener('mouseleave',()=>{ dragging=false; map.classList.remove('grabbing'); }); map.addEventListener('mouseleave',()=>{ dragging=false; map.classList.remove('grabbing'); });
// Touch
map.addEventListener('touchstart',(e)=>{ if(e.touches.length===1){ const t=e.touches[0], r=map.getBoundingClientRect(); dragging=true; map.classList.add('grabbing'); lastX=t.clientX-r.left; lastY=t.clientY-r.top; } }, {passive:true}); map.addEventListener('touchstart',(e)=>{ if(e.touches.length===1){ const t=e.touches[0], r=map.getBoundingClientRect(); dragging=true; map.classList.add('grabbing'); lastX=t.clientX-r.left; lastY=t.clientY-r.top; } }, {passive:true});
map.addEventListener('touchmove',(e)=>{ if(dragging && e.touches.length===1){ const t=e.touches[0], r=map.getBoundingClientRect(); const x=t.clientX-r.left, y=t.clientY-r.top; tx+=(x-lastX); ty+=(y-lastY); lastX=x; lastY=y; applyTransform(); e.preventDefault(); } }, {passive:false}); map.addEventListener('touchmove',(e)=>{ if(dragging && e.touches.length===1){ const t=e.touches[0], r=map.getBoundingClientRect(); const x=t.clientX-r.left, y=t.clientY-r.top; tx+=(x-lastX); ty+=(y-lastY); lastX=x; lastY=y; applyTransform(); e.preventDefault(); } }, {passive:false});
map.addEventListener('touchend',()=>{ dragging=false; map.classList.remove('grabbing'); }); map.addEventListener('touchend',()=>{ dragging=false; map.classList.remove('grabbing'); });
computeMinLevel(); zoomLevel = MIN_Z; tx = (map.clientWidth - baseW) / 2; ty = (map.clientHeight - baseH) / 2; applyTransform();
// Init
computeMinLevel(); zoomLevel = MIN_Z;
tx = (map.clientWidth - baseW) / 2; ty = (map.clientHeight - baseH) / 2; applyTransform();
window.addEventListener('resize', ()=>{ computeMinLevel(); if(zoomLevel<MIN_Z) zoomLevel=MIN_Z; applyTransform(); }); window.addEventListener('resize', ()=>{ computeMinLevel(); if(zoomLevel<MIN_Z) zoomLevel=MIN_Z; applyTransform(); });
function openSticky(html, localX, localY){ sticky.innerHTML = html; sticky.style.display = 'block'; const rect = sticky.getBoundingClientRect(); const W = rect.width || 280, H = rect.height || 140; let left = localX + 12, top = localY + 12; left = Math.max(8, Math.min(left, map.clientWidth - W - 8)); top = Math.max(8, Math.min(top, map.clientHeight - H - 8)); sticky.style.left = left + 'px'; sticky.style.top = top + 'px'; stickyBackdrop.style.display = 'block'; }
// Sticky tooltip behavior
function openSticky(html, localX, localY){
sticky.innerHTML = html;
sticky.style.display = 'block';
const rect = sticky.getBoundingClientRect();
const W = rect.width || 280, H = rect.height || 140;
let left = localX + 12, top = localY + 12;
left = Math.max(8, Math.min(left, map.clientWidth - W - 8));
top = Math.max(8, Math.min(top, map.clientHeight - H - 8));
sticky.style.left = left + 'px';
sticky.style.top = top + 'px';
stickyBackdrop.style.display = 'block';
}
function closeSticky(){ sticky.style.display='none'; stickyBackdrop.style.display='none'; sticky.innerHTML=''; } function closeSticky(){ sticky.style.display='none'; stickyBackdrop.style.display='none'; sticky.innerHTML=''; }
stickyBackdrop.addEventListener('click', closeSticky); stickyBackdrop.addEventListener('click', closeSticky); document.addEventListener('keydown', (e)=>{ if(e.key==='Escape') closeSticky(); }); sticky.addEventListener('click', (e)=> e.stopPropagation());
document.addEventListener('keydown', (e)=>{ if(e.key==='Escape') closeSticky(); }); layer.addEventListener('click', (e)=>{ const marker = e.target.closest('.marker'); if(!marker) return; const html = marker.getAttribute('data-tip'); if(!html) return; const r = map.getBoundingClientRect(); openSticky(html, e.clientX - r.left, e.clientY - r.top); });
sticky.addEventListener('click', (e)=> e.stopPropagation());
// Click marker -> sticky tooltip (uses clean HTML from data-tip)
layer.addEventListener('click', (e)=>{
const marker = e.target.closest('.marker'); if(!marker) return;
const html = marker.getAttribute('data-tip'); if(!html) return;
const r = map.getBoundingClientRect();
openSticky(html, e.clientX - r.left, e.clientY - r.top);
});
})(); })();
</script> </script>
</body> </body>
</html> </html>
+141 -297
View File
@@ -1,336 +1,180 @@
<h1 class="left">Check &#38; Edit Map Tile</h1> <h1 class="left">Check & Edit Map Tile</h1>
<?php <?php
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename map_tile.tpl ## ## Filename : map_tile.tpl ##
## Developed by: Taras ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
function get_map_tile_info($coord_x, $coord_y){ // todo mv to queries file function get_map_tile_info($coord_x, $coord_y){
$tbp = TB_PREFIX; $tbp = TB_PREFIX;
$q = 'SELECT map_data.`id` AS village_id, map_data.`fieldtype`, map_data.`oasistype`, map_data.`occupied`, map_data.`image`, '. $q = 'SELECT map_data.`id` AS village_id, map_data.`fieldtype`, map_data.`oasistype`, map_data.`occupied`, map_data.`image`, '.
'oasis_data.`type`, '. 'oasis_data.`type`, '.
'CASE '. 'CASE WHEN oasis_data.`owner` IS NOT NULL AND oasis_data.`owner`!= 2 THEN oasis_data.`owner` ELSE village_data.`owner` END AS owner_id, '.
'WHEN oasis_data.`owner` IS NOT NULL AND oasis_data.`owner` != 2 '.
'THEN oasis_data.`owner` '.
'ELSE village_data.`owner` '.
'END AS owner_id, '.
'u.`username` '. 'u.`username` '.
'FROM (SELECT * FROM `'.$tbp.'wdata` WHERE `x` = '.$coord_x.' AND `y` = '.$coord_y.') AS map_data '. 'FROM (SELECT * FROM `'.$tbp.'wdata` WHERE `x` = '.$coord_x.' AND `y` = '.$coord_y.') AS map_data '.
'LEFT JOIN `'.$tbp.'odata` AS oasis_data ON map_data.`id` = oasis_data.`wref` '. 'LEFT JOIN `'.$tbp.'odata` AS oasis_data ON map_data.`id` = oasis_data.`wref` '.
'LEFT JOIN `'.$tbp.'vdata` AS village_data ON village_data.`wref` = map_data.`id` '. 'LEFT JOIN `'.$tbp.'vdata` AS village_data ON village_data.`wref` = map_data.`id` '.
'LEFT JOIN `'.$tbp.'users` AS u ON u.`id` = COALESCE(oasis_data.`owner`, village_data.`owner`, 0);'; // todo check this db tables fields -- del doublings like oasistype = '2' and image = 'o2' 'LEFT JOIN `'.$tbp.'users` AS u ON u.`id` = COALESCE(oasis_data.`owner`, village_data.`owner`, 0);';
$result = mysqli_query($GLOBALS['link'], $q); $result = mysqli_query($GLOBALS['link'], $q);
return mysqli_fetch_assoc($result); return mysqli_fetch_assoc($result);
} }
function upd_oasis_to_oasis($village_id, $new_oasis_type){
function upd_oasis_to_oasis($village_id, $new_oasis_type){ // $village_id aka wref
mysqli_begin_transaction($GLOBALS['link']); mysqli_begin_transaction($GLOBALS['link']);
$q = 'UPDATE `'.TB_PREFIX.'odata` SET `type` = '.$new_oasis_type.' WHERE `wref` = '.$village_id; mysqli_query($GLOBALS['link'], 'UPDATE `'.TB_PREFIX.'odata` SET `type` = '.$new_oasis_type.' WHERE `wref` = '.$village_id);
mysqli_query($GLOBALS['link'], $q); mysqli_query($GLOBALS['link'], 'UPDATE `'.TB_PREFIX.'wdata` SET `oasistype` = '.$new_oasis_type.', `image` = "o'.$new_oasis_type.'" WHERE `id` = '.$village_id);
$q2 = 'UPDATE `'.TB_PREFIX.'wdata` SET `oasistype` = '.$new_oasis_type.', `image` = "o'.$new_oasis_type.'" WHERE `id` = '.$village_id; mysqli_commit($GLOBALS['link']);
mysqli_query($GLOBALS['link'], $q2); }
function upd_village_to_village($village_id, $new_village_type){
mysqli_query($GLOBALS['link'], 'UPDATE `'.TB_PREFIX.'wdata` SET `fieldtype` = '.$new_village_type.', `image` = "t'.$new_village_type.'" WHERE `id` = '.$village_id);
}
function upd_village_to_oasis($village_id, $new_oasis_type){
mysqli_begin_transaction($GLOBALS['link']);
mysqli_query($GLOBALS['link'], 'INSERT INTO `'.TB_PREFIX.'odata` (`wref`, `type`, `conqured`, `wood`, `iron`, `clay`, `maxstore`, `crop`, `maxcrop`, `loyalty`, `owner`, `name`, `high`) VALUES ('.$village_id.', '.$new_oasis_type.', 0, 800, 800, 800, 800, 800, 800, 100, 2, "Unoccupied Oasis", '.rand(0, 2).')');
mysqli_query($GLOBALS['link'], 'UPDATE `'.TB_PREFIX.'wdata` SET `fieldtype` = 0, `oasistype` = '.$new_oasis_type.', `image` = "o'.$new_oasis_type.'" WHERE `id` = '.$village_id);
mysqli_commit($GLOBALS['link']);
}
function upd_oasis_to_village($village_id, $new_village_type){
mysqli_begin_transaction($GLOBALS['link']);
mysqli_query($GLOBALS['link'], 'DELETE FROM `'.TB_PREFIX.'odata` WHERE `wref` = '.$village_id);
mysqli_query($GLOBALS['link'], 'UPDATE `'.TB_PREFIX.'wdata` SET `fieldtype` = '.$new_village_type.', `oasistype` = 0, `image` = "t'.rand(0, 8).'" WHERE `id` = '.$village_id);
mysqli_commit($GLOBALS['link']); mysqli_commit($GLOBALS['link']);
} }
$msg = ''; $coord_x = 0; $coord_y = 0; $search_result = ''; $edit_form = '';
function upd_village_to_village($village_id, $new_village_type){ // $village_id aka wref function oasis_type_by_id($id){
//mysqli_begin_transaction($GLOBALS['link']); $map=[1=>'+25% Lumber',2=>'+25% Lumber',3=>'+25% Lumber +25% Crop',4=>'+25% Clay',5=>'+25% Clay',6=>'+25% Clay +25% Crop',7=>'+25% Iron',8=>'+25% Iron',9=>'+25% Iron +25% Crop',10=>'+25% Crop',11=>'+25% Crop',12=>'+50% Crop'];
//$q = ''; return $map[$id]??'undefined';
//mysqli_query($GLOBALS['link'], $q); }
$q2 = 'UPDATE `'.TB_PREFIX.'wdata` SET `fieldtype` = '.$new_village_type.', `image` = "t'.$new_village_type.'" WHERE `id` = '.$village_id; function village_type_by_fieldtype_id($id){
mysqli_query($GLOBALS['link'], $q2); $map=[1=>'3-3-3-9',2=>'3-4-5-6',3=>'4-4-4-6',4=>'4-5-3-6',5=>'5-3-4-6',6=>'1-1-1-15',7=>'4-4-3-7',8=>'3-4-4-7',9=>'4-3-4-7',10=>'3-5-4-6',11=>'4-3-5-6',12=>'5-4-3-6'];
//mysqli_commit($GLOBALS['link']); return $map[$id]??'undefined';
} }
function gen_map_tiles_select_list_form($is_ocuppied,$is_oasis,$oasis_type,$fieldtype,$x,$y){
function upd_village_to_oasis($village_id, $new_oasis_type){ // $village_id aka wref $not_ocuppied =!$is_ocuppied;
mysqli_begin_transaction($GLOBALS['link']); $html = '<div class="tile-edit"><b>New Map Tile Type</b><form method="post" action="?p=map_tile&do_save"><select name="new_field_type" class="tile-select">';
//$q = 'INSERT INTO `'.TB_PREFIX.'odata` (`wref`, `type`, `conqured`, `wood`, `iron`, `clay`, `maxstore`, `crop`, `maxcrop`, `lastupdated`, `lastupdated2`, `loyalty`, `owner`, `name`, `high`) VALUES ('.$village_id.', '.$new_oasis_type.', 0, 800, 800, 800, 800, 800, 800, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 100, 2, "Unoccupied Oasis", '.rand(0, 2).')'; // todo fix maxstore + maxcrop if($is_oasis){
$q = 'INSERT INTO `'.TB_PREFIX.'odata` (`wref`, `type`, `conqured`, `wood`, `iron`, `clay`, `maxstore`, `crop`, `maxcrop`, `loyalty`, `owner`, `name`, `high`) VALUES ('.$village_id.', '.$new_oasis_type.', 0, 800, 800, 800, 800, 800, 800, 100, 2, "Unoccupied Oasis", '.rand(0, 2).')'; // todo fix maxstore + maxcrop for($i=1;$i<13;$i++){ $sel=($i==$oasis_type)?' selected':''; $html.='<option value="'.$i.'_0"'.$sel.'>['.$i.'] Oasis '.oasis_type_by_id($i).'</option>'; }
mysqli_query($GLOBALS['link'], $q); if($not_ocuppied){ for($i=1;$i<13;$i++){ $html.='<option value="'.$i.'_1">['.$i.'] Valley '.village_type_by_fieldtype_id($i).'</option>'; } }
$q2 = 'UPDATE `'.TB_PREFIX.'wdata` SET `fieldtype` = 0, `oasistype` = '.$new_oasis_type.', `image` = "o'.$new_oasis_type.'" WHERE `id` = '.$village_id;
mysqli_query($GLOBALS['link'], $q2);
mysqli_commit($GLOBALS['link']);
}
function upd_oasis_to_village($village_id, $new_village_type){ // $village_id aka wref
mysqli_begin_transaction($GLOBALS['link']);
$q = 'DELETE FROM `'.TB_PREFIX.'odata` WHERE `wref` = '.$village_id;
mysqli_query($GLOBALS['link'], $q);
$q2 = 'UPDATE `'.TB_PREFIX.'wdata` SET `fieldtype` = '.$new_village_type.', `oasistype` = 0, `image` = "t'.rand(0, 8).'" WHERE `id` = '.$village_id;
mysqli_query($GLOBALS['link'], $q2);
mysqli_commit($GLOBALS['link']);
}
$msg = '';
$coord_x = 0;
$coord_y = 0;
$search_result = '';
$edit_form = '';
//print_r($_GET);
//print_r($_POST);
// todo mv to other file with functions
function oasis_type_by_id($oasis_type_id){
if($oasis_type_id == 1){
return '+25% Lumber';
}else if($oasis_type_id == 2){
return '+25% Lumber'; // todo think maybe add +50% instead the same +25% ?
}else if($oasis_type_id == 3){
return '+25% Lumber +25% Crop';
}else if($oasis_type_id == 4){
return '+25% Clay';
}else if($oasis_type_id == 5){
return '+25% Clay';
}else if($oasis_type_id == 6){
return '+25% Clay +25% Crop';
}else if($oasis_type_id == 7){
return '+25% Iron';
}else if($oasis_type_id == 8){
return '+25% Iron';
}else if($oasis_type_id == 9){
return '+25% Iron +25% Crop';
}else if($oasis_type_id == 10){
return '+25% Crop';
}else if($oasis_type_id == 11){
return '+25% Crop';
}else if($oasis_type_id == 12){
return '+50% Crop';
}else{ }else{
return 'undefined'; if($not_ocuppied){ for($i=1;$i<13;$i++){ $html.='<option value="'.$i.'_0">['.$i.'] Oasis '.oasis_type_by_id($i).'</option>'; } }
for($i=1;$i<13;$i++){ $sel=($i==$fieldtype)?' selected':''; $html.='<option value="'.$i.'_1"'.$sel.'>['.$i.'] Valley '.village_type_by_fieldtype_id($i).'</option>'; }
} }
$html.='</select><input type="hidden" name="x" value="'.$x.'"><input type="hidden" name="y" value="'.$y.'"><button type="submit" name="save" class="btn-save">Save</button></form></div>';
return $html;
} }
// fieldtype = if(isset($_GET['do_save'])){
// 0 = oasis ? $new = explode('_', $_POST['new_field_type']);
// 1+ = village - valley ? $new_type=(int)$new[0]; $new_is=(int)$new[1];
$coord_x=max(-WORLD_MAX,min(WORLD_MAX,(int)$_POST['x'])); $coord_y=max(-WORLD_MAX,min(WORLD_MAX,(int)$_POST['y']));
function village_type_by_fieldtype_id($village_fieldtype_id){ // fieldtype (and image aka t0, t1, .. - can be any?) $row=get_map_tile_info($coord_x,$coord_y); $is_village=($row['oasistype']==0);
// 1 = 3-3-3-9 if($is_village && $row['owner_id'] && $row['owner_id']!=2){ $msg='Can not change map tile type for village that exists!'; }
// 2 = 3-4-5-6 elseif(($is_village && $new_is==1 && $row['fieldtype']==$new_type) || (!$is_village && $new_is==0 && $row['oasistype']==$new_type)){ $msg='Can not change to the same field type!'; }
// 3 = 4-4-4-6 else{
// 4 = 4-5-3-6 if($is_village && $new_is==0) upd_village_to_oasis($row['village_id'],$new_type);
// 5 = 5-3-4-6 elseif(!$is_village && $new_is==1) upd_oasis_to_village($row['village_id'],$new_type);
// 6 = 1-1-1-15 // todo add 0-0-0-18 (with few resources for 0 fields) elseif(!$is_village && $new_is==0) upd_oasis_to_oasis($row['village_id'],$new_type);
// 7 = 4-4-3-7 else upd_village_to_village($row['village_id'],$new_type);
// 8 = 3-4-4-7 }
// 9 = 4-3-4-7 if($msg=='') $msg='Saved!';
// 10 = 3-5-4-6 }
// 11 = 4-3-5-6 elseif(isset($_GET['do_get']) && isset($_POST['x'])){
// 12 = 5-4-3-6 $coord_x=max(-WORLD_MAX,min(WORLD_MAX,(int)$_POST['x'])); $coord_y=max(-WORLD_MAX,min(WORLD_MAX,(int)$_POST['y']));
if($village_fieldtype_id == 1){ $row=get_map_tile_info($coord_x,$coord_y); $is_village=($row['oasistype']==0);
return '3-3-3-9'; if($is_village){
}else if($village_fieldtype_id == 2){ $bonus='<b>type:</b> ['.$row['fieldtype'].'] '.village_type_by_fieldtype_id($row['fieldtype']);
return '3-4-5-6'; // todo think maybe add +50% instead the same +25% ? if(!$row['owner_id'] || $row['owner_id']==2){ $place='Abandoned Valley'; $owner=''; $edit_form=gen_map_tiles_select_list_form(false,false,false,$row['fieldtype'],$coord_x,$coord_y); }
}else if($village_fieldtype_id == 3){ else{ $place='Village'; $owner='<b>owner:</b> <a href="?p=player&uid='.$row['owner_id'].'">'.$row['username'].' [id: '.$row['owner_id'].']</a>'; $edit_form=gen_map_tiles_select_list_form(true,false,false,$row['fieldtype'],$coord_x,$coord_y); }
return '4-4-4-6';
}else if($village_fieldtype_id == 4){
return '4-5-3-6';
}else if($village_fieldtype_id == 5){
return '5-3-4-6';
}else if($village_fieldtype_id == 6){
return '1-1-1-15'; // todo add 0-0-0-18 (with few resources for 0 fields)
}else if($village_fieldtype_id == 7){
return '4-4-3-7';
}else if($village_fieldtype_id == 8){
return '3-4-4-7';
}else if($village_fieldtype_id == 9){
return '4-3-4-7';
}else if($village_fieldtype_id == 10){
return '3-5-4-6';
}else if($village_fieldtype_id == 11){
return '4-3-5-6';
}else if($village_fieldtype_id == 12){
return '5-4-3-6';
}else{ }else{
return 'undefined'; $bonus='<b>bonus:</b> ['.$row['oasistype'].'] '.oasis_type_by_id($row['oasistype']);
if(!$row['owner_id'] || $row['owner_id']==2){ $place='Unoccupied Oasis'; $owner=''; $edit_form=gen_map_tiles_select_list_form(false,true,$row['oasistype'],false,$coord_x,$coord_y); }
else{ $place='Occupied Oasis'; $owner='<b>owner:</b> <a href="?p=player&uid='.$row['owner_id'].'">'.$row['username'].' [id: '.$row['owner_id'].']</a>'; $edit_form=gen_map_tiles_select_list_form(true,true,$row['oasistype'],false,$coord_x,$coord_y); }
} }
$search_result='<div class="tile-card"><div class="tile-preview"><div class="map"><div id="map"><div id="map_content"><div class="'.$row['image'].'"></div></div></div></div></div><div class="tile-info"><div class="info-row"><span>X</span><b>'.$coord_x.'</b></div><div class="info-row"><span>Y</span><b>'.$coord_y.'</b></div><div class="info-row"><span>Type</span><b>'.$place.'</b></div><div class="info-row"><span>Detail</span><b>'.$bonus.'</b></div>'.($owner?'<div class="info-row"><span>Owner</span><b>'.$owner.'</b></div>':'').'</div></div>';
} }
function gen_map_tiles_select_list_form($is_ocuppied, $is_oasis_tile_type, $oasis_type, $fieldtype, $coord_x, $coord_y){
// if ocuppied village --can change only to other $fieldtype (cannot change to oasis)
// if ocuppied oasis -- can change only to other $oasis_type (cannot change to village field - valley)
// unoccypied can change to oasis, to village field, and back
$not_ocuppied = (!($is_ocuppied));
$result = '<br><hr><br>'.
'<b>New Map Tile Type</b>:<br>'.
'<form name="new_tile_type" method="post" action="?p=map_tile&do_save" style="padding-top:10px">'.
'<select name="new_field_type">';
if($is_oasis_tile_type){
for($i = 1; $i < 13; $i++){
$oasis_txt = oasis_type_by_id($i);
$selected = ($i == $oasis_type) ? ' selected' : '';
$result .= '<option value="'.$i.'_0"'.$selected.'>['.$i.'] Oasis '.$oasis_txt.'</option>'; // value "x_0" -- 0 for oasis
}
if($not_ocuppied){
for($i = 1; $i < 13; $i++){
$village_field_type_txt = village_type_by_fieldtype_id($i);
$result .= '<option value="'.$i.'_1">['.$i.'] Valley ' .$village_field_type_txt.'</option>'; // value "x_1" -- 1 for village - valley filed type
}
}
}else{ // village fieldtype
if($not_ocuppied){
for($i = 1; $i < 13; $i++){
$oasis_txt = oasis_type_by_id($i);
$result .= '<option value="'.$i.'_0">['.$i.'] Oasis '.$oasis_txt.'</option>'; // value "x_0" -- 0 for oasis
}
}
for($i = 1; $i < 13; $i++){
$village_field_type_txt = village_type_by_fieldtype_id($i);
$selected = ($i == $fieldtype) ? ' selected' : '';
$result .= '<option value="'.$i.'_1"'.$selected.'>['.$i.'] Valley '.$village_field_type_txt.'</option>'; // value "x_1" -- 1 for village - valley filed type
}
}
$result .= '</select>'.
'<input type="image" id="btn_save" class="dynamic_img" value="save" name="save" src="/img/x.gif" alt="Save">'.
'<input type="hidden" name="x" value="'.$coord_x.'">'.
'<input type="hidden" name="y" value="'.$coord_y.'">'.
'</form>';
return $result;
}
if(isset($_GET['do_save'])){ // update map tile type
//print_r($_POST); // Array ( [new_field_type] => 2_1 [save_x] => 29 [save_y] => 18 [x] => 0 [y] => 1 )
$new_tile_numbers = explode('_', $_POST['new_field_type']);
$new_tile_is_type = (int) $new_tile_numbers[0]; // oasis field type OR village - valley - field type
$new_tile_is_oasis_or_village = (int) $new_tile_numbers[1]; // 0 - oasis, 1 - village - valley - field
$coord_x = (int) $_POST['x'];
$coord_y = (int) $_POST['y'];
if($coord_x > WORLD_MAX){ $coord_x = WORLD_MAX; }
if($coord_x < (-WORLD_MAX)){ $coord_x = (-WORLD_MAX); }
if($coord_y > WORLD_MAX){ $coord_y = WORLD_MAX; }
if($coord_y < (-WORLD_MAX)){ $coord_y = (-WORLD_MAX); }
$row = get_map_tile_info($coord_x, $coord_y);
$is_not_oasis_tile_type = ($row['oasistype'] == 0); // not oasis but village - valley - field
if($is_not_oasis_tile_type && $row['owner_id'] && ($row['owner_id'] != 2) ){
$msg = 'Can not change map tile type for village that exists!<br>'; // todo add this feature as other option
}else if( ($is_not_oasis_tile_type && ($new_tile_is_oasis_or_village == 1) && ($row['fieldtype'] == $new_tile_is_type) ) ||
( (!($is_not_oasis_tile_type)) && ($new_tile_is_oasis_or_village == 0) && ($row['oasistype'] == $new_tile_is_type) ) ){ // check new tile not same as old tile
$msg = 'Can not change to the same field type!<br>';
}else if($is_not_oasis_tile_type && ($new_tile_is_oasis_or_village == 0) ){ // old tile was not oasis - new is oasis
upd_village_to_oasis($row['village_id'], $new_tile_is_type);
}else if( (!($is_not_oasis_tile_type)) && ($new_tile_is_oasis_or_village == 1) ){ // old tile was oasis - new is village
upd_oasis_to_village($row['village_id'], $new_tile_is_type);
}else if( (!($is_not_oasis_tile_type)) && ($new_tile_is_oasis_or_village == 0) ){ // from same to same - from oasis to oasis
upd_oasis_to_oasis($row['village_id'], $new_tile_is_type);
}else{ // from same to same - from village valley to village valley
upd_village_to_village($row['village_id'], $new_tile_is_type);
}
if($msg == ''){ $msg = 'Saved!<br>'; }
}else if(isset($_GET['do_get']) && isset($_POST['x']) && isset($_POST['y'])){ // get and show map tile type
$coord_x = (int) $_POST['x'];
$coord_y = (int) $_POST['y'];
if($coord_x > WORLD_MAX){ $coord_x = WORLD_MAX; }
if($coord_x < (-WORLD_MAX)){ $coord_x = (-WORLD_MAX); }
if($coord_y > WORLD_MAX){ $coord_y = WORLD_MAX; }
if($coord_y < (-WORLD_MAX)){ $coord_y = (-WORLD_MAX); }
$row = get_map_tile_info($coord_x, $coord_y);
//print_r($row);
$is_not_oasis_tile_type = ($row['oasistype'] == 0);
if($is_not_oasis_tile_type){ // not oasis map tile
$bonus_or_type = '<b>type:</b> ['.$row['fieldtype'].'] '.village_type_by_fieldtype_id( $row['fieldtype'] );
if( is_null($row['owner_id']) || ($row['owner_id'] == 2) ){
$place_type = 'Abandoned Valley';
$owner = '';
//$edit_form = gen_map_tiles_select_list_form($is_ocuppied, $is_oasis, $oasistype_id, $row['fieldtype'], $coord_x, $coord_y);
$edit_form = gen_map_tiles_select_list_form(false, false, false, $row['fieldtype'], $coord_x, $coord_y);
}else{
$place_type = 'Village';
$owner = '<b>owner:</b> <a href="?p=player&uid='.$row['owner_id'].'" target="_blank">'.$row['username'].' [id: '.$row['owner_id'].']</a><br>';
//$edit_form = gen_map_tiles_select_list_form($is_ocuppied, $is_oasis, $oasistype_id, $row['fieldtype'], $coord_x, $coord_y);
$edit_form = gen_map_tiles_select_list_form(true, false, false, $row['fieldtype'], $coord_x, $coord_y);
}
}else{ // oasis map tile
$bonus_or_type = '<b>bonus:</b> ['.$row['oasistype'].'] '.oasis_type_by_id( $row['oasistype'] );
if( is_null($row['owner_id']) || ($row['owner_id'] == 2) ){ // todo check why $row['occupied'] == 0 for ocuppied oasis // todo use only owner_id / status -- not save 'Nature'/'oasis' texts in db
$place_type = 'Unocuppied oasis';
//$owner = '<b>owner:</b> <a href="?p=player&uid='.$row['owner_id'].'" target="_blank">'.$row['username'].' [id: '.$row['owner_id'].']</a><br>'; // Nature
$owner = '';
//$edit_form = gen_map_tiles_select_list_form($is_ocuppied, $is_oasis, $row['oasistype'], $village_filedtype_id, $coord_x, $coord_y);
$edit_form = gen_map_tiles_select_list_form(false, true, $row['oasistype'], false, $coord_x, $coord_y);
}else{
$place_type = 'Occupied oasis';
$owner = '<b>owner:</b> <a href="?p=player&uid='.$row['owner_id'].'" target="_blank">'.$row['username'].' [id: '.$row['owner_id'].']</a><br>';
//$edit_form = gen_map_tiles_select_list_form($is_ocuppied, $is_oasis, $row['oasistype'], $village_filedtype_id, $coord_x, $coord_y);
$edit_form = gen_map_tiles_select_list_form(true, true, $row['oasistype'], false, $coord_x, $coord_y);
}
}
$search_result = '<link href="/css/compact.css" rel="stylesheet">'.
'<p>'.
'<b>x:</b> '.$coord_x.'<br>'.
'<b>y:</b> '.$coord_y.'<br>'.
'<b>type:</b> '.$place_type.'<br>'.
$bonus_or_type.'<br>'.$owner.
'</p>'.
'<div class="map">'.
'<div id="map">'.
'<div id="map_content">'.
'<div class="'.$row['image'].'"></div>'.
'</div>'.
'</div>'.
'</div>';
//}else{ // show begin search map tile form
}
echo $search_result;
?> ?>
<link href="/css/admin_map_tile.css" rel="stylesheet"> <style>
/* === MAP TILE MODERN OVERRIDE === */
.tile-wrapper{max-width:760px !important;margin:12px 0 !important;font-family:system-ui,-apple-system,Segoe UI,Roboto !important}
.tile-form{background:#fff !important;border:1px solid #e5e7eb !important;border-radius:12px !important;padding:16px !important;margin-bottom:14px !important;box-shadow:0 1px 3px rgba(0,0,0,.05) !important}
.coord-wrap{display:flex !important;align-items:center !important;gap:14px !important}
.coord-item{display:flex !important;align-items:center !important;gap:6px !important}
.coord-item b{color:#0f172a !important;font-weight:700 !important;font-size:15px !important}
.coord-item input.text{width:90px !important;height:38px !important;padding:0 10px !important;border:1px solid #d1d5db !important;border-radius:8px !important;text-align:center !important;background:#fff !important;color:#111 !important}
.btn-go{height:38px !important;padding:0 18px !important;background:#0f172a !important;color:#fff !important;border:0 !important;border-radius:8px !important;font-weight:600 !important;cursor:pointer !important}
<div id="map_coords"> /* card info */
<!--<form name="map_coords" method="post" action="./Mods/edit_map_tile.php" style="padding-top:10px">--> .tile-card{background:#fff !important;border:1px solid #e5e7eb !important;border-radius:12px !important;padding:16px !important;margin-bottom:14px !important;display:grid !important;grid-template-columns:110px 1fr !important;gap:16px !important;align-items:start !important}
<form name="map_coords" method="post" action="?p=map_tile&do_get" style="padding-top:10px"> .tile-preview .map{transform:scale(0.85) !important;transform-origin:top left !important}
<span><b>x</b> </span><input id="x" class="text fm" name="x" style="width:30px" value="<?php echo $coord_x; ?>" maxlength="4"> .tile-info{display:flex !important;flex-direction:column !important;gap:6px !important}
<span><b>y</b> </span><input id="y" class="text fm" name="y" style="width:30px" value="<?php echo $coord_y; ?>" maxlength="4"> .info-row{display:grid !important;grid-template-columns:70px 1fr !important;padding:4px 0 !important;border-bottom:1px dashed #f1f5f9 !important}
<!-- <input type="hidden" name="do_get"> --> .info-row:last-child{border:0 !important}
<input type="image" id="btn_ok" class="dynamic_img" value="ok" name="btn" src="/img/x.gif" alt="OK"><br><br> .info-row span{color:#64748b !important;font-size:13px !important}
<?php .info-row b{color:#0f172a !important;font-weight:600 !important}
.info-row b a{color:#16a34a !important;text-decoration:none !important;font-weight:600 !important}
echo $msg; /* edit form */
.tile-edit{background:#fff !important;border:1px solid #e5e7eb !important;border-radius:12px !important;padding:16px !important}
.tile-edit b{display:block !important;margin-bottom:8px !important;color:#0f172a !important;font-size:15px !important}
.tile-edit form{display:flex !important;gap:10px !important;align-items:center !important;flex-wrap:wrap !important}
.tile-select{
flex:1 !important;min-width:220px !important;height:40px !important;
padding:0 12px !important;border:1px solid #d1d5db !important;border-radius:8px !important;
background:#fff !important;color:#111 !important;font-size:14px !important;
appearance:none !important;-webkit-appearance:none !important;
}
.btn-save{
height:40px !important;padding:0 20px !important;
background:#0f172a !important;color:#fff !important;
border:0 !important;border-radius:8px !important;font-weight:600 !important;
cursor:pointer !important;white-space:nowrap !important
}
.btn-save:hover{opacity:.9 !important}
?> /* mesaje */
</form> .msg-box{padding:10px 12px !important;border-radius:8px !important;margin:10px 0 !important;font-weight:600 !important}
<?php .msg-ok{background:#f0fdf4 !important;color:#166534 !important;border:1px solid #bbf7d0 !important}
.msg-err{background:#fef2f2 !important;color:#991b1b !important;border:1px solid #fecaca !important}
</style>
echo $edit_form; <div class="tile-wrapper">
<form class="tile-form" method="post" action="?p=map_tile&do_get">
<div class="coord-wrap">
<div class="coord-item">
<b>X</b>
<input class="text" name="x" value="<?=$coord_x?>" maxlength="4">
</div>
<div class="coord-item">
<b>Y</b>
<input class="text" name="y" value="<?=$coord_y?>" maxlength="4">
</div>
<button class="btn-go" type="submit">Check Tile</button>
</div>
</form>
?> <?php if($msg){ $cls = ($msg=='Saved!')?'msg-ok':'msg-err'; echo '<div class="msg-box '.$cls.'">'.$msg.'</div>'; }?>
</div>
<?=$search_result?>
<?=$edit_form?>
</div>
<link href="/css/admin_map_tile.css" rel="stylesheet">
+73 -27
View File
@@ -2,36 +2,82 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename message.tpl ## ## Filename : message.tpl ##
## Developed by: Dzoki ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!");
$nid = $_GET['nid']?? '';
$bid = $_GET['bid']?? '';
?> ?>
<style> <style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);} .message-wrap{max-width:900px;margin:20px auto;font-family:Verdana}
.message-head{display:flex;align-items:center;gap:8px;margin-bottom:16px}
.message-head svg{width:24px;height:24px}
.message-head h2{margin:0;font-size:18px}
.message-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:12px}
.msg-card{background:#fff;border:1px solid #ddd;border-radius:8px;padding:14px;box-shadow:0 1px 3px rgba(0,0,0,.05)}
.msg-card h3{margin:0 0 10px;font-size:14px;display:flex;align-items:center;gap:6px;color:#333}
.msg-card form{display:flex;gap:6px}
.msg-card input[type="text"]{flex:1;padding:8px 10px;border:1px solid #ccc;border-radius:6px;font-size:13px}
.msg-card button{background:#333;color:#fff;border:0;padding:8px 12px;border-radius:6px;cursor:pointer;font-weight:bold}
.msg-card button:hover{background:#000}
.msg-card.igm{border-left:4px solid #3498db}
.msg-card.report{border-left:4px solid #e67e22}
.result-wrap{margin-top:20px}
</style> </style>
<link href="../<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7i" rel="stylesheet" type="text/css">
<table id="member" style="width:225px">
<thead>
<tr>
<th colspan="2">IGM/Reports</th>
</tr>
</thead>
<tr>
<td>IGM ID</td>
<td><form action="" method="get"><input type="hidden" name="p" value="message"><input type="text" class="fm" name="nid" value="<?php echo $_GET['nid'];?>"> <input type="image" value="submit" src="../img/admin/b/ok1.gif"></form></td>
</tr>
<tr>
<td>Report ID</td>
<td><form action="" method="get"><input type="hidden" name="p" value="message"><input type="text" class="fm" name="bid" value="<?php echo $_GET['bid'];?>"> <input type="image" value="submit" src="../img/admin/b/ok1.gif"></form></td>
</tr>
</table>
<br>
<?php <div class="message-wrap">
if($_GET['nid'] && is_numeric($_GET['nid'])) include('msg.tpl'); <div class="message-head">
elseif($_GET['bid'] && is_numeric($_GET['bid'])) include('report.tpl'); <!-- ICON INLINE -->
?> <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4 6h16v10H7l-3 3V6z" fill="#555"/>
</svg>
<h2>IGM / Reports Lookup</h2>
</div>
<div class="message-grid">
<div class="msg-card igm">
<h3>
<svg width="16" height="16" viewBox="0 0 24 24" fill="none"><path d="M4 5h16v10H7l-3 3V5z" fill="#3498db"/></svg>
IGM by ID
</h3>
<form action="" method="get">
<input type="hidden" name="p" value="message">
<input type="text" name="nid" placeholder="Enter message ID..." value="<?php echo htmlspecialchars($nid);?>" autofocus>
<button type="submit">Go</button>
</form>
</div>
<div class="msg-card report">
<h3>
<svg width="16" height="16" viewBox="0 0 24 24" fill="none"><path d="M6 2h9l5 5v13a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z" fill="#e67e22"/><path d="M14 2v6h6" fill="#d35400"/></svg>
Report by ID
</h3>
<form action="" method="get">
<input type="hidden" name="p" value="message">
<input type="text" name="bid" placeholder="Enter report ID..." value="<?php echo htmlspecialchars($bid);?>">
<button type="submit">Go</button>
</form>
</div>
</div>
<div class="result-wrap">
<?php
if($nid && is_numeric($nid)) include('msg.tpl');
elseif($bid && is_numeric($bid)) include('report.tpl');
?>
</div>
</div>
+16 -1
View File
@@ -1,6 +1,21 @@
<?php <?php
################################################################################# #################################################################################
## msg.tpl - REDESIGN 2025 (stil Reports) ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : msg.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!"); if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!");
include_once("../GameEngine/Generator.php"); include_once("../GameEngine/Generator.php");
+20
View File
@@ -1,4 +1,24 @@
<?php <?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : natars.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
$deletedArtifacts = $database->getDeletedArtifacts(); $deletedArtifacts = $database->getDeletedArtifacts();
?> ?>
<style> <style>
+43 -14
View File
@@ -1,23 +1,52 @@
<?php <?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : notregistered.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
if(!isset($_SESSION)) session_start(); if(!isset($_SESSION)) session_start();
if($_SESSION['access'] < ADMIN) die("Access Denied"); if($_SESSION['access'] < ADMIN) die("Access Denied");
?> ?>
<style> <style>
.notreg-wrap{max-width:980px;margin:12px auto;font-family:Tahoma,Verdana,Arial,sans-serif} .notreg-wrap{max-width:100%;margin:12px auto;font-family:Tahoma,Verdana,Arial,sans-serif;padding:0 10px;box-sizing:border-box}
.notreg-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px} .notreg-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;flex-wrap:wrap;gap:8px}
.notreg-head h2{margin:0;font-size:16px;color:#c0392b;display:flex;align-items:center;gap:6px} .notreg-head h2{margin:0;font-size:16px;color:#c0392b;display:flex;align-items:center;gap:6px}
.notreg-search input{padding:4px 8px;border:1px solid #bbb;border-radius:14px;font-size:11px;width:180px} .notreg-search input{padding:6px 12px;border:1px solid #bbb;border-radius:14px;font-size:12px;width:200px;box-sizing:border-box}
.notreg-card{background:#fff;border:1px solid #bbb;border-radius:6px;overflow:hidden} .notreg-card{background:#fff;border:1px solid #bbb;border-radius:6px;overflow-x:auto;-webkit-overflow-scrolling:touch}
.notreg-table{width:100%;border-collapse:collapse;font-size:11px} .notreg-table{width:100%;border-collapse:collapse;font-size:12px;min-width:720px}
.notreg-table th{background:#3a4f63;color:#fff;padding:6px 5px;text-align:left;font-weight:bold;font-size:10px;white-space:nowrap;cursor:pointer} .notreg-table th{background:#3a4f63;color:#fff;padding:8px 6px;text-align:left;font-weight:bold;font-size:11px;white-space:nowrap;position:sticky;top:0;z-index:1}
.notreg-table td{padding:5px;border-bottom:1px solid #eee;vertical-align:middle} .notreg-table td{padding:7px 6px;border-bottom:1px solid #eee;vertical-align:middle}
.notreg-table tr:hover{background:#fff5f5} .notreg-table tr:hover{background:#fff5f5}
.notreg-table a{color:#004a9f;text-decoration:none} .notreg-table a{color:#004a9f;text-decoration:none;word-break:break-all}
.notreg-table a:hover{text-decoration:underline} .notreg-table a:hover{text-decoration:underline}
.badge-tribe{padding:2px 5px;border-radius:3px;color:#fff;font-size:10px;font-weight:bold} .badge-tribe{padding:3px 6px;border-radius:3px;color:#fff;font-size:10px;font-weight:bold;white-space:nowrap;display:inline-block}
.tribe-1{background:#c0392b} .tribe-2{background:#2c3e50} .tribe-3{background:#27ae60} .tribe-1{background:#c0392b} .tribe-2{background:#2c3e50} .tribe-3{background:#27ae60}
.code{font-family:monospace;background:#f4f4f4;padding:1px 4px;border-radius:2px;font-size:10px} .code{font-family:monospace;background:#f4f4f4;padding:2px 5px;border-radius:3px;font-size:10px;word-break:break-all}
.time{color:#666;font-size:10px} .time{color:#666;font-size:10px;white-space:nowrap}
/* MOBILE FIX */
@media (max-width:768px){
.notreg-wrap{padding:0 5px}
.notreg-head{flex-direction:column;align-items:stretch}
.notreg-search input{width:100%}
.notreg-table{font-size:11px;min-width:650px}
.notreg-table th,.notreg-table td{padding:6px 4px}
}
</style> </style>
<div class="notreg-wrap"> <div class="notreg-wrap">
@@ -54,10 +83,10 @@ while($row = mysqli_fetch_assoc($result)) {
<td>{$i}</td> <td>{$i}</td>
<td>{$row['id']}</td> <td>{$row['id']}</td>
<td><b>".htmlspecialchars($row['username'])."</b></td> <td><b>".htmlspecialchars($row['username'])."</b></td>
<td><a href=\"mailto:{$row['email']}\">{$row['email']}</a></td> <td><a href=\"mailto:{$row['email']}\">".htmlspecialchars($row['email'])."</a></td>
<td><span class='badge-tribe {$tclass}'>{$tribe}</span></td> <td><span class='badge-tribe {$tclass}'>{$tribe}</span></td>
<td><span class='code'>{$row['act']}</span></td> <td><span class='code'>".htmlspecialchars($row['act'])."</span></td>
<td>{$row['act2']}</td> <td>".htmlspecialchars($row['act2'])."</td>
<td class='time'>{$time}</td> <td class='time'>{$time}</td>
</tr>"; </tr>";
} }
+16 -1
View File
@@ -1,6 +1,21 @@
<?php <?php
################################################################################# #################################################################################
## online.tpl - REDESIGN 2025 ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : online.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!"); if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!");
$active = $admin->getUserActive(); $active = $admin->getUserActive();
+78 -23
View File
@@ -1,15 +1,32 @@
<?php <?php
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename player.tpl ## ## Filename : player.tpl ##
## Developed by: Dzoki ## ## Type : Admin Panel Frontend ##
## Reworked: aggenkeech ## ## --------------------------------------------------------------------------- ##
## License: TravianZ Project ## ## Developed by : Dzoki (Original) ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Refactored by : Shadow ##
## ## ## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
$id = $_GET['uid']; $id = $_GET['uid'];
// --- FIX: Anulează ștergerea direct din tpl ---
if(isset($_GET['action']) && $_GET['action'] == 'StopDel' && $id > 0){
$database->query("DELETE FROM `".TB_PREFIX."deleting` WHERE `uid` = $id");
// redirect ca să dispară ?action din URL
header("Location: ?p=player&uid=".$id);
exit;
}
if(isset($id)) if(isset($id))
{ {
include_once("../GameEngine/Ranking.php"); include_once("../GameEngine/Ranking.php");
@@ -21,41 +38,78 @@ if(isset($id))
$varray = $database->getProfileVillages($id); $varray = $database->getProfileVillages($id);
$refreshiconfrm = "../img/admin/refresh.png"; $refreshiconfrm = "../img/admin/refresh.png";
$refreshicon = "<img src=\"".$refreshiconfrm."\">"; $refreshicon = "<img src=\"".$refreshiconfrm."\">";
?>
<style>
/* PLAYER.TPL - GLOBAL 2026 COMPACT */
.player-page{font-family:system-ui}
.player-page > br,.player-page br{display:none}
#profile, .hero-wrap, #member, .ban-history{margin-bottom:10px !important}
table.ban-history{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04);margin-top:10px;font-family:system-ui}
table.ban-history thead tr:first-child th{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:6px 10px;font-weight:600;text-align:left;font-size:13px}
table.ban-history thead tr:nth-child(2) td{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;padding:4px 8px;border-bottom:1px solid #e5e7eb;font-weight:600}
table.ban-history tbody td{padding:3px 8px;border-bottom:1px solid #f1f5f9;font-size:12px;color:#334155;line-height:1.2}
table.ban-history tbody tr:last-child td{border-bottom:0}
table.ban-history tbody tr:hover td{background:#f8fafc}
table.ban-history td.hab{width:18%}
table.ban-history td.on{color:#0f172a}
.player-bottom{display:block;margin-top:10px;overflow:hidden}
.player-bottom > div:first-child{float:left;width:49%}
.player-bottom > div:last-child{float:right;width:49%}
</style>
<div class="player-page">
<?php
if($user){ if($user){
$totalpop = 0; $totalpop = 0;
foreach($varray as $vil) $totalpop += $vil['pop']; foreach($varray as $vil) $totalpop += $vil['pop'];
include('search2.tpl'); include('search2.tpl');
echo "<br />";
$deletion = false; $deletion = false;
if($deletion) include("playerdeletion.tpl"); $delTime = '00:00:00';
// 1. ia timestamp-ul din tabelul de ștergere
$uid = (int)$user['id'];
$sql = "SELECT `timestamp` FROM `".TB_PREFIX."deleting` WHERE `uid` = $uid LIMIT 1";
$result = $database->query($sql);
if($result && $row = mysqli_fetch_assoc($result)){
if($row['timestamp'] > time()){
$deletion = true;
// 2. calculează cât a mai rămas
$remaining = $row['timestamp'] - time();
$h = floor($remaining / 3600);
$m = floor(($remaining % 3600) / 60);
$s = $remaining % 60;
$delTime = sprintf("%02d:%02d:%02d", $h, $m, $s);
}
}
// 3. afișează doar dacă e în proces
if($deletion){
include("playerdeletion.tpl");
}
include("playerinfo.tpl"); include("playerinfo.tpl");
include("playerheroinfo.tpl"); include("playerheroinfo.tpl");
include("playeradditionalinfo.tpl"); include("playeradditionalinfo.tpl");
echo "<br />";
include("playermedals.tpl"); include("playermedals.tpl");
include ("villages.tpl"); ?> include ("villages.tpl"); ?>
<div style="float: left;"> <div class="player-bottom">
<?php <div><?php include ('punish.tpl'); ?></div>
include ('punish.tpl'); <div><?php include ('add_village.tpl'); ?></div>
?>
</div>
<div style="float: right;">
<?php
include ('add_village.tpl');
?>
</div> </div>
<?php <?php
$sql = "SELECT * FROM ".TB_PREFIX."banlist WHERE uid = ".(int) $id.""; $sql = "SELECT * FROM ".TB_PREFIX."banlist WHERE uid = ".(int) $id."";
$numbans = mysqli_num_rows(mysqli_query($GLOBALS["link"], $sql)); $numbans = mysqli_num_rows(mysqli_query($GLOBALS["link"], $sql));
?> ?>
<table id="member" cellpadding="1" cellspacing="1"> <table class="ban-history" cellpadding="0" cellspacing="0">
<thead> <thead>
<tr> <tr>
<th colspan="6">Ban History (<?php echo $numbans; ?>)</th> <th colspan="4">Ban History (<?php echo $numbans; ?>)</th>
</tr> </tr>
<tr> <tr>
<td class="hab"><b>Start</b></td> <td class="hab"><b>Start</b></td>
@@ -73,13 +127,14 @@ if(isset($id))
<tr> <tr>
<td class="hab">'.date('d:m:Y H:i', $row['time']).'</td> <td class="hab">'.date('d:m:Y H:i', $row['time']).'</td>
<td class="hab">'.date('d:m:Y H:i', $row['end']).'</td> <td class="hab">'.date('d:m:Y H:i', $row['end']).'</td>
<td class="hab">'.round((($row['end'] - $row['time']) / 3600), 2).' minutes</td> <td class="hab">'.round((($row['end'] - $row['time']) / 3600), 2).' hours</td>
<td class="on">'.$row['reason'].'</td> <td class="on">'.$row['reason'].'</td>
</tr>'; </tr>';
} }
?> ?>
</tbody> </tbody>
</table> </table>
</div>
<?php <?php
} }
else include("404.tpl"); else include("404.tpl");
+91 -138
View File
@@ -1,138 +1,91 @@
<table id="member"> <style>
<thead> #member{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04);margin-top:10px;font-family:system-ui}
<tr> #member thead th{background:linear-gradient(135deg,#0f172a,#1e293b) !important;color:#fff;padding:6px 10px;font-weight:600;text-align:left;font-size:13px;position:relative}
<th colspan="2">Additional Information &nbsp;&nbsp;&nbsp;<a href='admin.php?p=editAdditional&uid=<?php echo $id; ?>'><img src="../img/admin/edit.gif" title="Edit Player Additional Info"></a></th> #member thead th .edit-icon{float:right;display:inline-flex;opacity:.85;transition:.15s}
</tr> #member thead th .edit-icon:hover{opacity:1}
</thead> #member thead th .edit-icon svg{width:14px;height:14px;stroke:#93c5fd;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
<tbody> #member thead th .edit-icon:hover svg{stroke:#fff}
<tr> #member tbody td{padding:3px 8px;border-bottom:1px solid #f1f5f9;font-size:12px;color:#334155;vertical-align:middle;line-height:1.2}
<td>Access</td> #member tbody tr:last-child td{border-bottom:0}
<td> #member tbody tr:hover td{background:#f8fafc}
<?php #member td:first-child{width:35%;color:#64748b;font-weight:500}
if($user['access'] == 0)
{ .badge{display:inline-block;padding:1px 6px;border-radius:5px;font-size:10.5px;font-weight:600;line-height:1.1}
echo "Banned"; .badge-banned{background:#fee2e2;color:#991b1b}
} .badge-user{background:#e2e8f0;color:#334155}
else if($user['access'] == 2) .badge-mh{background:#fef3c7;color:#92400e}
{ .badge-admin{background:#dbeafe;color:#1e40af;font-weight:700}
echo "Normal user"; .badge-on{background:#dcfce7;color:#166534}
} .badge-off{background:#f1f5f9;color:#64748b}
else if($user['access'] == 8)
{ .gold-val{display:flex;align-items:center;gap:5px;font-weight:600;color:#b45309}
echo "<b>Multihunter</b>"; .gold-val img{width:14px;height:14px}
}
else if($user['access'] == 9) .status-icon{display:inline-flex;vertical-align:middle;margin-right:4px}
{ .status-icon svg{width:14px;height:14px;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
echo "<b>Administrator</b>"; .status-ok svg{stroke:#16a34a}
} .status-no svg{stroke:#dc2626}
?> </style>
</td>
</tr> <table id="member">
<tr> <thead>
<td>Vacation Mode</td> <tr>
<td> <th colspan="2">Additional Information
<?php <a href='admin.php?p=editAdditional&uid=<?php echo $id; ?>' class="edit-icon" title="Edit Player Additional Info">
if($user['vac_mode'] == 0) <svg viewBox="0 0 24 24"><path d="M12 20h9"/><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z"/></svg>
{ </a>
echo "Disabled"; </th>
} </tr>
else if($user['vac_mode'] == 1) </thead>
{ <tbody>
echo "Enabled"; <tr>
} <td>Access</td>
?> <td>
</td> <?php
</tr> if($user['access'] == 0) echo '<span class="badge badge-banned">Banned</span>';
<tr> else if($user['access'] == 2) echo '<span class="badge badge-user">Normal user</span>';
<td>Gold</td> else if($user['access'] == 8) echo '<span class="badge badge-mh">Multihunter</span>';
<td><img src="../img/admin/gold.gif"> <?php echo $user['gold']; ?></td> else if($user['access'] == 9) echo '<span class="badge badge-admin">Administrator</span>';
</tr> ?>
<tr> </td>
<td>Sitter 1</td> </tr>
<td> <tr>
<?php <td>Vacation Mode</td>
if($user['sit1'] >= 1) <td><?php echo $user['vac_mode'] ? '<span class="badge badge-on">Enabled</span>' : '<span class="badge badge-off">Disabled</span>'; ?></td>
{ </tr>
echo '<a href="admin.php?p=player&uid='.$user['sit1'].'">'.$database->getUserField($user['sit1'],"username",0).'</a>'; <tr>
} <td>Gold</td>
else if($user['sit1'] == 0) <td><span class="gold-val"><img src="../img/admin/gold.gif"> <?php echo $user['gold']; ?></span></td>
{ </tr>
echo 'No Sitter'; <tr>
} <td>Sitter 1</td>
?> <td><?php echo $user['sit1'] >= 1 ? '<a href="admin.php?p=player&uid='.$user['sit1'].'">'.$database->getUserField($user['sit1'],"username",0).'</a>' : '<span style="color:#94a3b8">No Sitter</span>'; ?></td>
</td> </tr>
</tr> <tr>
<tr> <td>Sitter 2</td>
<td>Sitter 2</td> <td><?php echo $user['sit2'] >= 1 ? '<a href="admin.php?p=player&uid='.$user['sit2'].'">'.$database->getUserField($user['sit2'],"username",0).'</a>' : '<span style="color:#94a3b8">No Sitter</span>'; ?></td>
<td> </tr>
<?php <tr>
if($user['sit2'] >= 1) <td>Beginners Protection</td>
{ <td>
echo '<a href="admin.php?p=player&uid='.$user['sit2'].'">'.$database->getUserField($user['sit2'],"username",0).'</a>'; <?php
} $datetime = $user['protect']; $now = time();
else if($user['sit2'] == 0) if($datetime==0 || $datetime <= $now){
{ echo '<span class="status-icon status-no"><svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"/><path d="M15 9l-6 6M9 9l6 6"/></svg></span> <span style="color:#dc2626;font-weight:600">No Protection</span>';
echo 'No Sitter'; }else{
} $tsdiffact = $datetime - $now;
?> $timetoecho = \App\Utils\DateTime::getTimeFormat($tsdiffact);
</td> echo '<span class="status-icon status-ok" title="Ends: '.date('d.m.Y H:i',$user['protect']+3600*2).'"><svg viewBox="0 0 24 24"><path d="M20 6L9 17l-5-5"/></svg></span> <span style="color:#2563eb;font-weight:600">'.$timetoecho.'</span>';
</tr> }
<tr> ?>
<td>Beginners Protection</td> </td>
<td> </tr>
<?php <tr><td>Culture Points</td><td><?php echo number_format($user['cp'],0,',','.');?></td></tr>
$datetime = $user['protect']; <tr><td>Last Activity</td><td><?php echo date('d.m.Y H:i',$user['timestamp']+3600*2);?></td></tr>
$now = time(); <tr><td>Attack Points (This Week)</td><td><?php echo $user['ap'];?></td></tr>
if($datetime ==0) <tr><td>Defence Points (This Week)</td><td><?php echo $user['dp'];?></td></tr>
{ <tr><td>Resources Raided (This Week)</td><td><?php echo number_format($user['RR'],0,',','.');?></td></tr>
echo '<img src="../img/admin/del.gif">'; <tr><td>Total Attack Points</td><td><b><?php echo number_format($user['apall'],0,',','.');?></b></td></tr>
echo "<font color=\"red\"> No Protection</font>"; <tr><td>Total Defence Points</td><td><b><?php echo number_format($user['dpall'],0,',','.');?></b></td></tr>
} </tbody>
else </table>
{
if($datetime <= $now)
{
echo '<img src="../img/admin/del.gif">';
echo "<font color=\"red\"> No Protection</font>";
}
else
{
$tsdiffact = $datetime - $now;
$timetoecho = \App\Utils\DateTime::getTimeFormat($tsdiffact);
echo '<img src="../gpack/travian_default/img/new/tick.png" title="Ends: '.date('d.m.Y H:i',$user['protect']+3600*2).'">';
echo "<font color=\"blue\"> $timetoecho</font>";
}
}
?>
</td>
</tr>
<tr>
<td>Culture Points</td>
<td><?php echo round($user['cp'], 0);?></td>
</tr>
<tr>
<td>Last Activity</td>
<td><?php echo date('d.m.Y H:i',$user['timestamp']+3600*2);?></td>
</tr>
<tr>
<td>Attack Points ("This "Week")</td>
<td><?php echo $user['ap'];?></td>
</tr>
<tr>
<td>Defence Points ("This Week")</td>
<td><?php echo $user['dp'];?></td>
</tr>
<tr>
<td>Resources Raided ("This Week")</td>
<td><?php echo $user['RR'];?></td>
</tr>
<tr>
<td>Total Attack Points</td>
<td><?php echo $user['apall'];?></td>
</tr>
<tr>
<td>Total Defence Points</td>
<td><?php echo $user['dpall'];?></td>
</tr>
</tbody>
</table>
+13 -8
View File
@@ -1,8 +1,13 @@
<table id="member" cellpadding="1" cellspacing="1"> <div style="background:#fff8e6; border:1px solid #ffcc80; color:#333; padding:12px 16px; margin:12px 0; border-radius:10px; display:flex; justify-content:space-between; align-items:center; font-size:14px;">
<tr> <div>
<td> <i class="fa fa-exclamation-triangle" style="color:#e67e22; margin-right:6px;"></i>
The account will be deleted in <span class="c2">79:56:11</span> The account will be deleted in
<a href="?action=StopDel&uid=<?php echo $user['id'];?>" onClick="return del('stopDel','<?php echo $user['username'];?>');"><img src="img/x.gif" class="del"></a> <strong style="color:#e67e22;"><?php echo $delTime; ?></strong>
</td> </div>
</tr> <a href="?p=player&uid=<?php echo $user['id']; ?>&action=StopDel"
</table> onclick="return confirm('Cancel deletion for <?php echo $user['username']; ?>?');"
title="Cancel deletion"
style="background:#e74c3c; color:#fff; text-decoration:none; padding:6px 10px; border-radius:6px; font-weight:bold;">
✖ Cancel
</a>
</div>
+107 -143
View File
@@ -1,12 +1,22 @@
<?php <?php
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename playerheroinfo.tpl ## ## Filename : playerheroinfo.tpl ##
## Developed by: ronix ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
include_once("../GameEngine/Data/hero_full.php"); include_once("../GameEngine/Data/hero_full.php");
@@ -14,38 +24,53 @@ include_once("../GameEngine/Units.php");
$id = (int) $_GET['uid']; $id = (int) $_GET['uid'];
$hero = $units->Hero($id,1); $hero = $units->Hero($id,1);
// find a hero who's alive
$heroAliveIndex = -1; $heroAliveIndex = -1;
if ($hero !== false) { if ($hero !== false) {
foreach ($hero as $hid => $h) { foreach ($hero as $hid => $h) {
if (!$h['dead']) { if (!$h['dead']) { $heroAliveIndex = $hid; break; }
$heroAliveIndex = $hid;
break;
}
} }
} }
?> ?>
<style> <style>
td { .hero-wrap{width:100%;margin-top:15px;font-family:system-ui}
vertical-align:middle; padding:2px 7px; border:1px solid silver; font-size:13px; color:black; .hero-table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04)}
} .hero-table th,.hero-table td{vertical-align:middle;padding:3px 8px;border-bottom:1px solid #f1f5f9;font-size:12px;color:#1e293b;line-height:1.2}
th { .hero-table thead th{background:linear-gradient(180deg,#f8fafc,#eef2f7);text-align:center;font-weight:600;color:#334155;border-bottom:1px solid #e2e8f0;padding:4px 8px}
vertical-align:middle; padding:2px 7px; border:1px solid silver; font-size:13px; color:black; .hero-table tr:last-child td{border-bottom:0}
} .hero-table thead th.hero-head{background:linear-gradient(135deg,#0f172a,#1e293b) !important;color:#fff !important;padding:6px 10px !important;font-size:13px}
thead { .hero-sub{background:#e2e8f0 !important;font-weight:600;color:#1e293b;text-align:center;padding:3px 8px !important}
background-image:url(../img/un/a/c2.gif); background-repeat:repeat; text-align:center; font-weight:bold; .hero-name{font-weight:600;color:#0f172a}
} .badge{display:inline-block;padding:1px 6px;border-radius:5px;font-size:10.5px;font-weight:600}
.badge-alive{background:#dcfce7;color:#166534}
.badge-dead{background:#fee2e2;color:#991b1b}
.hero-actions{display:flex;align-items:center;gap:8px}
.hero-icon{display:inline-flex;opacity:.8;transition:.15s}
.hero-icon:hover{opacity:1}
.hero-icon svg{width:14px;height:14px;stroke:#64748b;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
.hero-icon.edit:hover svg{stroke:#2563eb}
.hero-icon.kill:hover svg{stroke:#dc2626}
.hero-icon.revive:hover svg{stroke:#16a34a}
.hero-unit img{vertical-align:middle;margin-right:3px;width:16px;height:16px}
.hero-bar{height:4px;background:#e5e7eb;border-radius:2px;overflow:hidden;margin-top:2px}
.hero-bar-fill{height:100%;background:linear-gradient(90deg,#22c55e,#16a34a)}
.add-hero a{margin:0 2px;opacity:.9}
.add-hero a:hover{opacity:1}
.add-hero img{width:18px;height:18px}
.notice{margin-top:6px;text-align:center;font-size:12px;padding:4px;border-radius:5px}
.notice-blue{background:#eff6ff;color:#1d4ed8}
.notice-red{background:#fef2f2;color:#b91c1c}
</style> </style>
<table style="border-collapse:collapse; margin-top:25px; line-height:16px; width:100%;">
<div class="hero-wrap">
<table class="hero-table">
<thead> <thead>
<tr> <tr><th colspan="3" class="hero-head">Player Heroes</th></tr>
<td colspan="3">Player Heroes</td>
</tr>
</thead> </thead>
<?php if ($hero === false) {?> <?php if ($hero === false) {?>
<tr> <tr>
<td colspan="3" align="center">None &nbsp;&nbsp;<font color="blue">Add Hero</font> <td colspan="3" align="center" class="add-hero">
None &nbsp;&nbsp;<span style="color:#2563eb;font-weight:600">Add Hero</span>
<?php <?php
$utribe=($user['tribe']-1)*10; $utribe=($user['tribe']-1)*10;
echo "&nbsp;<a href='?action=addHero&uid=".$id."&u=".($utribe+1)."'><img class=\"unit u".($utribe+1)."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($utribe+1)."\" title=\"".$technology->getUnitName($utribe+1)."\" /></a>"; echo "&nbsp;<a href='?action=addHero&uid=".$id."&u=".($utribe+1)."'><img class=\"unit u".($utribe+1)."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($utribe+1)."\" title=\"".$technology->getUnitName($utribe+1)."\" /></a>";
@@ -58,21 +83,15 @@ thead {
echo "&nbsp;<a href='?action=addHero&uid=".$id."&u=".($utribe+5)."'><img class=\"unit u".($utribe+5)."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($utribe+5)."\" title=\"".$technology->getUnitName($utribe+5)."\" /></a>"; echo "&nbsp;<a href='?action=addHero&uid=".$id."&u=".($utribe+5)."'><img class=\"unit u".($utribe+5)."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($utribe+5)."\" title=\"".$technology->getUnitName($utribe+5)."\" /></a>";
echo "&nbsp;<a href='?action=addHero&uid=".$id."&u=".($utribe+6)."'><img class=\"unit u".($utribe+6)."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($utribe+6)."\" title=\"".$technology->getUnitName($utribe+6)."\" /></a>"; echo "&nbsp;<a href='?action=addHero&uid=".$id."&u=".($utribe+6)."'><img class=\"unit u".($utribe+6)."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($utribe+6)."\" title=\"".$technology->getUnitName($utribe+6)."\" /></a>";
?> ?>
</tr>
<?php
} else {
$x = 1;
foreach ($hero as $h) {
?>
<tr>
<td colspan="3" style="text-align: center; color: blue; font-weight: bold">
Hero #<?php echo $x++; ?>
</td> </td>
</tr> </tr>
<?php } else {
$x = 1;
foreach ($hero as $h) { ?>
<tr><td colspan="3" class="hero-sub" style="text-align:center">Hero #<?php echo $x++; ?></td></tr>
<tr> <tr>
<td width="35%">Hero Name</td> <td width="35%">Hero Name</td>
<td colspan="2" width="65%"><?php echo $h['name']; ?></td> <td colspan="2" class="hero-name"><?php echo $h['name']; ?></td>
</tr> </tr>
<tr> <tr>
<td>Hero Level</td> <td>Hero Level</td>
@@ -80,115 +99,60 @@ thead {
</tr> </tr>
<tr> <tr>
<td>Hero Unit</td> <td>Hero Unit</td>
<td colspan="2"><?php echo "<img class=\"unit u".$h['unit']."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($h['unit'])."\" title=\"".$technology->getUnitName($h['unit'])."\" /> (".$technology->getUnitName($h['unit']); ?>)</td> <td colspan="2" class="hero-unit"><?php echo "<img class=\"unit u".$h['unit']."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($h['unit'])."\" title=\"".$technology->getUnitName($h['unit'])."\" /> ".$technology->getUnitName($h['unit']); ?></td>
</tr> </tr>
<tr> <tr>
<td>Status</td> <td>Status</td>
<td colspan="2"<?php <td colspan="2" class="hero-actions">
if ($h['dead']) { <?php if (!$h['dead']) { ?>
echo ' class="c5"'; <span class="badge badge-alive">Alive</span>
} <a class="hero-icon edit" href='admin.php?p=editHero&uid=<?php echo $id; ?>&amp;hid=<?php echo $h['heroid'] ?>' title="Edit">
?>> <svg viewBox="0 0 24 24"><path d="M12 20h9"/><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z"/></svg>
<?php </a>
if (!$h['dead']) { <a class="hero-icon kill" href='?action=killHero&uid=<?php echo $id; ?>' title="Kill">
?> <svg viewBox="0 0 24 24"><path d="M3 6h18M8 6V4h8v2m-1 0v14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V6h10z"/></svg>
<span style="color: green; font-weight: bold">Alive</span> </a>
&nbsp;<a href='admin.php?p=editHero&uid=<?php echo $id; ?>&amp;hid=<?php echo $h['heroid'] ?>'> <?php } else { ?>
<img src="../img/admin/edit.gif" title="Edit Player Hero Info"></a> <span class="badge badge-dead">Dead</span>
&nbsp;<a href='?action=killHero&uid=<?php echo $id; ?>'> <?php if ($heroAliveIndex === -1) { ?>
<img src="../img/admin/del.gif" title="Kill Player Hero"></a></td> <a class="hero-icon revive" href="?action=reviveHero&uid=<?php echo $id;?>&amp;hid=<?php echo $h['heroid'] ?>" title="Revive">
<?php <svg viewBox="0 0 24 24"><path d="M21 12a9 9 0 1 1-3-6.7"/><path d="M21 3v6h-6"/></svg>
} else { </a>
?> <?php } else { echo '<span style="color:#64748b;font-size:11px">(kill living hero first)</span>'; } ?>
Dead &nbsp; <?php } ?>
<?php </td>
if ($heroAliveIndex === -1) {
?><a href="?action=reviveHero&uid=<?php echo $id;?>&amp;hid=<?php echo $h['heroid'] ?>" title="Revive hero"><?php echo $refreshicon; ?></a>
<?php
} else {
echo '<span style="color: black; font-size: smaller">(cannot revive, kill living hero first)</span>';
}
?>
<?php
}
?>
<?php if (!$h['dead']) { ?>
<thead>
<tr>
<td width="35%">Details</td>
<td width="40%">Point</td>
<td width="25%">Level</td>
</tr> </tr>
</thead>
<?php if (!$h['dead']) { ?>
<tr><th>Details</th><th>Point</th><th>Level</th></tr>
<tr><td>Offence</td><td><?php echo $h['atk']; ?></td><td><?php echo $h['attack']; ?></td></tr>
<tr><td>Defence</td><td><?php echo $h['di']."/".$h['dc']; ?></td><td><?php echo $h['defence']; ?></td></tr>
<tr><td>Off-Bonus</td><td><?php echo ($h['ob']-1)*100; ?>%</td><td><?php echo $h['attackbonus']; ?></td></tr>
<tr><td>Def-Bonus</td><td><?php echo ($h['db']-1)*100; ?>%</td><td><?php echo $h['defencebonus']; ?></td></tr>
<tr><td>Regeneration</td><td><?php echo ($h['regeneration']*5*SPEED); ?>/Day</td><td><?php echo $h['regeneration']; ?></td></tr>
<tr> <tr>
<td>Offence</td>
<td><?php echo $h['atk']; ?></td>
<td><?php echo $h['attack']; ?></td>
</tr>
<tr>
<td>Defence</td>
<td><?php echo $h['di'] . "/" . $h['dc']; ?></td>
<td><?php echo $h['defence']; ?></td>
</tr>
<tr>
<td>Off-Bonus</td>
<td><?php echo ($h['ob']-1)*100; ?>%</td>
<td><?php echo $h['attackbonus']; ?></td>
</tr>
<tr>
<td>Def-Bonus</td>
<td><?php echo ($h['db']-1)*100; ?>%</td>
<td><?php echo $h['defencebonus']; ?></td>
</tr>
<tr>
<td>Regeneration</td>
<td><?php echo ($h['regeneration']*5*SPEED); ?>/Day</td>
<td><?php echo $h['regeneration']; ?></td>
<tr>
<?php
$count_level_exp=500-intval($h['attack']+$h['defence']+$h['attackbonus']+$h['defencebonus']+$h['regeneration']);
if ($h['points']>$count_level_exp) $h['points']=$count_level_exp;
if($h['experience'] < 495000){ ?>
<td>Experience: <?php echo (int) (($h['experience'] - $hero_levels[$h['level']]) / ($hero_levels[$h['level']+1] - $hero_levels[$h['level']])*100) ?>%</td>
<td colspan="2"><?php echo $h['points']; ?></td>
<?php }else{ ?>
<td>Experience: 100%</td>
<td colspan="2"><?php echo $h['points']; ?></td>
<?php } ?>
</tr>
<tr>
<td>Health</td>
<td colspan="2"><?php echo round($h['health']); ?>%</td>
<tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<?php <?php
} else { $count_level_exp=500-intval($h['attack']+$h['defence']+$h['attackbonus']+$h['defencebonus']+$h['regeneration']);
if ($h['points']>$count_level_exp) $h['points']=$count_level_exp;
$expPct = ($h['experience'] < 495000) ? (int)(($h['experience'] - $hero_levels[$h['level']]) / ($hero_levels[$h['level']+1] - $hero_levels[$h['level']])*100) : 100;
?> ?>
<tr> <td>Experience: <?php echo $expPct; ?>%</td>
<td colspan="3">&nbsp;</td> <td colspan="2"><?php echo $h['points']; ?><div class="hero-bar"><div class="hero-bar-fill" style="width:<?php echo $expPct; ?>%"></div></div></td>
</tr> </tr>
<?php <tr><td>Health</td><td colspan="2"><?php echo round($h['health']); ?>%<div class="hero-bar"><div class="hero-bar-fill" style="width:<?php echo round($h['health']); ?>%"></div></div></td></tr>
} <tr><td colspan="3" style="height:8px;background:#f8fafc"></td></tr>
} <?php } else { ?>
} <tr><td colspan="3" style="height:8px;background:#f8fafc"></td></tr>
?> <?php } } } ?>
</table> </table>
<?php
if(isset($_GET['e'])){ <?php
echo '<div align="center"><font color="Red"><b>Here could not be killed due to an unexpected error.</font></b></div>'; if(isset($_GET['e'])) echo '<div class="notice notice-red"><b>Hero could not be killed.</b></div>';
}elseif(isset($_GET['kc'])){ elseif(isset($_GET['kc'])) echo '<div class="notice notice-blue"><b>Hero has been killed.</b></div>';
echo '<div align="center"><font color="blue"><b>Hero has been killed.</b></font></div>'; elseif(isset($_GET['rc'])) echo '<div class="notice notice-blue"><b>Hero has been revived.</b></div>';
}elseif(isset($_GET['rc'])){ elseif(isset($_GET['re'])) echo '<div class="notice notice-red"><b>Cannot revive another hero lives.</b></div>';
echo '<div align="center"><font color="blue"><b>Hero has been revived.</b></font></div>'; elseif(isset($_GET['ac'])) echo '<div class="notice notice-blue"><b>New hero added.</b></div>';
}elseif(isset($_GET['re'])){ elseif(isset($_GET['cs'])) echo '<div class="notice notice-blue"><b>Hero information saved.</b></div>';
echo '<div align="center"><font color="red"><b>Hero cannot be revived because another hero still lives or is in revival.</b></font></div>'; elseif(isset($_GET['ce'])) echo '<div class="notice notice-red"><b>Edit failed.</b></div>';
}elseif(isset($_GET['ac'])){ ?>
echo '<div align="center"><font color="blue"><b>A new hero was added.</b></font></div>'; </div>
}elseif(isset($_GET['cs'])){
echo '<div align="center"><font color="blue"><b>Hero information has been saved.</b></font></div>';
}elseif(isset($_GET['ce'])){
echo '<div align="center"><font color="Red"><b>Hero data could not be edited due to an unexpected error.</b></font></div>';
}
?>
+224 -260
View File
@@ -1,270 +1,234 @@
<? php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : playerinfo.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : ronix (Original) ##
## Refactored by : iopietro ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
?>
<table id="profile" cellpadding="1" cellspacing="1" > <table id="profile" cellpadding="1" cellspacing="1" >
<thead> <style>
<tr> #profile{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;box-shadow:0 4px 12px rgba(0,0,0,.05);font-family:system-ui}
<th colspan="2">Player <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo $user['username'];?></a></th> #profile thead tr:first-child th{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:6px 10px;font-size:14px;font-weight:600;text-align:left}
</tr> #profile thead tr:first-child th a{color:#93c5fd;text-decoration:none}
<tr> #profile thead tr:first-child th a:hover{text-decoration:underline}
<td>Details</td> #profile thead tr:nth-child(2) td{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;letter-spacing:.5px;padding:4px 8px;border-bottom:1px solid #e5e7eb;font-weight:600}
<td>Description</td> #profile tbody td.empty{height:2px;background:#fff;border:0}
</tr> #profile td.details{width:32%;vertical-align:top;padding:0;background:#fff}
</thead> #profile td.details table{width:100%;border-collapse:collapse}
<tbody> #profile td.details th{width:38%;text-align:left;padding:3px 8px;font-size:12px;color:#64748b;font-weight:500;border-bottom:1px solid #f1f5f9;background:#fcfcfd;line-height:1.2}
<tr> #profile td.details td{padding:3px 8px;font-size:12px;color:#0f172a;border-bottom:1px solid #f1f5f9;line-height:1.2}
<td class="empty"></td><td class="empty"></td> #profile td.details tr:hover td,#profile td.details tr:hover th{background:#f8fafc}
</tr> #profile td.details tr:last-child th,#profile td.details tr:last-child td{border-bottom:0}
<tr> #profile td.desc1{vertical-align:top;padding:0;background:#fff;border-left:1px solid #e5e7eb;width:68%}
<td class="details"> .desc-block{padding:6px 8px;border-bottom:1px solid #f1f5f9}
<table cellpadding="0" cellspacing="0"> .desc-block:last-child{border-bottom:0}
<tr> .desc-title{font-size:11px;text-transform:uppercase;color:#64748b;font-weight:600;margin-bottom:4px;letter-spacing:.4px}
<th>Rank</th> .desc1div,.desc2div{min-height:0;max-height:160px;overflow:auto;font-size:12px;line-height:1.3;color:#334155;text-align:center}
<td><?php $ranking->procRankArray();echo $ranking->getUserRank($user['id']); ?></td> #profile a{color:#2563eb;text-decoration:none}
</tr> #profile a:hover{text-decoration:underline}
<tr> #profile .rn3{color:#dc2626!important}
<th>Tribe</th> .badge-tribe{display:inline-block;padding:1px 6px;border-radius:5px;font-size:10.5px;font-weight:600;background:#e2e8f0;color:#334155}
<td> </style>
<?php
if($user['tribe'] == 1)
{
echo "Roman";
}
else if($user['tribe'] == 2)
{
echo "Teutons";
}
else if($user['tribe'] == 3)
{
echo "Gauls";
}
else if($user['tribe'] == 4)
{
echo "Natars";
}
else if($user['tribe'] == 5)
{
echo "Nature";
}
?>
</td>
</tr>
<tr>
<th>Alliance</th>
<td>
<?php
if($user['alliance'] == 0)
{
echo "-";
}
else
{
echo "<a href=\"?p=alliance&aid=".$user['alliance']."\">".$database->getAllianceName($user['alliance'])."</a>";
}
?>
</td>
</tr>
<tr>
<th>Villages</th>
<td><?php echo count($varray);?></td>
</tr>
<tr>
<th>Population</th>
<td><?php echo $totalpop;?> <a href="?action=recountPopUsr&uid=<?php echo $user['id'];?>"><?php echo $refreshicon; ?></a></td>
</tr>
<tr>
<th>Age</td>
<td>
<?php
if(isset($user['birthday']) && $user['birthday'] != 0)
{
$age = date("Y")-substr($user['birthday'],0,4);
echo $age;
}
else
{
echo "<font color=\"red\">Not Available</font>";
}
?>
</td>
</tr>
<tr>
<th>Gender</td>
<td>
<?php
if(isset($user['gender']) && $user['gender'] != 0)
{
$gender = ($user['gender']== 1)? "Male" : "Female";
echo $gender;
}
else
{
echo "<font color=\"red\">Not Available</font>";
}
?>
</td>
</tr>
<tr> <thead>
<th>Username</th> <tr>
<td> <th colspan="2">Player <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo $user['username'];?></a></th>
<form action="../GameEngine/Admin/Mods/editUsername.php" method="POST"> </tr>
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>"> <tr>
<input type="hidden" name="uid" id="uid" value="<?php echo $_GET['uid']; ?>"> <td>Details</td>
<input type="text" style="width: 80%;" class="fm" name="username" value="<?php echo $user['username']; ?>"> <input type="image" value="submit" src="../img/admin/edit.gif" title="Edit Username"></a> <td>Description</td>
</td> </tr>
</tr> </thead>
<tbody>
<tr>
<td class="empty"></td><td class="empty"></td>
</tr>
<tr>
<td class="details">
<table cellpadding="0" cellspacing="0">
<tr>
<th>Rank</th>
<td><?php $ranking->procRankArray();echo $ranking->getUserRank($user['id']);?></td>
</tr>
<tr>
<th>Tribe</th>
<td>
<?php
if($user['tribe'] == 1) { echo '<span class="badge-tribe">Roman</span>'; }
else if($user['tribe'] == 2) { echo '<span class="badge-tribe">Teutons</span>'; }
else if($user['tribe'] == 3) { echo '<span class="badge-tribe">Gauls</span>'; }
else if($user['tribe'] == 4) { echo '<span class="badge-tribe">Nature</span>'; }
else if($user['tribe'] == 5) { echo '<span class="badge-tribe">Natars</span>'; }
?>
</td>
</tr>
<tr>
<th>Alliance</th>
<td>
<?php
if($user['alliance'] == 0) { echo "-"; }
else { echo "<a href=\"?p=alliance&aid=".$user['alliance']."\">".$database->getAllianceName($user['alliance'])."</a>"; }
?>
</td>
</tr>
<tr>
<th>Villages</th>
<td><?php echo count($varray);?></td>
</tr>
<tr>
<th>Population</th>
<td><?php echo number_format($totalpop,0,',','.'); ?>
<a href="?action=recountPopUsr&uid=<?php echo $user['id'];?>" title="Recount population" style="margin-left:6px;vertical-align:middle;display:inline-flex">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#64748b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M21 12a9 9 0 1 1-3-6.7"/>
<path d="M21 3v6h-6"/>
</svg>
</a>
</td>
</tr>
<tr>
<th>Age</th>
<td>
<?php
if(isset($user['birthday']) && $user['birthday']!= 0) {
$age = date("Y")-substr($user['birthday'],0,4);
echo $age;
} else {
echo "<span style='color:#dc2626'>Not Available</span>";
}
?>
</td>
</tr>
<tr>
<th>Gender</th>
<td>
<?php
if(isset($user['gender']) && $user['gender']!= 0) {
$gender = ($user['gender']== 1)? "Male" : "Female";
echo $gender;
} else {
echo "<span style='color:#dc2626'>Not Available</span>";
}
?>
</td>
</tr>
<tr> <tr>
<th>Location</th> <th>Username</th>
<td> <td><?php echo htmlspecialchars($user['username']?? '');?></td>
<input type="text" style="width: 80%;" disabled="disabled" class="fm" name="location" value="<?php echo $user['location']; ?>"> <a href="admin.php?p=editUser&uid=<?php echo $id; ?>"><img src="../img/admin/edit.gif" title="Edit Location"></a> </tr>
</td>
</tr>
<tr> <tr>
<th>Password</th> <th>Location</th>
<td> <td><?php echo htmlspecialchars($user['location']?? '');?></td>
Change <a href="admin.php?p=editPassword&uid=<?php echo $id; ?>"><img src="../img/admin/edit.gif" title="Change Password"></a> </tr>
</td>
</tr>
<tr> <tr>
<?php include("playerplusbonus.tpl"); ?> <th>Password</th>
<tr> <td>•••••••</td>
<th>Email</th> </tr>
<td>
<input disabled="disabled" style="width: 80%;" class="fm" name="email" value="<?php echo $user['email']; ?>"> <a href="admin.php?p=editUser&uid=<?php echo $id; ?>"><img src="../img/admin/edit.gif" title="Edit Email"></a>
</td>
</tr>
<?php /*
<tr>
<th>Send</th>
<td>
<?php
$link = "<a href=\"mailto:".$user['email']."\">".$user['email']."</a>";
echo $link;
?>
</td>
</tr> */ ?>
<tr>
<th>Quest</td>
<td>
<?php
## not sure if this is correct
$quest = $user['quest'];
if($quest == 1) { $questname = "Woodcutter"; }
elseif($quest ==2) {$questname = "Crop"; }
elseif($quest ==3) {$questname = "Your Villages Name"; }
elseif($quest ==4) {$questname = "Other Players"; }
elseif($quest ==5) {$questname = "Two Building Order"; }
elseif($quest ==6) {$questname = "Messages"; }
elseif($quest ==7) {$questname = "Huge Army!"; }
elseif($quest ==8) {$questname = "Everything to 1!"; }
elseif($quest ==9) {$questname = "Dove of Peace"; }
elseif($quest ==10) {$questname = "Cranny"; }
elseif($quest ==11) {$questname = "To Two!"; }
elseif($quest ==12) {$questname = "Instruction"; }
elseif($quest ==13) {$questname = "Main Building"; }
elseif($quest ==14) {$questname = "Advanced!" ;}
elseif($quest ==15) {$questname = "Weapons or Dough"; }
elseif($quest ==16) {$questname = "Military: Rally Point"; }
elseif($quest ==17) {$questname = "Military: Barracks"; }
elseif($quest ==18) {$questname = "Military: Train 2 Troops"; }
elseif($quest ==19) {$questname = "Economy: Granary"; }
elseif($quest ==20) {$questname = "Economy: Warehouse"; }
elseif($quest ==21) {$questname = "Economy: Marketplace"; }
elseif($quest ==22) {$questname = "Everything to 2!"; }
elseif($quest ==28) {$questname = "Alliance : Join to one"; }
elseif($quest ==29) {$questname = "Main Building to 5"; }
elseif($quest ==30) {$questname = "Granary to Level 3"; }
elseif($quest ==31) {$questname = "Warehouse to Level 7"; }
elseif($quest ==32) {$questname = "Everything to 5!"; }
elseif($quest ==33) {$questname = "Palace or Residence"; }
elseif($quest ==34) {$questname = "3 settlers"; }
elseif($quest ==35) {$questname = "New Village"; }
elseif($quest ==36) {$questname = "Build a Wall/Palisade"; }
elseif($quest >=37) {$questname = "Finish"; }
else { $questname = "Unknown"; }
$quesst = $quest;
$questinfo = "$quesst - $questname";
?>
<input disabled="disabled" style="width: 80%;" class="fm" name="quest" value="<?php echo $questinfo; ?>"> <a href="admin.php?p=editUser&uid=<?php echo $id; ?>"><img src="../img/admin/edit.gif" title="Edit Quest"></a></td>
</tr>
<tr>
<td colspan="2" class="empty"></td>
</tr>
<?php <tr>
if($_SESSION['access'] == ADMIN) <?php include("playerplusbonus.tpl");?>
{ <tr>
echo ' <th>Email</th>
<tr> <td><?php echo htmlspecialchars($user['email']?? '');?></td>
<td colspan="2"> </tr>
<a href="?p=editUser&uid='.$user['id'].'"><font color="blue">&raquo;</font> Edit User</a>
</td>
</tr>';
}
else if($_SESSION['access'] == MULTIHUNTER)
{
echo '';
}
if($_SESSION['access'] == ADMIN)
{
echo '
<tr>
<td colspan="2">
<a class="rn3" href="?p=deletion&uid='.$user['id'].'"><font color="red">&raquo;</font> Delete User</a>
</td>
</tr>';
}
else if($_SESSION['access'] == MULTIHUNTER)
{
echo '';
}
?>
<tr> <tr>
<td colspan="2"><a href="?p=ban&uid=<?php echo $user['id']; ?>">&raquo; Ban User</a></td> <th>Quest</th>
</tr> <td>
<?php
$quest = $user['quest'];
if($quest == 1) { $questname = "Woodcutter"; }
elseif($quest ==2) {$questname = "Crop"; }
elseif($quest ==3) {$questname = "Your Villages Name"; }
elseif($quest ==4) {$questname = "Other Players"; }
elseif($quest ==5) {$questname = "Two Building Order"; }
elseif($quest ==6) {$questname = "Messages"; }
elseif($quest ==7) {$questname = "Huge Army!"; }
elseif($quest ==8) {$questname = "Everything to 1!"; }
elseif($quest ==9) {$questname = "Dove of Peace"; }
elseif($quest ==10) {$questname = "Cranny"; }
elseif($quest ==11) {$questname = "To Two!"; }
elseif($quest ==12) {$questname = "Instruction"; }
elseif($quest ==13) {$questname = "Main Building"; }
elseif($quest ==14) {$questname = "Advanced!" ;}
elseif($quest ==15) {$questname = "Weapons or Dough"; }
elseif($quest ==16) {$questname = "Military: Rally Point"; }
elseif($quest ==17) {$questname = "Military: Barracks"; }
elseif($quest ==18) {$questname = "Military: Train 2 Troops"; }
elseif($quest ==19) {$questname = "Economy: Granary"; }
elseif($quest ==20) {$questname = "Economy: Warehouse"; }
elseif($quest ==21) {$questname = "Economy: Marketplace"; }
elseif($quest ==22) {$questname = "Everything to 2!"; }
elseif($quest ==28) {$questname = "Alliance : Join to one"; }
elseif($quest ==29) {$questname = "Main Building to 5"; }
elseif($quest ==30) {$questname = "Granary to Level 3"; }
elseif($quest ==31) {$questname = "Warehouse to Level 7"; }
elseif($quest ==32) {$questname = "Everything to 5!"; }
elseif($quest ==33) {$questname = "Palace or Residence"; }
elseif($quest ==34) {$questname = "3 settlers"; }
elseif($quest ==35) {$questname = "New Village"; }
elseif($quest ==36) {$questname = "Build a Wall/Palisade"; }
elseif($quest >=37) {$questname = "Finish"; }
else { $questname = "Unknown"; }
echo $quest." - ".$questname;
?>
</td>
</tr>
<tr>
<td colspan="2" class="empty"></td>
</tr>
<tr> <?php
<td colspan="2"><a href="?p=Newmessage&uid=<?php echo $user['id']; ?>">&raquo; Send Message</a></td> if($_SESSION['access'] == ADMIN) {
</tr> echo '<tr><td colspan="2"><a href="?p=editUser&uid='.$user['id'].'">&raquo; Edit User</a></td></tr>';
}
if($_SESSION['access'] == ADMIN) {
echo '<tr><td colspan="2"><a class="rn3" href="?p=deletion&uid='.$user['id'].'">&raquo; Delete User</a></td></tr>';
}
?>
<tr> <tr><td colspan="2"><a href="?p=ban&uid=<?php echo $user['id'];?>">&raquo; Ban User</a></td></tr>
<td colspan="2"><a href="?p=editPlus&uid=<?php echo $user['id']; ?>">&raquo; Edit Plus & Res Bonus</a></td> <tr><td colspan="2"><a href="?p=Newmessage&uid=<?php echo $user['id'];?>">&raquo; Send Message</a></td></tr>
</tr> <tr><td colspan="2"><a href="?p=editPlus&uid=<?php echo $user['id'];?>">&raquo; Edit Plus & Res Bonus</a></td></tr>
<tr><td colspan="2"><a href="?p=editSitter&uid=<?php echo $user['id'];?>">&raquo; Edit Sitters</a></td></tr>
<!-- BUTON NOU ADAUGAT -->
<tr><td colspan="2"><a href="?p=editProtection&uid=<?php echo $user['id'];?>">&raquo; Edit Protection</a></td></tr>
<tr><td colspan="2"><a href="?p=editPassword&uid=<?php echo $user['id'];?>">&raquo; Edit Password</a></td></tr>
<tr><td colspan="2"><a href="?p=editOverall&uid=<?php echo $user['id'];?>">&raquo; Edit Overall Off & Def</a></td></tr>
<tr><td colspan="2"><a href="?p=editWeek&uid=<?php echo $user['id'];?>">&raquo; Edit Weekly Off, Def, Raid</a></td></tr>
<tr><td colspan="2"><a href="?p=userlogin&uid=<?php echo $user['id'];?>">&raquo; User Login Log</a></td></tr>
<tr><td colspan="2"><a href="?p=userillegallog&uid=<?php echo $user['id'];?>">&raquo; User Illegal Log</a></td></tr>
<tr> <tr>
<td colspan="2"><a href="?p=editSitter&uid=<?php echo $user['id']; ?>">&raquo; Edit Sitters</a></td> <td colspan="2" class="desc2">
</tr> <div class="desc2div">
<center><?php echo nl2br($profiel[0]?? '');?></center>
<tr> </div>
<td colspan="2"><a href="?p=editOverall&uid=<?php echo $user['id']; ?>">&raquo; Edit Overall Off & Def</a></td> </td>
</tr> </tr>
</table>
<tr> <td class="desc1"><div class="desc1div">
<td colspan="2"><a href="?p=editWeek&uid=<?php echo $user['id']; ?>">&raquo; Edit Weekly Off, Def, Raid</a></td> <center><?php echo nl2br($profiel[1]?? '');?></center>
</tr> </div></td>
</tr>
<tr> </tbody>
<td colspan="2"><a href="?p=userlogin&uid=<?php echo $user['id']; ?>">&raquo; User Login Log</a></td> </table>
</tr>
<tr>
<td colspan="2"><a href="?p=userillegallog&uid=<?php echo $user['id']; ?>">&raquo; User Illegal Log</a></td>
</tr>
<tr>
<td colspan="2" class="desc2">
<div class="desc2div">
<center><?php echo nl2br($profiel[0]); ?></center>
</div>
</td>
</tr>
</table>
<td class="desc1"><div class="desc1div">
<center><?php echo nl2br($profiel[1]); ?></center>
</div></td>
</tr>
</tbody>
</table>
</form>
+82 -82
View File
@@ -1,83 +1,83 @@
<table id="profile"> <style>
<thead> .medals-wrap{font-family:system-ui;margin-top:12px}
<tr> .medals-head{width:100%;background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:8px 12px;font-weight:600;text-align:center;font-size:13px;border:1px solid #0f172a;border-radius:10px 10px 0 0;box-sizing:border-box}
<th colspan="6">Player Medals (<?php echo sizeof($varmedal); ?>)</th> .medals-table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-top:0;border-radius:0 0 10px 10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04)}
</tr> .medals-table tr.head td{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;padding:6px 8px;font-weight:600;border-bottom:1px solid #e5e7eb;text-align:center}
<tr> .medals-table td{padding:6px 8px;border-bottom:1px solid #f1f5f9;font-size:12px;color:#334155;text-align:center;vertical-align:middle}
<td>Category</td> .medals-table tr:last-child td{border-bottom:0}
<td>Rank</td> .medals-table tr:hover td{background:#f8fafc}
<td>Week</td> .medals-table img.medal{width:28px;height:40px;object-fit:contain}
<td>Points</td> .medals-del{background:none;border:0;padding:0;cursor:pointer;display:inline-flex;opacity:.7;transition:.15s}
<td>Medal</td> .medals-del:hover{opacity:1}
<td></td> .medals-del svg{width:14px;height:14px;stroke:#dc2626;stroke-width:2;fill:none;stroke-linecap:round}
</tr> .no-medals{padding:20px;text-align:center;color:#94a3b8;font-style:italic}
</thead> .avg-row td{background:#f8fafc !important;font-weight:600;color:#0f172a}
<?php </style>
if(empty($varmedal)){ ?>
<td colspan="5"><div style="text-align: center">This player has no medals yet</div></td><?php
}
elseif(!empty($varmedal)){
foreach($varmedal as $medal){
$title = "Bonus";
switch ($medal['categorie']){
case 1: $title = "Attackers"; break;
case 2: $title = "Defenders"; break;
case 3: $title = "Climbers"; break;
case 4: $title = "Robbers"; break;
case 5: $title = "Top 10 Att and Def"; break;
case 6: $title = "Top 3 Att, ".$medal['points']." in a row"; break;
case 7: $title = "Top 3 Def,".$medal['points']." in a row"; break;
case 8: $title = "Top 3 Climber, ".$medal['points']." in a row"; break;
case 9: $title = "Top 3 Robber, ".$medal['points']." in a row"; break;
case 10: $title = "Climber of the week"; break;
case 11: $title = "Top 3 Climber, ".$medal['points']." in a row"; break;
case 12: $title = "Top 10 Attacker, ".$medal['points']." in a row"; break;
}
$rank = $medal['plaats']; <div class="medals-wrap">
if($rank == 0) $rank = "<p>Bonus</p>"; <div class="medals-head">Player Medals (<?php echo sizeof($varmedal); ?>)</div>
<table class="medals-table">
$week = $medal['week']; <tr class="head">
$points = $medal['points']; <td>CATEGORY</td>
if($points == '') $points = "<p>Bonus</p>"; <td>RANK</td>
<td>WEEK</td>
echo" <td>POINTS</td>
<tr> <td>MEDAL</td>
<td>$title</td> <td style="width:30px"></td>
<td>$rank</td> </tr>
<td>$week</td> <?php
<td>$points</td> if(empty($varmedal)){ ?>
<td><img src=\"../gpack/travian_default/img/t/".$medal['img'].".jpg\"></td> <tr><td colspan="6" class="no-medals">This player has no medals yet</td></tr>
<form action=\"../GameEngine/Admin/Mods/medals.php\" method=\"POST\"> <?php } else {
<td> foreach($varmedal as $medal){
<input type=\"hidden\" name=\"uid\" value=\"".$_GET['uid']."\"> $title = "Bonus";
<input type=\"hidden\" name=\"medalid\" value=\"".$medal['id']."\" > switch ($medal['categorie']){
<input type=\"image\" style=\"background-image: url('../gpack/travian_default/img/a/del.gif'); height: 12px; width: 12px;\" src=\"../gpack/travian_default/img/a/x.gif\"> case 1: $title = "Attackers"; break;
</td> case 2: $title = "Defenders"; break;
</form> case 3: $title = "Climbers"; break;
</tr>"; case 4: $title = "Robbers"; break;
} case 5: $title = "Top 10 Att and Def"; break;
case 6: $title = "Top 3 Att, ".$medal['points']." in a row"; break;
$averagerank = 0; case 7: $title = "Top 3 Def,".$medal['points']." in a row"; break;
foreach($varmedal as $medal){ case 8: $title = "Top 3 Climber, ".$medal['points']." in a row"; break;
$rank = $medal['plaats']; case 9: $title = "Top 3 Robber, ".$medal['points']." in a row"; break;
if($rank > 0){ case 10: $title = "Climber of the week"; break;
if(is_numeric($rank)){ case 11: $title = "Top 3 Climber, ".$medal['points']." in a row"; break;
$i++; case 12: $title = "Top 10 Attacker, ".$medal['points']." in a row"; break;
$averagerank += $medal['plaats']; }
} $rank = $medal['plaats'] == 0 ? "Bonus" : $medal['plaats'];
} $points = $medal['points'] == '' ? "Bonus" : $medal['points'];
} echo '
$average = round($averagerank / $i, 1); <tr>
echo "</form><tr><td><b>Average Rank</b></td><td>$average</td><td></td><td></td><td>Delete All</td>"; <td style="text-align:left">'.$title.'</td>
} <td>'.$rank.'</td>
?> <td>'.$medal['week'].'</td>
<td> <td>'.$points.'</td>
<form action="../GameEngine/Admin/Mods/medals.php" method="POST"> <td><img class="medal" src="../gpack/travian_default/img/t/'.$medal['img'].'.jpg"></td>
<input type="hidden" name="uid" value="<?php echo $_GET['uid']; ?>"> <td>
<input type="hidden" name="userid" value="<?php echo $id; ?>"> <form action="../GameEngine/Admin/Mods/medals.php" method="POST" style="margin:0">
<input type="image" style="background-image: url('../gpack/travian_default/img/a/del.gif'); height: 12px; width: 12px;" src="../gpack/travian_default/img/a/x.gif"> <input type="hidden" name="uid" value="'.$_GET['uid'].'">
</form> <input type="hidden" name="medalid" value="'.$medal['id'].'">
</td> <button type="submit" class="medals-del" title="Delete medal">
</tbody> <svg viewBox="0 0 24 24"><path d="M3 6h18M8 6V4h8v2m-1 0v14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V6h10z"/></svg>
</table> </button>
</form>
</td>
</tr>';
}
$averagerank = 0; $i = 0;
foreach($varmedal as $m){ if($m['plaats']>0){ $i++; $averagerank += $m['plaats']; } }
$average = $i ? round($averagerank/$i,1) : 0;
echo '<tr class="avg-row"><td style="text-align:left"><b>Average Rank</b></td><td>'.$average.'</td><td></td><td></td><td>Delete All</td>
<td>
<form action="../GameEngine/Admin/Mods/medals.php" method="POST" style="margin:0">
<input type="hidden" name="uid" value="'.$_GET['uid'].'">
<input type="hidden" name="userid" value="'.$id.'">
<button type="submit" class="medals-del" title="Delete all medals">
<svg viewBox="0 0 24 24"><path d="M3 6h18M8 6V4h8v2m-1 0v14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V6h10z"/></svg>
</button>
</form>
</td></tr>';
} ?>
</table>
</div>
+59 -187
View File
@@ -1,187 +1,59 @@
<th><b><font color='#71D000'>P</font><font color='#FF6F0F'>l</font><font color='#71D000'>u</font><font color='#FF6F0F'>s</font></b></th> <?php
<td>
<?php #################################################################################
$datetime = $user['plus']; ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
$now = time(); ## --------------------------------------------------------------------------- ##
if($datetime ==0) ## Filename : playerplusbonus.tpl ##
{ ## Type : Admin Panel Frontend ##
echo '<img src="../img/admin/del.gif">'; ## --------------------------------------------------------------------------- ##
echo "<font color=\"red\"> No Bonus</font>"; ## Developed by : ronix (Original) ##
} ## Refactored by : iopietro ##
else ## Redesign by : Shadow ##
{ ## --------------------------------------------------------------------------- ##
if($datetime <= $now) ## Contact : cata7007@gmail.com ##
{ ## Project : TravianZ ##
echo '<img src="../img/admin/del.gif">'; ## GitHub : https://github.com/Shadowss/TravianZ ##
echo "<font color=\"red\"> No Bonus</font>"; ## --------------------------------------------------------------------------- ##
} ## License : TravianZ Project ##
else ## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
{ ## --------------------------------------------------------------------------- ##
$tsdiffact = $datetime - $now; #################################################################################
$timetoecho = \App\Utils\DateTime::getTimeFormat($tsdiffact);
echo '<img src="../gpack/travian_default/img/new/tick.png" title="Ends: '.date('d.m.Y H:i',$user['plus']+3600*2).'">'; function fmt_bonus($ts){
echo "<font color=\"blue\"> $timetoecho</font>"; $now = time();
} $ts = (int)$ts;
} if($ts == 0 || $ts <= $now){
/*if(date('d.m.Y H:i',$user['plus']) == '01.01.1970 00:00') return '<span style="color:#cc0000;">✗ No Bonus</span>';
{ }
echo "Not enabled!</tr></th>"; $diff = $ts - $now;
} $days = floor($diff / 86400);
else $hours = floor(($diff % 86400) / 3600);
{ $mins = floor(($diff % 3600) / 60);
echo "".date('d.m.Y H:i',$user['plus']+3600*2)."</tr></th>";
} */ $out = '';
?> if($days > 0) $out .= $days.'d ';
<a href="admin.php?p=editPlus&uid=<?php echo $user['id']; ?>"><img src="../img/admin/edit.gif" title="Edit Plus and Bonus"></a></td> $out .= $hours.'h '.sprintf('%02dm', $mins);
</tr>
<tr> return '<span style="color:#0066cc;font-weight:bold;white-space:nowrap;">✓ '.$out.'</span>';
<th><img src="../img/admin/r/1.gif"> Bonus</th> }
<td> ?>
<?php <tr>
$datetime = $user['b1']; <th><b><font color='#71D000'>P</font><font color='#FF6F0F'>l</font><font color='#71D000'>u</font><font color='#FF6F0F'>s</font></b></th>
$now = time(); <td><?php echo fmt_bonus($user['plus']); ?></td>
if($datetime ==0) </tr>
{ <tr>
echo '<img src="../img/admin/del.gif">'; <th><img src="../img/admin/r/1.gif"> Bonus</th>
echo "<font color=\"red\"> No Bonus</font>"; <td><?php echo fmt_bonus($user['b1']); ?></td>
} </tr>
else <tr>
{ <th><img src="../img/admin/r/2.gif"> Bonus</th>
if($datetime <= $now) <td><?php echo fmt_bonus($user['b2']); ?></td>
{ </tr>
echo '<img src="../img/admin/del.gif">'; <tr>
echo "<font color=\"red\"> No Bonus</font>"; <th><img src="../img/admin/r/3.gif"> Bonus</th>
} <td><?php echo fmt_bonus($user['b3']); ?></td>
else </tr>
{ <tr>
$tsdiffact = $datetime - $now; <th><img src="../img/admin/r/4.gif"> Bonus</th>
$timetoecho = \App\Utils\DateTime::getTimeFormat($tsdiffact); <td><?php echo fmt_bonus($user['b4']); ?></td>
echo '<img src="../gpack/travian_default/img/new/tick.png" title="Ends: '.date('d.m.Y H:i',$user['b1']+3600*2).'">'; </tr>
echo "<font color=\"blue\"> $timetoecho</font>";
}
}
/*if(date('d.m.Y H:i',$user['b1']) == '01.01.1970 00:00')
{
echo "Not enabled!</tr></th>";
}
else
{
echo "".date('d.m.Y H:i',$user['b1']+3600*2)."</tr></th>";
} */
?>
<a href="admin.php?p=editPlus&uid=<?php echo $user['id']; ?>"><img src="../img/admin/edit.gif" title="Edit Plus and Bonus"></a></td>
</tr>
<tr>
<th><img src="../img/admin/r/2.gif"> Bonus</th>
<td>
<?php
$datetime = $user['b2'];
$now = time();
if($datetime ==0)
{
echo '<img src="../img/admin/del.gif">';
echo "<font color=\"red\"> No Bonus</font>";
}
else
{
if($datetime <= $now)
{
echo '<img src="../img/admin/del.gif">';
echo "<font color=\"red\"> No Bonus</font>";
}
else
{
$tsdiffact = $datetime - $now;
$timetoecho = \App\Utils\DateTime::getTimeFormat($tsdiffact);
echo '<img src="../gpack/travian_default/img/new/tick.png" title="Ends: '.date('d.m.Y H:i',$user['b2']+3600*2).'">';
echo "<font color=\"blue\"> $timetoecho</font>";
}
}
/*
if(date('d.m.Y H:i',$user['b2']) == '01.01.1970 00:00')
{
echo "Not enabled!</tr></th>";
}
else
{
echo "".date('d.m.Y H:i',$user['b2']+3600*2)."</tr></th>";
} */
?>
<a href="admin.php?p=editPlus&uid=<?php echo $user['id']; ?>"><img src="../img/admin/edit.gif" title="Edit Plus and Bonus"></a></td>
</tr>
<tr>
<th><img src="../img/admin/r/3.gif"> Bonus</th>
<td>
<?php
$datetime = $user['b3'];
$now = time();
if($datetime ==0)
{
echo '<img src="../img/admin/del.gif">';
echo "<font color=\"red\"> No Bonus</font>";
}
else
{
if($datetime <= $now)
{
echo '<img src="../img/admin/del.gif">';
echo "<font color=\"red\"> No Bonus</font>";
}
else
{
$tsdiffact = $datetime - $now;
$timetoecho = \App\Utils\DateTime::getTimeFormat($tsdiffact);
echo '<img src="../gpack/travian_default/img/new/tick.png" title="Ends: '.date('d.m.Y H:i',$user['b3']+3600*2).'">';
echo "<font color=\"blue\"> $timetoecho</font>";
}
}
/*
if(date('d.m.Y H:i',$user['b3']) == '01.01.1970 00:00')
{
echo "Not enabled!</tr></th>";
}
else
{
echo "".date('d.m.Y H:i',$user['b3']+3600*2)."</tr></th>";
} */
?>
<a href="admin.php?p=editPlus&uid=<?php echo $user['id']; ?>"><img src="../img/admin/edit.gif" title="Edit Plus and Bonus"></a></td>
</tr>
<tr>
<th><img src="../img/admin/r/4.gif"> Bonus</th>
<td>
<?php
$datetime = $user['b4'];
$now = time();
if($datetime ==0)
{
echo '<img src="../img/admin/del.gif">';
echo "<font color=\"red\"> No Bonus</font>";
}
else
{
if($datetime <= $now)
{
echo '<img src="../img/admin/del.gif">';
echo "<font color=\"red\"> No Bonus</font>";
}
else
{
$tsdiffact = $datetime - $now;
$timetoecho = \App\Utils\DateTime::getTimeFormat($tsdiffact);
echo '<img src="../gpack/travian_default/img/new/tick.png" title="Ends: '.date('d.m.Y H:i',$user['b4']+3600*2).'">';
echo "<font color=\"blue\"> $timetoecho</font>";
}
}
/*
if(date('d.m.Y H:i',$user['b4']) == '01.01.1970 00:00')
{
echo "Not enabled!</tr></th>";
}
else
{
echo "".date('d.m.Y H:i',$user['b4']+3600*2)."</tr></th>";
} */
?>
<a href="admin.php?p=editPlus&uid=<?php echo $user['id']; ?>"><img src="../img/admin/edit.gif" title="Edit Plus and Bonus"></a></td>
</tr>
+75 -81
View File
@@ -1,92 +1,86 @@
<?php <?php
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename punish.tpl ## ## Filename : punish.tpl ##
## Developed by: aggenkeech ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : ronix (Original) ##
## ## ## Refactored by : iopietro ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
$active = $admin->getUserActive(); $active = $admin->getUserActive();
?> ?>
<style> <style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);} .punish-box{width:100%;max-width:220px;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04);font-family:system-ui}
.punish-box th{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:6px 10px;font-weight:600;text-align:center;font-size:13px}
.punish-box td{padding:6px 8px;border-bottom:1px solid #f1f5f9;font-size:12px}
.punish-box tr:last-child td{border-bottom:0}
.punish-row{display:flex;align-items:center;justify-content:space-between;gap:6px}
.punish-box select{padding:3px 6px;font-size:12px;border:1px solid #cbd5e1;border-radius:5px;background:#fff}
.punish-box label{display:flex;align-items:center;gap:5px;cursor:pointer}
.btn-ok{padding:3px 10px;font-size:11px;font-weight:600;color:#fff;background:linear-gradient(180deg,#22c55e,#16a34a);border:0;border-radius:5px;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.1);text-transform:uppercase}
.btn-ok:hover{filter:brightness(1.05)}
</style> </style>
<form method="post" action="admin.php"> <table class="punish-box">
<input name="action" type="hidden" value="punish"> <thead><tr><th>Punish Player</th></tr></thead>
<input name="uid" type="hidden" value="<?php echo $user['id'];?>"> <tbody>
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>"> <tr><td>
<form method="post" action="admin.php" style="margin:0">
<table id="member" style="width: 200px;"> <input type="hidden" name="action" value="punish">
<thead> <input type="hidden" name="uid" value="<?php echo $user['id'];?>">
<tr> <input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
<th colspan="2">Punish Player</th> <div class="punish-row">
</tr> <select name="punish">
</thead> <option value="10" selected>10%</option>
<tbody> <option value="20">20%</option>
<tr> <option value="30">30%</option>
<td> <option value="40">40%</option>
<div style="text-align: center"> <option value="50">50%</option>
<select name="punish"> <option value="60">60%</option>
<option value="10" selected="selected">10%</option> <option value="70">70%</option>
<option value="20">20%</option> <option value="80">80%</option>
<option value="30">30%</option> <option value="90">90%</option>
<option value="40">40%</option> <option value="100">100%</option>
<option value="50">50%</option> </select>
<option value="60">60%</option> <button type="submit" class="btn-ok">OK</button>
<option value="70">70%</option> </div>
<option value="80">80%</option> </form>
<option value="90">90%</option> </td></tr>
<option value="100">100%</option>
</select> <tr><td>
</div> <form method="post" action="admin.php" style="margin:0">
</td> <input type="hidden" name="action" value="punish">
</tr> <input type="hidden" name="uid" value="<?php echo $user['id'];?>">
<tr> <input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
<td> <div class="punish-row">
<center> <label><input type="checkbox" name="del_troop" value="1"> <span style="text-decoration:line-through;color:#94a3b8">Delete Troops</span></label>
<input type="image" src="../img/admin/b/ok1.gif" value="submit"> <button type="submit" class="btn-ok">OK</button>
</form> </div>
</center> </form>
</td> </td></tr>
</tr>
<tr> <tr><td>
<form method="post" action="admin.php"> <form method="post" action="admin.php" style="margin:0">
<input name="action" type="hidden" value="punish"> <input type="hidden" name="action" value="punish">
<input name="uid" type="hidden" value="<?php echo $user['id'];?>"> <input type="hidden" name="uid" value="<?php echo $user['id'];?>">
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>"> <input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
<td colspan="1" style="text-align: center;"> <div class="punish-row">
<input type="checkbox" name="del_troop" value="1"> <strike>Delete Troops</strike> <label><input type="checkbox" name="clean_ware" value="1"> Empty Warehouses</label>
</td> <button type="submit" class="btn-ok">OK</button>
</tr> </div>
<tr> </form>
<td> </td></tr>
<center> </tbody>
<input type="image" src="../img/admin/b/ok1.gif" value="submit"> </table>
</form>
</center>
</td>
</tr>
<tr>
<form method="post" action="admin.php">
<input name="action" type="hidden" value="punish">
<input name="uid" type="hidden" value="<?php echo $user['id'];?>">
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
<td colspan="1" style="text-align: center;">
<input type="checkbox" name="clean_ware" value="1"> Empty Warehouses
</td>
</tr>
<tr>
<td>
<center>
<input type="image" src="../img/admin/b/ok1.gif" value="submit">
</center>
</td>
</tr>
</tbody>
</table><br />
</form>
-39
View File
@@ -1,39 +0,0 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename renameVillage.tpl ##
## Developed by: Dzoki & Advocatie ##
## License: TravianZ Project ##
## Thanks to: Dzoki & itay2277(Edit troops) ##
## Copyright: TravianZ (c) 2010-2011. All rights reserved. ##
#################################################################################
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
$id = $_GET['did'];
if(isset($id))
{
$village = $database->getVillage($id);
$user = $database->getUserArray($village['owner'],1);
$coor = $database->getCoor($village['wref']);
$varray = $database->getProfileVillages($village['owner']);
$type = $database->getVillageType($village['wref']);
$fdata = $database->getResourceLevel($village['wref']);
$units = $database->getUnit($village['wref']);
?>
<table id="member">
<thead>
<tr>
<th colspan="2">Edit Village Name</th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo $village['name']; ?></td>
</td>
</tbody>
</table>
<?php }?>
+14 -8
View File
@@ -1,16 +1,22 @@
<?php <?php
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename report.tpl ## ## Filename : report.tpl ##
## Developed by: Dzoki ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : ronix (Original) ##
## Enhanced: aggenkeech ## ## Refactored by : iopietro ##
## Refactored by: Shadow ## ## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!"); if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!");
include_once("../GameEngine/Generator.php"); include_once("../GameEngine/Generator.php");
include_once("../GameEngine/Technology.php"); include_once("../GameEngine/Technology.php");
-40
View File
@@ -1,40 +0,0 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename resetPlus.tpl ##
## Developed by: aggenkeech ##
## License: TravianZ Project ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
## ##
#################################################################################
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
$id = $_SESSION['id']; ?>
<form action="../GameEngine/Admin/Mods/mainteneceResetPlus.php" method="POST">
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
<table id="member" style="width:300px;">
<thead>
<tr>
<th colspan="2">Reset Everyone's Plus</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2">
<center>
<input type="image" src="../img/admin/b/ok1.gif" value="submit">
</center>
</td>
</tr>
</tbody>
</table>
</form>
<?php
if(isset($_GET['g']))
{
echo '<br /><br /><font color="Red"><b>Plus For Everyone Reset</font></b>';
}
?>
-40
View File
@@ -1,40 +0,0 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename resetPlusBonus.tpl ##
## Developed by: aggenkeech ##
## License: TravianZ Project ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
## ##
#################################################################################
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
$id = $_SESSION['id']; ?>
<form action="../GameEngine/Admin/Mods/mainteneceResetPlusBonus.php" method="POST">
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
<table id="member" style="width:300px;">
<thead>
<tr>
<th colspan="2">Reset Everyone's Resource Bonuses</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2">
<center>
<input type="image" src="../img/admin/b/ok1.gif" value="submit">
</center>
</td>
</tr>
</tbody>
</table>
</form>
<?php
if(isset($_GET['g']))
{
echo '<br /><br /><font color="Red"><b>Plus Resource Bonuses For Everyone Reset</font></b>';
}
?>
+60 -81
View File
@@ -2,101 +2,80 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename resetServer.php ## ## Filename : resetServer.php ##
## Developed by: Ronix ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2012-2014. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
include_once("../../GameEngine/config.php"); include_once("../../GameEngine/config.php");
include_once("../../GameEngine/Database.php"); include_once("../../GameEngine/Database.php");
if (session_status() !== PHP_SESSION_ACTIVE) { if (session_status() !== PHP_SESSION_ACTIVE) {
session_start(); session_start();
} }
if (!isset($_SESSION['access']) || (int)$_SESSION['access'] !== (int)ADMIN) { if (!isset($_SESSION['access']) || (int)$_SESSION['access'] < ADMIN) {
die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>"); die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
} }
set_time_limit(0); set_time_limit(0);
// TODO: truncate ALL tables (in a single query, not like this),
// then perform install steps (createDbStructure() && populateWorldData())
// .. no need for updates and inserts here, as that would keep autoincrements high
// and one nice day, after 100th reset, there will be no more integers to go for
// and the whole game would be screwed :P
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."a2b");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."abdata");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."activate");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."active");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."admin_log");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."alidata");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."ali_invite");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."ali_log");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."ali_permission");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."allimedal");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."artefacts");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."attacks");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."banlist");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."bdata");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."build_log");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."chat");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."config");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."deleting");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."demolition");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."diplomacy");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."enforcement");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."farmlist");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."fdata");
mysqli_query($GLOBALS["link"], "DELETE FROM ".TB_PREFIX."forum_cat WHERE forum_area != 1");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."forum_edit");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."forum_post");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."forum_survey");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."forum_topic");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."general");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."gold_fin_log");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."hero");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."illegal_log");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."links");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."login_log");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."market");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."market_log");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."mdata");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."medal");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."movement");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."ndata");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."online");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."password");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."prisoners");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."raidlist");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."research");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."route");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."send");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."tdata");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."tech_log");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."training");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."units");
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."wdata");
$time=time();
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."odata");
// 1. Salvăm adminul dacă e bifat
$keepAdmin = isset($_POST['keep_admin']) && $_POST['keep_admin'] == '1';
$adminData = null;
if($keepAdmin){
$admin_id = (int)$_SESSION['id'];
$res = mysqli_query($GLOBALS["link"], "SELECT username, password, email, access, tribe FROM `".TB_PREFIX."users` WHERE id = $admin_id LIMIT 1");
$adminData = mysqli_fetch_assoc($res);
}
$uid=$database->getVillageID(5); // 2. Golim tot - fără FK checks
mysqli_query($GLOBALS["link"], "SET FOREIGN_KEY_CHECKS=0");
$passw=password_hash("12345", PASSWORD_BCRYPT,['cost' => 12]); $tables = ["a2b","abdata","activate","active","admin_log","alidata","ali_invite","ali_log","ali_permission","allimedal","artefacts","attacks","banlist","bdata","build_log","chat","deleting","demolition","diplomacy","enforcement","farmlist","fdata","forum_cat","forum_edit","forum_post","forum_survey","forum_topic","general","gold_fin_log","hero","illegal_log","links","login_log","market","market_log","mdata","medal","movement","ndata","online","odata","password","prisoners","raidlist","research","route","send","tdata","tech_log","training","units","vdata","wdata","ww_attacks","users"];
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."users");
mysqli_query($GLOBALS["link"], "INSERT INTO ".TB_PREFIX."users (id, username, password, email, tribe, access, gold, gender, birthday, location, desc1, desc2, plus, b1, b2, b3, b4, sit1, sit2, alliance, sessid, act, timestamp, ap, apall, dp, dpall, protect, quest, gpack, cp, lastupdate, RR, Rc, ok) VALUES
(5, 'Multihunter', '".$passw."', 'multihunter@travianx.mail', 0, 9, 0, 0, '0000-00-00', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0),
(1, 'Support', '', 'support@travianz.game', 0, 8, 0, 0, '0000-00-00', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0),
(2, 'Nature', '', 'nature@travianz.game', 4, 8, 0, 0, '0000-00-00', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0),
(4, 'Taskmaster', '', 'taskmaster@travianz.game', 0, 8, 0, 0, '0000-00-00', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0)");
mysqli_query($GLOBALS["link"], "INSERT INTO ".TB_PREFIX."units (vref) VALUES ($uid)"); foreach($tables as $t){
mysqli_query($GLOBALS["link"], "INSERT INTO ".TB_PREFIX."tdata (vref) VALUES ($uid)"); mysqli_query($GLOBALS["link"], "TRUNCATE TABLE `".TB_PREFIX.$t."`");
}
mysqli_query($GLOBALS["link"], "INSERT INTO ".TB_PREFIX."fdata (vref, f1t, f2t, f3t, f4t, f5t, f6t, f7t, f8t, f9t, f10t, f11t, f12t, f13t, f14t, f15t, f16t, f17t, f18t, f26, f26t, wwname) VALUES ($uid, '1', '4', '1', '3', '2', '2', '3', '4', '4', '3', '3', '4', '4', '1', '4', '2', '1', '2', '1', '15', 'World Wonder')"); mysqli_query($GLOBALS["link"], "SET FOREIGN_KEY_CHECKS=1");
mysqli_query($GLOBALS["link"], "DELETE FROM ".TB_PREFIX."vdata WHERE owner<>5"); // 3. Recreăm structura și harta
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."ww_attacks"); $database->createDbStructure();
$database->populateWorldData();
// 4. Conturi sistem
$passw = password_hash("12345", PASSWORD_BCRYPT, ['cost' => 12]);
mysqli_query($GLOBALS["link"], "INSERT INTO `".TB_PREFIX."users` (id, username, password, email, tribe, access, gold, plus, protect) VALUES
(1, 'Support', '', 'support@travianz.game', 0, 8, 0, 0, 0),
(2, 'Nature', '', 'nature@travianz.game', 4, 8, 0, 0, 0),
(4, 'Taskmaster', '', 'taskmaster@travianz.game', 0, 8, 0, 0, 0),
(5, 'Multihunter', '$passw', 'multihunter@travianx.mail', 0, 9, 0, 0, 0)");
// 5. Reintroducem adminul
if($keepAdmin && $adminData){
$u = mysqli_real_escape_string($GLOBALS["link"], $adminData['username']);
$p = mysqli_real_escape_string($GLOBALS["link"], $adminData['password']);
$e = mysqli_real_escape_string($GLOBALS["link"], $adminData['email']);
$a = (int)$adminData['access'];
$t = (int)$adminData['tribe'];
// ID 6 ca să nu se calce cu sistemele
mysqli_query($GLOBALS["link"], "INSERT INTO `".TB_PREFIX."users` (id, username, password, email, tribe, access, gold, plus, protect) VALUES (6, '$u', '$p', '$e', $t, $a, 0, 0, 0)");
$_SESSION['id'] = 6; // actualizăm sesiunea
}
// 6. Log
mysqli_query($GLOBALS["link"], "INSERT INTO `".TB_PREFIX."admin_log` (user, ip, time, action) VALUES (".(int)$_SESSION['id'].", '".$_SERVER['REMOTE_ADDR']."', ".time().", 'Server reset".($keepAdmin ? ' (admin kept)' : '')."')");
header("Location: ../admin.php?p=resetdone"); header("Location: ../admin.php?p=resetdone");
?> exit;
?>
+88 -33
View File
@@ -2,40 +2,95 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename resetServer.tpl ## ## Filename : resetServer.tpl ##
## Developed by: Ronix ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2012-2014. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
?> ?>
<form action="" method="post"> <style>
<table id="member"> .reset-wrap{max-width:720px;margin:20px auto;font-family:Tahoma,Verdana,Arial,sans-serif;padding:0 10px;box-sizing:border-box}
<thead> .reset-card{background:#fff;border:1px solid #bbb;border-radius:8px;overflow:hidden;box-shadow:0 2px 6px rgba(0,0,0,0.08)}
<tr> .reset-head{background:#c0392b;color:#fff;padding:12px 16px;display:flex;align-items:center;gap:8px}
<th colspan="2">Server Resetting</th> .reset-head h2{margin:0;font-size:16px;font-weight:bold}
</tr> .reset-body{padding:24px 20px 10px;text-align:center;color:#333;font-size:13px;line-height:1.6}
</thead> .reset-warning{background:#fff5f5;border:1px solid #e74c3c;border-left:4px solid #c0392b;padding:14px;margin:0 auto 16px;max-width:520px;border-radius:4px;color:#a93226;text-align:left}
<tbody> .reset-warning strong{display:block;margin-bottom:4px;font-size:13px}
<tr> .reset-option{padding:0 20px 18px;text-align:left;background:#fff} /* DOAR ASTA E NOU */
<td colspan="2" id="txtreset"> .reset-option label{font-size:12px;color:#333;cursor:pointer}
<br> .reset-option input{margin-right:6px;vertical-align:-1px}
This server will be reset to create new game server.<br>Click button Reset to proceed..<br>&nbsp; .reset-foot{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;background:#f8f9fa;border-top:1px solid #ddd;gap:10px}
</td> .btn{padding:7px 16px;border-radius:4px;font-size:12px;font-weight:bold;cursor:pointer;border:1px solid transparent;text-decoration:none;display:inline-flex;align-items:center;gap:6px;transition:all 0.15s}
</tr> .btn-back{background:#ecf0f1;color:#2c3e50;border-color:#bdc3c7}
</tbody> .btn-back:hover{background:#d5dbdb}
<thead> .btn-reset{background:#c0392b;color:#fff;border-color:#a93226}
<tr id="hideobj"> .btn-reset:hover{background:#a93226}
<td style="border-right:none; text-align:left"><input name="back" type="button" src="img/x.gif" value="<< back" alt="back" onclick="go_url('../Admin/admin.php')" /></td> .btn:disabled{opacity:0.6;cursor:not-allowed}
<td style="border-left:none; text-align:right"><input name="reset" type="button" src="img/x.gif" value="Reset" alt="Reset" onclick="go_proceed()" /></td> .reset-loader{display:none;padding:30px 20px;text-align:center}
</tr> .reset-loader .spinner{width:28px;height:28px;border:3px solid #f3f3f3;border-top:3px solid #c0392b;border-radius:50%;animation:spin 1s linear infinite;margin:0 auto 12px}
</thead> @keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}
</table> @media (max-width:600px){
.reset-foot{flex-direction:column-reverse}
.btn{width:100%;justify-content:center}
}
</style>
<form action="Templates/resetServer.php" method="post" id="resetForm">
<div class="reset-wrap">
<div class="reset-card">
<div class="reset-head">
<h2>⚠️ Server Resetting</h2>
</div>
<div class="reset-body" id="txtreset">
<div class="reset-warning">
<strong>WARNING! Irreversible action</strong>
This operation will delete ALL data: players, watches, allies, reports. The server will be reset for a new game.
</div>
<p>This server will be reset to create new game server.<br>Click button <b>Reset</b> to proceed.</p>
</div>
<!-- BIFA MUTATA AICI, IN AFARA reset-body -->
<div class="reset-option">
<label>
<input type="checkbox" name="keep_admin" value="1" checked>
Keep Admin accout (<?php echo htmlspecialchars($_SESSION['username'] ?? 'Admin'); ?>) after reset
</label>
</div>
</br></br>
<div class="reset-loader" id="resetLoader">
<div class="spinner"></div>
<div>Please wait... while the server is being reset</div>
</div>
<div class="reset-foot" id="hideobj">
<button type="button" class="btn btn-back" onclick="go_url('../Admin/admin.php')">« Back</button>
<button type="button" class="btn btn-reset" onclick="go_proceed()">Reset Server</button>
</div>
</div>
</div>
</form> </form>
<script type="text/javascript"> <script type="text/javascript">
function go_proceed() { function go_proceed() {
document.getElementById("txtreset").innerHTML = '<br><center>Please wait..while the server was reset</center><br>&nbsp;'; if(!confirm('ARE YOU SURE? All data will be deleted permanently!')) return;
document.getElementById("hideobj").innerHTML = '';
location="Templates/resetServer.php"; document.getElementById("txtreset").style.display = 'none';
} document.querySelector('.reset-option').style.display = 'none';
</script> document.getElementById("hideobj").style.display = 'none';
document.getElementById("resetLoader").style.display = 'block';
setTimeout(function(){
document.getElementById('resetForm').submit();
}, 800);
}
</script>
+45 -34
View File
@@ -1,51 +1,62 @@
<?php <?php
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename results_alliances.tpl ## ## Filename : results_alliances.tpl ##
## Developed by: Dzoki ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
?>
<?php
$result = $admin->search_alliance($_POST['s']);
?>
<table id="member">
<thead>
<tr>
<th class="dtbl"><a href="">1 «</a></th><th>Found alliances (<?php echo count($result);?>)</th><th class="dtbl"><a href="">» 100</a></th>
</tr>
</thead>
</table> $result = $admin->search_alliance($_POST['s']); ?>
<table id="profile"> <style>
.search-wrap{font-family:system-ui;margin-top:10px}
.search-head{width:100%;background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:10px 12px;font-weight:600;text-align:center;font-size:14px;border:1px solid #0f172a;border-radius:10px 10px 0 0;box-shadow:0 2px 8px rgba(0,0,0,.08);box-sizing:border-box}
.search-table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-top:0;border-radius:0 0 10px 10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04);margin-bottom:12px}
.search-table tr:first-child td{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;padding:7px 10px;font-weight:600;border-bottom:1px solid #e5e7eb;text-align:center}
.search-table td{padding:7px 10px;border-bottom:1px solid #f1f5f9;font-size:13px;color:#334155;text-align:center}
.search-table tr:last-child td{border-bottom:0}
.search-table tr:hover td{background:#f8fafc}
.search-table a{color:#2563eb;text-decoration:none;font-weight:500}
.search-table a:hover{text-decoration:underline}
.no-res{padding:20px;text-align:center;color:#94a3b8;font-style:italic}
</style>
<div class="search-wrap">
<div class="search-head">Found alliances (<?php echo count($result);?>)</div>
<table class="search-table">
<tr> <tr>
<td class="b">AID</td> <td>AID</td>
<td class="b">Name</td> <td>NAME</td>
<td class="b">Tag</td> <td>TAG</td>
<td class="b">Founder</td> <td>FOUNDER</td>
</tr> </tr>
<?php <?php if($result){
if($result){
for ($i = 0; $i <= count($result)-1; $i++) { for ($i = 0; $i <= count($result)-1; $i++) {
$founder = $database->getUserField($result[$i]["leader"],'username',0);
echo ' echo '
<tr> <tr>
<td>'.$result[$i]["id"].'</td> <td>'.$result[$i]["id"].'</td>
<td><a href="?p=alliance&aid='.$result[$i]["id"].'">'.$result[$i]["name"].'</a></td> <td><a href="?p=alliance&aid='.$result[$i]["id"].'">'.$result[$i]["name"].'</a></td>
<td><a href="?p=alliance&aid='.$result[$i]["id"].'">'.$result[$i]["tag"].'</a></td> <td><a href="?p=alliance&aid='.$result[$i]["id"].'">'.$result[$i]["tag"].'</a></td>
<td><a href="?p=player&uid='.$result[$i]["id"].'">'.$database->getUserField($result[$i]["leader"],'username',0).'</a></td> <td><a href="?p=player&uid='.$result[$i]["leader"].'">'.$founder.'</a></td>
</tr>
';
}}
else{
echo '
<tr>
<td colspan="4">No results</td>
</tr> </tr>
'; ';
}} else {
echo '<tr><td colspan="4" class="no-res">No results</td></tr>';
} }
?> ?>
</table>
</table> </div>
+41 -31
View File
@@ -2,48 +2,58 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename resutls_email.tpl ## ## Filename : result_email.tpl ##
## Developed by: Dzoki ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
?> ?>
<?php <?php $result = $admin->search_email($_POST['s']); ?>
$result = $admin->search_email($_POST['s']); <style>
?> .search-wrap{font-family:system-ui;margin-top:10px}
<table id="member"> .search-head{width:100%;background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:10px 12px;font-weight:600;text-align:center;font-size:14px;border:1px solid #0f172a;border-radius:10px 10px 0 0;box-shadow:0 2px 8px rgba(0,0,0,.08);box-sizing:border-box}
<thead> .search-table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-top:0;border-radius:0 0 10px 10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04);margin-bottom:12px}
<tr> .search-table tr:first-child td{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;padding:7px 10px;font-weight:600;border-bottom:1px solid #e5e7eb;text-align:center}
<th class="dtbl"><a href="">1 «</a></th><th>Found emails (<?php echo count($result);?>)</th><th class="dtbl"><a href="">» 100</a></th> .search-table td{padding:7px 10px;border-bottom:1px solid #f1f5f9;font-size:13px;color:#334155;text-align:center;word-break:break-all}
</tr> .search-table tr:last-child td{border-bottom:0}
</thead> .search-table tr:hover td{background:#f8fafc}
.search-table a{color:#2563eb;text-decoration:none;font-weight:500}
.search-table a:hover{text-decoration:underline}
.no-res{padding:20px;text-align:center;color:#94a3b8;font-style:italic}
</style>
</table> <div class="search-wrap">
<table id="profile"> <div class="search-head">Found emails (<?php echo count($result);?>)</div>
<table class="search-table">
<tr> <tr>
<td class="b">UID</td> <td>UID</td>
<td class="b">Name</td> <td>NAME</td>
<td class="b">Email</td> <td>EMAIL</td>
</tr> </tr>
<?php <?php if($result){
if($result){
for ($i = 0; $i <= count($result)-1; $i++) { for ($i = 0; $i <= count($result)-1; $i++) {
$uname = $database->getUserField($result[$i]["id"],'username',0);
echo ' echo '
<tr> <tr>
<td>'.$result[$i]["id"].'</td> <td>'.$result[$i]["id"].'</td>
<td><a href="?p=player&uid='.$result[$i]["id"].'">'.$database->getUserField($result[$i]["id"],'username',0).'</a></td> <td><a href="?p=player&uid='.$result[$i]["id"].'">'.$uname.'</a></td>
<td>'.$result[$i]["email"].'</td> <td>'.$result[$i]["email"].'</td>
</tr> </tr>
'; ';
}} }} else {
else{ echo '<tr><td colspan="3" class="no-res">No results</td></tr>';
echo '
<tr>
<td colspan="4">No results</td>
</tr>
';
} }
?> ?>
</table>
</table> </div>
+58 -51
View File
@@ -2,62 +2,69 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename results_ip.tpl ## ## Filename : result_ip.tpl ##
## Developed by: Dzoki ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
?> ?>
<?php <?php
$result = $admin->search_ip($_POST['s']); $result = $admin->search_ip($_POST['s']);
$newArray = array(); $seen = [];
function arr($arr,$el){ $rows = [];
global $newArray;
for ($i = 0; $i <= count($arr)-1; $i++) {
if(in_array($el,$newArray)){
return false;
}else{
array_push($newArray,$el);
return true;
}
}
}
?>
<table id="member">
<thead>
<tr>
<th class="dtbl"><a href="">1 «</a></th><th>Found IPs (<?php echo count($newArray);?>)</th><th class="dtbl"><a href="">» 100</a></th>
</tr>
</thead>
</table>
<table id="profile">
<tr>
<td class="b">IP</td>
<td class="b">Name</td>
</tr>
<?php
if($result){ if($result){
for ($i = 0; $i <= count($result)-1; $i++) { foreach($result as $r){
if(arr($result,$result[$i]["ip"].$result[$i]["uid"])){ $key = $r['ip'].'_'.$r['uid'];
echo ' if(!isset($seen[$key])){
<tr> $seen[$key] = true;
<td>'.$result[$i]["ip"].'</td> $rows[] = $r;
<td><a href="?p=player&uid='.$result[$i]["uid"].'">'.$database->getUserField($result[$i]["uid"],'username',0).'</a></td> }
</tr> }
';
}
}
}
else{
echo '
<tr>
<td colspan="4">No results</td>
</tr>
';
} }
?> ?>
<style>
.search-wrap{font-family:system-ui;margin-top:10px}
.search-head{width:100%;background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:10px 12px;font-weight:600;text-align:center;font-size:14px;border:1px solid #0f172a;border-radius:10px 10px 0 0;box-shadow:0 2px 8px rgba(0,0,0,.08);box-sizing:border-box}
.search-table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-top:0;border-radius:0 0 10px 10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04);margin-bottom:12px}
.search-table tr:first-child td{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;padding:7px 10px;font-weight:600;border-bottom:1px solid #e5e7eb;text-align:center}
.search-table td{padding:7px 10px;border-bottom:1px solid #f1f5f9;font-size:13px;color:#334155;text-align:center;font-family:monospace}
.search-table tr:last-child td{border-bottom:0}
.search-table tr:hover td{background:#f8fafc}
.search-table a{color:#2563eb;text-decoration:none;font-weight:500;font-family:system-ui}
.search-table a:hover{text-decoration:underline}
.no-res{padding:20px;text-align:center;color:#94a3b8;font-style:italic;font-family:system-ui}
</style>
</table> <div class="search-wrap">
<div class="search-head">Found IPs (<?php echo count($rows);?>)</div>
<table class="search-table">
<tr>
<td>IP</td>
<td>NAME</td>
</tr>
<?php if($rows){
foreach($rows as $r){
$uname = $database->getUserField($r['uid'],'username',0);
echo '
<tr>
<td>'.$r['ip'].'</td>
<td><a href="?p=player&uid='.$r['uid'].'">'.$uname.'</a></td>
</tr>
';
}} else {
echo '<tr><td colspan="2" class="no-res">No results</td></tr>';
}
?>
</table>
</div>
+46 -45
View File
@@ -2,66 +2,67 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename results_player.tpl ## ## Filename : result_players.tpl ##
## Developed by: Dzoki ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
?> ?>
<?php <?php $result = $admin->search_player($_POST['s']); ?>
$result = $admin->search_player($_POST['s']); <style>
?> .search-wrap{font-family:system-ui;margin-top:10px}
<table id="member"> .search-head{width:100%;background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:10px 12px;font-weight:600;text-align:center;font-size:14px;border:1px solid #0f172a;border-radius:10px 10px 0 0;box-shadow:0 2px 8px rgba(0,0,0,.08);box-sizing:border-box}
<thead> .search-table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-top:0;border-radius:0 0 10px 10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04);margin-bottom:12px}
<tr> .search-table tr:first-child td{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;padding:7px 10px;font-weight:600;border-bottom:1px solid #e5e7eb;text-align:center}
<th class="dtbl"><a href="">1 «</a></th><th>Found player (<?php echo count($result);?>)</th><th class="dtbl"><a href="">» 100</a></th> .search-table td{padding:7px 10px;border-bottom:1px solid #f1f5f9;font-size:13px;color:#334155;text-align:center}
</tr> .search-table tr:last-child td{border-bottom:0}
</thead> .search-table tr:hover td{background:#f8fafc}
.search-table a{color:#2563eb;text-decoration:none;font-weight:500}
.search-table a:hover{text-decoration:underline}
.no-res{padding:20px;text-align:center;color:#94a3b8;font-style:italic}
</style>
</table> <div class="search-wrap">
<table id="profile"> <div class="search-head">Found players (<?php echo count($result);?>)</div>
<table class="search-table">
<tr> <tr>
<td class="b">UID</td> <td>UID</td>
<td class="b">Player</td> <td>PLAYER</td>
<td class="b">Villages</td> <td>VILLAGES</td>
<td class="b">Pop</td> <td>POP</td>
</tr> </tr>
<?php <?php
if($result){ if($result){
$userIDs = array_column($result, 'id');
// preload villages data
$userIDs = [];
for ($i = 0; $i <= count($result)-1; $i++) {
$userIDs[] = $result[$i]["id"];
}
$database->getProfileVillages($userIDs); $database->getProfileVillages($userIDs);
// display foreach($result as $p){
for ($i = 0; $i <= count($result)-1; $i++) { $varray = $database->getProfileVillages($p['id']);
$varray = $database->getProfileVillages($result[$i]["id"]);
$totalpop = 0; $totalpop = 0;
foreach($varray as $vil){ $totalpop += $vil['pop']; }
foreach($varray as $vil) { echo '
$totalpop += $vil['pop'];
}
echo '
<tr> <tr>
<td>'.$result[$i]["id"].'</td> <td>'.$p['id'].'</td>
<td><a href="?p=player&uid='.$result[$i]["id"].'">'.$result[$i]["username"].'</a></td> <td><a href="?p=player&uid='.$p['id'].'">'.$p['username'].'</a></td>
<td>'.count($varray).'</td> <td>'.count($varray).'</td>
<td>'.$totalpop.'</td> <td>'.$totalpop.'</td>
</tr> </tr>
'; ';
} }
} } else {
else{ echo '<tr><td colspan="4" class="no-res">No results</td></tr>';
echo '
<tr>
<td colspan="4">No results</td>
</tr>
';
} }
?> ?>
</table>
</table> </div>
+63 -85
View File
@@ -2,90 +2,68 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename results_villages.tpl ## ## Filename : results_villages.tpl ##
## Developed by: Dzoki ## ## Type : Admin Panel Frontend ##
## Reworked: aggenkeech ## ## --------------------------------------------------------------------------- ##
## License: TravianZ Project ## ## Developed by : Dzoki (Original) ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Refactored by : Shadow ##
## ## ## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
$result = $admin->search_village($_POST['s']);
?> ?>
<table id="member"> <?php $result = $admin->search_village($_POST['s']); ?>
<thead> <style>
<tr> .search-wrap{font-family:system-ui;margin-top:10px}
<th colspan="5"> .search-head{width:100%;background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:10px 12px;font-weight:600;text-align:center;font-size:14px;border:1px solid #0f172a;border-radius:10px 10px 0 0;box-shadow:0 2px 8px rgba(0,0,0,.08);box-sizing:border-box}
Found villages (<?php echo count($result);?>) .search-table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-top:0;border-radius:0 0 10px 10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04);margin-bottom:12px}
</th> .search-table tr:first-child td{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;padding:7px 8px;font-weight:600;border-bottom:1px solid #e5e7eb;text-align:center}
</tr> .search-table td{padding:7px 8px;border-bottom:1px solid #f1f5f9;font-size:13px;color:#334155;text-align:center}
<tr> .search-table tr:last-child td{border-bottom:0}
<td colspan="5"></td> .search-table tr:hover td{background:#f8fafc}
</tr> .search-table a{color:#2563eb;text-decoration:none;font-weight:500}
<tr> .search-table a:hover{text-decoration:underline}
<td><a href="">1 «</a></td> .search-table .del{width:12px;height:12px;vertical-align:middle;opacity:.7}
<td colspan="2"></td> .search-table .del:hover{opacity:1}
<td colspan="2"><a href="">» 100</a></td> .search-foot{padding:8px;text-align:center;font-size:12px;color:#64748b;background:#f8fafc;border-top:1px solid #e5e7eb}
</tr> .search-foot font{color:#dc2626 !important;font-weight:600}
<tr> .no-res{padding:20px;text-align:center;color:#94a3b8;font-style:italic}
<td colspan="5"></td> </style>
</tr>
</thead> <div class="search-wrap">
<thead> <div class="search-head">Found villages (<?php echo count($result);?>)</div>
<tr>
<td style="background-color: #F3F3F3;">ID</th> <table class="search-table">
<td style="background-color: #F3F3F3;">Village Name</th> <tr>
<td style="background-color: #F3F3F3;">Village Owner</th> <td>ID</td>
<td style="background-color: #F3F3F3;">Population</th> <td>VILLAGE NAME</td>
<td style="background-color: #F3F3F3;"></th> <td>OWNER</td>
</tr> <td>POP</td>
</thead> <td style="width:30px"></td>
<tbody> </tr>
<?php <?php if($result){
if($result) foreach($result as $v){
{ $owner = $database->getUserField($v['owner'],'username',0);
for ($i = 0; $i <= count($result)-1; $i++) $delLink = '<a href="?action=delVil&did='.$v['wref'].'" onclick="return del(\'did\','.$v['wref'].');"><img src="../img/admin/del.gif" class="del"></a>';
{ echo '
$delLink = '<a href="?action=delVil&did='.$result[$i]['wref'].'" onClick="return del(\'did\','.$result[$i]['wref'].');"><img src="../img/admin/del.gif" class="del"></a>'; <tr>
echo ' <td>'.$v['wref'].'</td>
<tr> <td><a href="?p=village&did='.$v['wref'].'">'.$v['name'].'</a></td>
<td>'.$result[$i]["wref"].'</td> <td><a href="?p=player&uid='.$v['owner'].'">'.$owner.'</a></td>
<td><a href="?p=village&did='.$result[$i]["wref"].'">'.$result[$i]["name"].'</a></td> <td>'.$v['pop'].'</td>
<td><a href="?p=player&uid='.$result[$i]["owner"].'">'.$database->getUserField($result[$i]["owner"],'username',0).'</a></td> <td>'.$delLink.'</td>
<td>'.$result[$i]["pop"].'</td> </tr>';
<td>'.$delLink.'</td> }
</tr>'; echo '</table><div class="search-foot"><font>'.count($result).'</font> Villages Found "<font>'.$_POST['s'].'</font>"</div>';
} } else {
echo ' echo '<tr><td colspan="5" class="no-res">No results</td></tr></table>';
<tr> echo '<div class="search-foot">No Villages Called "<font>'.$_POST['s'].'</font>"</div>';
<td colspan="5"></td> }
</tr> ?>
</tbody> </div>
<tfoot>
<tr>
<td colspan="5" style="background-image: url(../../gpack/travian_default/img/f/c4.gif);">
<center>
<font color="red">'.count($result).'</font> Villages Found "<font color="red">'.$_POST['s'].'</font>"
</center>
</td>
</tr>';
}
else
{
echo '
<tr>
<td></td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="5" style="background-image: url(../../gpack/travian_default/img/f/c4.gif);">
<center>
<font color="#9F9F90">No Villages Called</font> <font color="red">'.$_POST['s'].'</font>
</center>
</td>
</tr>';
}
?>
</tfoot>
</table>
+16 -1
View File
@@ -1,6 +1,21 @@
<?php <?php
################################################################################# #################################################################################
## search.tpl - REDESIGN 2025 ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : search.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!"); if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!");
+49 -26
View File
@@ -2,12 +2,20 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename search2.tpl ## ## Filename : search2.tpl ##
## Developed by: Dzoki ## ## Type : Admin Panel Frontend ##
## Reworked: aggenkeech && ronix ## ## --------------------------------------------------------------------------- ##
## License: TravianZ Project ## ## Developed by : Dzoki (Original) ##
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ## ## Refactored by : Shadow ##
## ## ## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
$array_tribe=array('-',TRIBE1,TRIBE2,TRIBE3,TRIBE4,TRIBE5,TRIBE6); $array_tribe=array('-',TRIBE1,TRIBE2,TRIBE3,TRIBE4,TRIBE5,TRIBE6);
$tribename = $array_tribe[$user['tribe']]; $tribename = $array_tribe[$user['tribe']];
@@ -17,32 +25,47 @@ $numsimplayers = count($searchresults);
$id = $user['id']; $id = $user['id'];
$varray = $database->getProfileVillages($id); $varray = $database->getProfileVillages($id);
$totalpop = 0; $totalpop = 0;
foreach($varray as $vil) foreach($varray as $vil) $totalpop += $vil['pop'];
{
$totalpop += $vil['pop'];
}
?> ?>
<style>
#member.search-modern{border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04);margin-bottom:12px}
#member.search-modern th{background:linear-gradient(135deg,#0f172a,#334155);color:#fff;padding:10px 12px;font-weight:600;text-align:left;font-size:13px}
#member.search-modern th font{color:#fca5a5 !important;font-weight:500}
.s-info-wrap{display:grid;grid-template-columns:1fr 1fr;gap:12px;max-width:100%;margin:0 auto 15px}
.s-card{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:12px 14px;box-shadow:0 1px 3px rgba(0,0,0,.04)}
.s-card-title{font-size:11px;text-transform:uppercase;color:#64748b;letter-spacing:.5px;margin-bottom:4px;font-weight:600}
.s-card-main{font-size:14px;font-weight:600;color:#0f172a}
.s-card-main a{color:#2563eb;text-decoration:none}
.s-card-main a:hover{text-decoration:underline}
.s-card-sub{font-size:12px;color:#475569;margin-top:3px}
.s-card-sub b{color:#334155;font-weight:600}
@media(max-width:700px){.s-info-wrap{grid-template-columns:1fr}}
</style>
<form action="" method="post"> <form action="" method="post">
<table id="member"> <table id="member" class="search-modern">
<thead> <thead>
<tr> <tr>
<th colspan="3">Search <font color="red">("<?php echo $user['username']; ?>" = <?php echo $numsimplayers; ?> Similar)</font></th> <th colspan="3">Search <font>("<?php echo htmlspecialchars($user['username']); ?>" = <?php echo $numsimplayers; ?> Similar)</font></th>
</tr> </tr>
</thead> </thead>
</table> </table>
<center>
<div id="s_nav2" >
<div align="left" style="font-size: 10pt;"><b>Player:</b> <a href="?p=player&uid=<?php echo $user['id'];?>"><?php echo $user['username'];?></a> (uid: <?php echo $user['id'];?>)</div>
<div align="left" style="font-size: 9pt;"><b>Tribe:</b> <?php echo $tribename; ?> | <b>Villages:</b> <?php echo count($varray);?> | <b>Inhabitants:</b> <?php echo $totalpop; ?></div>
</div>
<?php <div class="s-info-wrap">
if(isset($_GET['did'])) <div class="s-card">
{ ?> <div class="s-card-title">Player</div>
<div id="s_nav4"> <div class="s-card-main"><a href="?p=player&uid=<?php echo $user['id'];?>"><?php echo htmlspecialchars($user['username']);?></a> <span style="color:#94a3b8;font-weight:500">(uid: <?php echo $user['id'];?>)</span></div>
<div align="left" style="font-size: 10pt;"><b>Village:</b> <a href="?p=village&did=<?php echo $village['wref'];?>"><?php echo $village['name'];?></a> (did: <?php echo $village['wref'];?>)</div> <div class="s-card-sub"><b>Tribe:</b> <?php echo $tribename; ?> • <b>Villages:</b> <?php echo count($varray);?> • <b>Pop:</b> <?php echo number_format($totalpop,0,',','.'); ?></div>
<div align="left" style="font-size: 9pt;"><b>Coordinates:</b> (<?php echo $coor['x'];?>|<?php echo $coor['y'];?>) | <b>Inhabitants</b>: <?php echo $village['pop'];?> </div>
</div><?php
} ?> <?php if(isset($_GET['did']) && isset($village)) { ?>
</center> <div class="s-card">
<div class="s-card-title">Village</div>
<div class="s-card-main"><a href="?p=village&did=<?php echo $village['wref'];?>"><?php echo htmlspecialchars($village['name']);?></a> <span style="color:#94a3b8;font-weight:500">(did: <?php echo $village['wref'];?>)</span></div>
<div class="s-card-sub"><b>Coords:</b> (<?php echo $coor['x'];?>|<?php echo $coor['y'];?>) • <b>Pop:</b> <?php echo $village['pop'];?></div>
</div>
<?php } ?>
</div>
</form> </form>
+16 -8
View File
@@ -3,12 +3,20 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename server_info.tpl ## ## Filename : server_info.tpl ##
## Developed by: Dzoki ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## Enhanced: aggenkeech ## ## Refactored by : Shadow ##
## Refactored by: Shadow ## ## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!"); if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!");
@@ -102,8 +110,8 @@ $ue = q1("SELECT ".implode(',',$cells)." FROM ".TB_PREFIX."enforcement");
'Romans' => range(1,10), 'Romans' => range(1,10),
'Teutons' => range(11,20), 'Teutons' => range(11,20),
'Gauls' => range(21,30), 'Gauls' => range(21,30),
'Natars' => range(31,40), 'Nature' => range(31,40),
'Other' => range(41,50) 'Natars' => range(41,50)
]; ];
foreach($tribesUnits as $tribe=>$ids){ foreach($tribesUnits as $tribe=>$ids){
echo "<div class='tribe-box'><h4>$tribe</h4>"; echo "<div class='tribe-box'><h4>$tribe</h4>";
+92 -38
View File
@@ -1,39 +1,93 @@
<?php <?php
$id = $_GET['did'];
if(isset($id)) #################################################################################
{ ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
?> ## --------------------------------------------------------------------------- ##
<br /><br /> ## Filename : techlog.tpl ##
<table id="profile"> ## Type : Admin Panel Frontend ##
<thead> ## --------------------------------------------------------------------------- ##
<tr> ## Developed by : Dzoki (Original) ##
<th colspan="3" class="on"><a href="#"><?php echo $village['name']; ?></a>'s Research Log</th> ## Refactored by : Shadow ##
</tr> ## Redesign by : Shadow ##
<tr> ## --------------------------------------------------------------------------- ##
<td style="width: 12%">#</td> ## Contact : cata7007@gmail.com ##
<td>Event</td> ## Project : TravianZ ##
<td>Date</td> ## GitHub : https://github.com/Shadowss/TravianZ ##
</tr> ## --------------------------------------------------------------------------- ##
</thead> ## License : TravianZ Project ##
<?php ## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
$sql = "SELECT * FROM ".TB_PREFIX."tech_log WHERE wid = ".(int) $_GET['did'].""; ## --------------------------------------------------------------------------- ##
$result = mysqli_query($GLOBALS["link"], $sql); #################################################################################
$j = 0;
while($row = mysqli_fetch_assoc($result)) $id = (int)($_GET['did'] ?? 0);
{ if(!$id){ include("404.tpl"); return; }
echo '
<tr> $logs = $database->query("SELECT * FROM ".TB_PREFIX."tech_log WHERE wid = $id ORDER BY id DESC LIMIT 200");
<td>'.++$j.'</td> ?>
<td>'.$row['log'].'</td> <style>
<td style="white-space: nowrap">'.$row['date'].'</td> .back-btn{display:inline-flex;align-items:center;gap:6px;background:#fff;border:1px solid #e5e7eb;padding:8px 14px;border-radius:8px;color:#334155;text-decoration:none;font-size:13px;font-weight:500;margin-bottom:12px;box-shadow:0 1px 2px rgba(0,0,0,.05)}
</tr>'; .back-btn:hover{background:#f8fafc}
} .tlog-wrap{max-width:900px;margin:20px auto;font-family:system-ui}
?> .tlog-head{background:linear-gradient(135deg,#1e3a8a,#3b82f6);color:#fff;padding:16px 20px;border-radius:12px 12px 0 0;display:flex;align-items:center;gap:12px}
</thead> .tlog-head .icon{width:36px;height:36px;background:#ffffff20;border-radius:8px;display:grid;place-items:center;font-size:20px}
</table><?php .tlog-head h2{margin:0;font-size:18px;font-weight:600}
} .tlog-head span{opacity:.8;font-size:13px}
else .tlog-card{background:#fff;border:1px solid #e5e7eb;border-radius:0 0 12px 12px;overflow:hidden;box-shadow:0 4px 12px rgba(0,0,0,.05)}
{ .tlog-table{width:100%;border-collapse:collapse}
include("404.tpl"); .tlog-table th{background:#f8fafc;color:#64748b;font-size:12px;text-transform:uppercase;letter-spacing:.5px;padding:12px 16px;text-align:left;border-bottom:1px solid #e5e7eb}
} .tlog-table td{padding:14px 16px;border-bottom:1px solid #f1f5f9;font-size:14px;color:#334155}
?> .tlog-table tr:hover td{background:#f0f7ff}
.tlog-table tr:last-child td{border-bottom:0}
.badge{display:inline-block;padding:3px 8px;border-radius:6px;font-size:11px;font-weight:600;margin-right:6px}
.badge-research{background:#dbeafe;color:#1e40af}
.badge-academy{background:#fef3c7;color:#92400e}
.badge-complete{background:#dcfce7;color:#166534}
.tlog-num{width:50px;color:#94a3b8;font-variant-numeric:tabular-nums}
.tlog-date{white-space:nowrap;color:#64748b;font-size:13px;width:160px}
.empty{padding:40px;text-align:center;color:#94a3b8}
</style>
<div class="tlog-wrap">
<a href="admin.php?p=village&did=<?php echo $id; ?>" class="back-btn">← Back to Village</a>
<div class="tlog-head">
<div class="icon">🔬</div>
<div>
<h2><?php echo htmlspecialchars($village['name']); ?> <span style="opacity:.7">— Research Log</span></h2>
<span>Latest 200 searches</span>
</div>
</div>
<div class="tlog-card">
<?php if(mysqli_num_rows($logs) == 0): ?>
<div class="empty">No registered searches.</div>
<?php else: ?>
<table class="tlog-table">
<thead>
<tr>
<th class="tlog-num">#</th>
<th>Event</th>
<th class="tlog-date">Data</th>
</tr>
</thead>
<tbody>
<?php
$i = mysqli_num_rows($logs);
while($row = mysqli_fetch_assoc($logs)):
$log = htmlspecialchars($row['log']);
$badge = 'badge-research';
if(stripos($log,'academy')!==false) $badge='badge-academy';
if(stripos($log,'completed')!==false || stripos($log,'finished')!==false) $badge='badge-complete';
$date = date('d.m.Y H:i', strtotime($row['date']));
?>
<tr>
<td class="tlog-num"><?php echo $i--; ?></td>
<td><span class="badge <?php echo $badge; ?>">TECH</span> <?php echo $log; ?></td>
<td class="tlog-date"><?php echo $date; ?></td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
<?php endif; ?>
</div>
</div>
+62 -44
View File
@@ -1,45 +1,63 @@
<table id="member"> <?php
<thead>
<tr>
<th colspan="16">Troop Upgrades</th>
</tr>
<tr>
<td colspan="8">Armoury</td>
<td colspan="8">Blacksmith</td>
</tr>
</thead>
<tbody>
<tr>
<?php
$tribe = $user['tribe'];
$img = $tribe == 1 ? "" : $tribe - 1;
for($i = 1; $i < 9; $i++) echo '<td><center><img src="../img/un/u/'.$img.''.$i.'.gif"></center></td>';
for($i = 1; $i < 9; $i++) echo '<td><center><img src="../img/un/u/'.$img.''.$i.'.gif"></center></td>';
?>
</tr>
</tbody>
<tfoot>
<tr>
<?php
//Armoury
for($i = 1; $i < 9; $i++){
if($tribe==5) { $abtech['a'.$i]="<font color=\"grey\">?</font>"; $abtech['b'.$i]="<font color=\"grey\">?</font>";}
echo '<td><center>'.$abtech['a'.$i].'</center></td>';
}
//Blacksmith
for($i = 1; $i < 9; $i++) echo '<td><center>'.$abtech['b'.$i].'</center></td>';
?>
</tr>
</tfoot>
</table>
<?php
if($tribe == 5) echo '<span class="none">Upgrades Troops</span>';
else echo '<a href="admin.php?p=addABTroops&did='.$_GET['did'].'">Upgrades Troops</a><a href="admin.php?p=techlog&did='.$_GET['did'].'" style="float: right">Research Log</a>';
if(isset($_GET['ab'])) echo '<div align="right"><font color="Red"><b>AB Tech Troops upgrades</font></b></div>'; #################################################################################
?> ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : troopUpgrades.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : ronix (Original) ##
## Refactored by : iopietro ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
$tribe = (int)$user['tribe'];
$img = $tribe==1 ? "" : $tribe-1;
?>
<style>
.upg-modern{font-family:system-ui;background:#fff;border:1px solid #e5e7eb;border-top:0}
.upg-head{display:grid;grid-template-columns:1fr 1fr;background:#f8fafc;border-bottom:1px solid #e5e7eb}
.upg-head div{padding:6px;text-align:center;font-size:12px;font-weight:600;color:#475569;text-transform:uppercase}
.upg-icons{display:grid;grid-template-columns:repeat(16,1fr);gap:0;background:#fff;padding:6px 4px;border-bottom:1px solid #f1f5f9}
.upg-icons img{width:20px;height:20px;margin:0 auto;display:block;image-rendering:pixelated}
.upg-levels{display:grid;grid-template-columns:repeat(16,1fr);gap:0;padding:4px;background:#fff}
.upg-levels div{text-align:center;font-size:12px;font-weight:600;padding:3px 0;color:#0f172a}
.upg-levels div.zero{color:#cbd5e1}
.upg-foot{display:flex;justify-content:space-between;padding:6px 8px;background:#f8fafc;font-size:12.5px}
.upg-foot a{color:#16a34a;text-decoration:none;font-weight:500}
.upg-foot a:hover{text-decoration:underline}
</style>
<div class="upg-modern">
<div class="upg-head"><div>Armoury</div><div>Blacksmith</div></div>
<div class="upg-icons">
<?php for($i=1;$i<9;$i++) echo '<img src="../img/un/u/'.$img.$i.'.gif">'; for($i=1;$i<9;$i++) echo '<img src="../img/un/u/'.$img.$i.'.gif">'; ?>
</div>
<div class="upg-levels">
<?php
for($i=1;$i<9;$i++){
$val = $tribe==5 ? '?' : (int)$abtech['a'.$i];
$cls = ($val==0 || $val=='?')?'zero':'';
echo '<div class="'.$cls.'">'.$val.'</div>';
}
for($i=1;$i<9;$i++){
$val = $tribe==5 ? '?' : (int)$abtech['b'.$i];
$cls = ($val==0 || $val=='?')?'zero':'';
echo '<div class="'.$cls.'">'.$val.'</div>';
}
?>
</div>
<div class="upg-foot">
<?php if($tribe==5){ echo '<span style="color:#94a3b8">Upgrades Troops</span>'; } else { echo '<a href="admin.php?p=addABTroops&did='.$_GET['did'].'">Upgrades Troops</a>'; } ?>
<a href="admin.php?p=techlog&did=<?=$_GET['did']?>" style="color:#64748b">Research Log</a>
</div>
<?php if(isset($_GET['ab'])) echo '<div style="text-align:right;padding:0 8px 6px;color:#dc2626;font-weight:600;font-size:12px">AB Tech updated</div>'; ?>
</div>
+55 -275
View File
@@ -1,278 +1,58 @@
<table id="member"> <?php
<thead>
<tr>
<th colspan="10">Troops in village</th>
<?php
## Roman
if($units['u1'] == 0){$u1 = '<font color="gray">'.$units['u1'].'';}
else if($units['u1'] > 0){$u1 = '<font color="black">'.$units['u1'].'';}
if($units['u2'] == 0){$u2 = '<font color="gray">'.$units['u2'].'';}
else if($units['u2'] > 0){$u2 = '<font color="black">'.$units['u2'].'';}
if($units['u3'] == 0){$u3 = '<font color="gray">'.$units['u3'].'';}
else if($units['u3'] > 0){$u3 = '<font color="black">'.$units['u3'].'';}
if($units['u4'] == 0){$u4 = '<font color="gray">'.$units['u4'].'';}
else if($units['u4'] > 0){$u4 = '<font color="black">'.$units['u4'].'';}
if($units['u5'] == 0){$u5 = '<font color="gray">'.$units['u5'].'';}
else if($units['u5'] > 0){$u5 = '<font color="black">'.$units['u5'].'';}
if($units['u6'] == 0){$u6 = '<font color="gray">'.$units['u6'].'';}
else if($units['u6'] > 0){$u6 = '<font color="black">'.$units['u6'].'';}
if($units['u7'] == 0){$u7 = '<font color="gray">'.$units['u7'].'';}
else if($units['u7'] > 0){$u7 = '<font color="black">'.$units['u7'].'';}
if($units['u8'] == 0){$u8 = '<font color="gray">'.$units['u8'].'';}
else if($units['u8'] > 0){$u8 = '<font color="black">'.$units['u8'].'';}
if($units['u9'] == 0){$u9 = '<font color="gray">'.$units['u9'].'';}
else if($units['u9'] > 0){$u9 = '<font color="black">'.$units['u9'].'';}
if($units['u10'] == 0){$u10 = '<font color="gray">'.$units['u10'].'';}
else if($units['u10'] > 0){$u10 = '<font color="black">'.$units['u10'].'';}
## Teuton
if($units['u11'] == 0){$u11 = '<font color="gray">'.$units['u11'].'';}
else if($units['u11'] > 0){$u11 = '<font color="black">'.$units['u11'].'';}
if($units['u12'] == 0){$u12 = '<font color="gray">'.$units['u12'].'';}
else if($units['u12'] > 0){$u12 = '<font color="black">'.$units['u12'].'';}
if($units['u13'] == 0){$u13 = '<font color="gray">'.$units['u13'].'';}
else if($units['u13'] > 0){$u13 = '<font color="black">'.$units['u13'].'';}
if($units['u14'] == 0){$u14 = '<font color="gray">'.$units['u14'].'';}
else if($units['u14'] > 0){$u14 = '<font color="black">'.$units['u14'].'';}
if($units['u15'] == 0){$u15 = '<font color="gray">'.$units['u15'].'';}
else if($units['u15'] > 0){$u15 = '<font color="black">'.$units['u15'].'';}
if($units['u16'] == 0){$u16 = '<font color="gray">'.$units['u16'].'';}
else if($units['u16'] > 0){$u16 = '<font color="black">'.$units['u16'].'';}
if($units['u17'] == 0){$u17 = '<font color="gray">'.$units['u17'].'';}
else if($units['u17'] > 0){$u17 = '<font color="black">'.$units['u17'].'';}
if($units['u18'] == 0){$u18 = '<font color="gray">'.$units['u18'].'';}
else if($units['u18'] > 0){$u18 = '<font color="black">'.$units['u18'].'';}
if($units['u19'] == 0){$u19 = '<font color="gray">'.$units['u19'].'';}
else if($units['u19'] > 0){$u19 = '<font color="black">'.$units['u19'].'';}
if($units['u20'] == 0){$u20 = '<font color="gray">'.$units['u20'].'';}
else if($units['u20'] > 0){$u20 = '<font color="black">'.$units['u20'].'';}
## Gaul
if($units['u21'] == 0){$u21 = '<font color="gray">'.$units['u21'].'';}
else if($units['u21'] > 0){$u21 = '<font color="black">'.$units['u21'].'';}
if($units['u22'] == 0){$u22 = '<font color="gray">'.$units['u22'].'';}
else if($units['u22'] > 0){$u22 = '<font color="black">'.$units['u22'].'';}
if($units['u23'] == 0){$u23 = '<font color="gray">'.$units['u23'].'';}
else if($units['u23'] > 0){$u23 = '<font color="black">'.$units['u23'].'';}
if($units['u24'] == 0){$u24 = '<font color="gray">'.$units['u24'].'';}
else if($units['u24'] > 0){$u24 = '<font color="black">'.$units['u24'].'';}
if($units['u25'] == 0){$u25 = '<font color="gray">'.$units['u25'].'';}
else if($units['u25'] > 0){$u25 = '<font color="black">'.$units['u25'].'';}
if($units['u26'] == 0){$u26 = '<font color="gray">'.$units['u26'].'';}
else if($units['u26'] > 0){$u26 = '<font color="black">'.$units['u26'].'';}
if($units['u27'] == 0){$u27 = '<font color="gray">'.$units['u27'].'';}
else if($units['u27'] > 0){$u27 = '<font color="black">'.$units['u27'].'';}
if($units['u28'] == 0){$u28 = '<font color="gray">'.$units['u28'].'';}
else if($units['u28'] > 0){$u28 = '<font color="black">'.$units['u28'].'';}
if($units['u29'] == 0){$u29 = '<font color="gray">'.$units['u29'].'';}
else if($units['u29'] > 0){$u29 = '<font color="black">'.$units['u29'].'';}
if($units['u30'] == 0){$u30 = '<font color="gray">'.$units['u30'].'';}
else if($units['u30'] > 0){$u30 = '<font color="black">'.$units['u30'].'';}
## Nature
if($units['u31'] == 0){$u31 = '<font color="gray">'.$units['u31'].'';}
else if($units['u31'] > 0){$u31 = '<font color="black">'.$units['u31'].'';}
if($units['u32'] == 0){$u32 = '<font color="gray">'.$units['u32'].'';}
else if($units['u32'] > 0){$u32 = '<font color="black">'.$units['u32'].'';}
if($units['u33'] == 0){$u33 = '<font color="gray">'.$units['u33'].'';}
else if($units['u33'] > 0){$u33 = '<font color="black">'.$units['u33'].'';}
if($units['u34'] == 0){$u34 = '<font color="gray">'.$units['u34'].'';}
else if($units['u34'] > 0){$u34 = '<font color="black">'.$units['u34'].'';}
if($units['u35'] == 0){$u35 = '<font color="gray">'.$units['u35'].'';}
else if($units['u35'] > 0){$u35 = '<font color="black">'.$units['u35'].'';}
if($units['u36'] == 0){$u36 = '<font color="gray">'.$units['u36'].'';}
else if($units['u36'] > 0){$u36 = '<font color="black">'.$units['u36'].'';}
if($units['u37'] == 0){$u37 = '<font color="gray">'.$units['u37'].'';}
else if($units['u37'] > 0){$u37 = '<font color="black">'.$units['u37'].'';}
if($units['u38'] == 0){$u38 = '<font color="gray">'.$units['u38'].'';}
else if($units['u38'] > 0){$u38 = '<font color="black">'.$units['u38'].'';}
if($units['u39'] == 0){$u39 = '<font color="gray">'.$units['u39'].'';}
else if($units['u39'] > 0){$u39 = '<font color="black">'.$units['u39'].'';}
## Natars
if($units['u40'] == 0){$u40 = '<font color="gray">'.$units['u40'].'';}
else if($units['u40'] > 0){$u40 = '<font color="black">'.$units['u40'].'';}
if($units['u41'] == 0){$u41 = '<font color="gray">'.$units['u41'].'';}
else if($units['u41'] > 0){$u41 = '<font color="black">'.$units['u41'].'';}
if($units['u42'] == 0){$u42 = '<font color="gray">'.$units['u42'].'';}
else if($units['u42'] > 0){$u42 = '<font color="black">'.$units['u42'].'';}
if($units['u43'] == 0){$u43 = '<font color="gray">'.$units['u43'].'';}
else if($units['u43'] > 0){$u43 = '<font color="black">'.$units['u43'].'';}
if($units['u44'] == 0){$u44 = '<font color="gray">'.$units['u44'].'';}
else if($units['u44'] > 0){$u44 = '<font color="black">'.$units['u44'].'';}
if($units['u45'] == 0){$u45 = '<font color="gray">'.$units['u45'].'';}
else if($units['u45'] > 0){$u45 = '<font color="black">'.$units['u45'].'';}
if($units['u46'] == 0){$u46 = '<font color="gray">'.$units['u46'].'';}
else if($units['u46'] > 0){$u46 = '<font color="black">'.$units['u46'].'';}
if($units['u47'] == 0){$u47 = '<font color="gray">'.$units['u47'].'';}
else if($units['u47'] > 0){$u47 = '<font color="black">'.$units['u47'].'';}
if($units['u48'] == 0){$u48 = '<font color="gray">'.$units['u48'].'';}
else if($units['u48'] > 0){$u48 = '<font color="black">'.$units['u48'].'';}
if($units['u49'] == 0){$u49 = '<font color="gray">'.$units['u49'].'';}
else if($units['u49'] > 0){$u49 = '<font color="black">'.$units['u49'].'';}
if($units['u50'] == 0){$u50 = '<font color="gray">'.$units['u50'].'';}
else if($units['u50'] > 0){$u50 = '<font color="black">'.$units['u50'].'';}
if($_SESSION['access'] >= MULTIHUNTER)
{
if($user['tribe'] == 1)
{
echo '
</tr></thead><tbody>
<tr>
<td><center /><img src="../img/un/u/1.gif"></img></td>
<td><center /><img src="../img/un/u/2.gif"></img></td>
<td><center /><img src="../img/un/u/3.gif"></img></td>
<td><center /><img src="../img/un/u/4.gif"></img></td>
<td><center /><img src="../img/un/u/5.gif"></img></td>
<td><center /><img src="../img/un/u/6.gif"></img></td>
<td><center /><img src="../img/un/u/7.gif"></img></td>
<td><center /><img src="../img/un/u/8.gif"></img></td>
<td><center /><img src="../img/un/u/9.gif"></img></td>
<td><center /><img src="../img/un/u/10.gif"></img></td>
</tr>
<tr>
<td><center />'.$u1.'</td>
<td><center />'.$u2.'</td>
<td><center />'.$u3.'</td>
<td><center />'.$u4.'</td>
<td><center />'.$u5.'</td>
<td><center />'.$u6.'</td>
<td><center />'.$u7.'</td>
<td><center />'.$u8.'</td>
<td><center />'.$u9.'</td>
<td><center />'.$u10.'</td>
</tr>';
}
// TEUTON UNITS
else if($user['tribe'] == 2)
{
echo '
</tr></thead><tbody>
<tr>
<td><center /><img src="../img/un/u/11.gif"></img></td>
<td><center /><img src="../img/un/u/12.gif"></img></td>
<td><center /><img src="../img/un/u/13.gif"></img></td>
<td><center /><img src="../img/un/u/14.gif"></img></td>
<td><center /><img src="../img/un/u/15.gif"></img></td>
<td><center /><img src="../img/un/u/16.gif"></img></td>
<td><center /><img src="../img/un/u/17.gif"></img></td>
<td><center /><img src="../img/un/u/18.gif"></img></td>
<td><center /><img src="../img/un/u/19.gif"></img></td>
<td><center /><img src="../img/un/u/20.gif"></img></td>
</tr>
<tr>
<td><center />'.$u11.'</td>
<td><center />'.$u12.'</td>
<td><center />'.$u13.'</td>
<td><center />'.$u14.'</td>
<td><center />'.$u15.'</td>
<td><center />'.$u16.'</td>
<td><center />'.$u17.'</td>
<td><center />'.$u18.'</td>
<td><center />'.$u19.'</td>
<td><center />'.$u20.'</td>
</tr>';
}
// GAUL UNITS
else if($user['tribe'] == 3)
{
echo '
</tr></thead><tbody>
<tr>
<td><center /><img src="../img/un/u/21.gif"></img></td>
<td><center /><img src="../img/un/u/22.gif"></img></td>
<td><center /><img src="../img/un/u/23.gif"></img></td>
<td><center /><img src="../img/un/u/24.gif"></img></td>
<td><center /><img src="../img/un/u/25.gif"></img></td>
<td><center /><img src="../img/un/u/26.gif"></img></td>
<td><center /><img src="../img/un/u/27.gif"></img></td>
<td><center /><img src="../img/un/u/28.gif"></img></td>
<td><center /><img src="../img/un/u/29.gif"></img></td>
<td><center /><img src="../img/un/u/30.gif"></img></td>
</tr>
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : troops.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : ronix (Original) ##
## Refactored by : iopietro ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
#################################################################################
<tr> if($_SESSION['access'] < MULTIHUNTER) return;
<td><center />'.$u21.'</td> $tribe = (int)$user['tribe'];
<td><center />'.$u22.'</td> $hero = $database->getHero($village['owner']);
<td><center />'.$u23.'</td> $heroCount = $hero ? 1 : 0;
<td><center />'.$u24.'</td> ?>
<td><center />'.$u25.'</td> <style>
<td><center />'.$u26.'</td> .troops-modern{font-family:system-ui}
<td><center />'.$u27.'</td> .troops-grid{display:grid;grid-template-columns:repeat(11,1fr);gap:4px;padding:6px;background:#fff}
<td><center />'.$u28.'</td> .troop-item{text-align:center;padding:4px 2px;border:1px solid #f1f5f9;border-radius:6px;background:#fcfdff}
<td><center />'.$u29.'</td> .troop-item:hover{background:#f8fafc}
<td><center />'.$u30.'</td> .troop-item img, .troop-item svg{width:18px;height:18px;margin:0 auto 2px;display:block}
</tr>'; .troop-num{font-size:11.5px;font-weight:600;line-height:1}
} .troop-num.zero{color:#cbd5e1}
// Nature UNITS .troop-num.has{color:#0f172a}
else if($user['tribe'] == 4) .troop-hero{background:#fffbeb!important;border-color:#fde68a!important}
{ .troops-foot{display:flex;justify-content:space-between;padding:6px 8px;background:#f8fafc;border-top:1px solid #e5e7eb;font-size:12px}
echo ' .troops-foot a{color:#2563eb;text-decoration:none;font-weight:500;display:flex;gap:4px;align-items:center}
</tr></thead><tbody> </style>
<tr>
<td><center /><img src="../img/un/u/31.gif"></img></td>
<td><center /><img src="../img/un/u/32.gif"></img></td>
<td><center /><img src="../img/un/u/33.gif"></img></td>
<td><center /><img src="../img/un/u/34.gif"></img></td>
<td><center /><img src="../img/un/u/35.gif"></img></td>
<td><center /><img src="../img/un/u/36.gif"></img></td>
<td><center /><img src="../img/un/u/37.gif"></img></td>
<td><center /><img src="../img/un/u/38.gif"></img></td>
<td><center /><img src="../img/un/u/39.gif"></img></td>
<td><center /><img src="../img/un/u/40.gif"></img></td>
</tr>
<tr>
<td><center />'.$u31.'</td>
<td><center />'.$u32.'</td>
<td><center />'.$u33.'</td>
<td><center />'.$u34.'</td>
<td><center />'.$u35.'</td>
<td><center />'.$u36.'</td>
<td><center />'.$u37.'</td>
<td><center />'.$u38.'</td>
<td><center />'.$u39.'</td>
<td><center />'.$u40.'</td>
</tr>';
}
// Natar Units
else if($user['tribe'] == 5)
{
echo '
</tr></thead><tbody>
<tr>
<td><center /><img src="../img/un/u/41.gif"></img></td>
<td><center /><img src="../img/un/u/42.gif"></img></td>
<td><center /><img src="../img/un/u/43.gif"></img></td>
<td><center /><img src="../img/un/u/44.gif"></img></td>
<td><center /><img src="../img/un/u/45.gif"></img></td>
<td><center /><img src="../img/un/u/46.gif"></img></td>
<td><center /><img src="../img/un/u/47.gif"></img></td>
<td><center /><img src="../img/un/u/48.gif"></img></td>
<td><center /><img src="../img/un/u/49.gif"></img></td>
<td><center /><img src="../img/un/u/50.gif"></img></td>
</tr>
<div class="troops-modern">
<tr> <div class="troops-grid">
<td><center />'.$u41.'</td> <?php
<td><center />'.$u42.'</td> if($tribe==1){$s=1;$e=10;} elseif($tribe==2){$s=11;$e=20;} elseif($tribe==3){$s=21;$e=30;} elseif($tribe==4){$s=31;$e=40;} else{$s=41;$e=50;}
<td><center />'.$u43.'</td> for($i=$s;$i<=$e;$i++){ $cnt=(int)$units['u'.$i]; $cls=$cnt==0?'zero':'has'; echo '<div class="troop-item"><img src="../img/un/u/'.$i.'.gif"><div class="troop-num '.$cls.'">'.$cnt.'</div></div>'; }
<td><center />'.$u44.'</td> if($tribe<=3){
<td><center />'.$u45.'</td> $hcls=$heroCount==0?'zero':'has';
<td><center />'.$u46.'</td> echo '<div class="troop-item troop-hero"><svg viewBox="0 0 24 24" fill="#facc15" stroke="#eab308" stroke-width="1.5"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg><div class="troop-num '.$hcls.'">'.$heroCount.'</div></div>';
<td><center />'.$u47.'</td> }
<td><center />'.$u48.'</td> ?>
<td><center />'.$u49.'</td> </div>
<td><center />'.$u50.'</td> <?php if($_SESSION['access']==ADMIN){ ?>
</tr>'; <div class="troops-foot">
} <a href="admin.php?p=addTroops&did=<?=$_GET['did']?>"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 20h9"/><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z"/></svg>Edit Troops</a>
} <?php if(isset($_GET['d'])) echo '<span style="color:#dc2626;font-weight:600">Troops edited</span>'; ?>
?> </div>
</tbody> <?php } ?>
</table> </div>
<?php
if($_SESSION['access'] == ADMIN)
{
echo '<a href="admin.php?p=addTroops&did='.$_GET['did'].'">Edit Troops</a>';
if(isset($_GET['d'])){
echo '<div align="right"><font color="Red"><b>Troops edited</font></b></div>';
}
}
?>
-76
View File
@@ -1,76 +0,0 @@
<?php
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
include('ver.tpl');
//if(isset($_GET['c']))
//{
// copy("https://raw.github.com/yi12345/TravianZ/master/Admin/Templates/update_latest.tpl", "Templates/update_latest.tpl");
//}
include('update_latest.tpl');
/*
if(isset($_GET['u']))
{
for ($dl=$ver+1; $dl<=$latest; $dl++)
{
$file = "http://travian.gamingcrazy.net/Update/$dl.zip";
$newfile = "update.zip";
if (!copy($file, $newfile))
{
echo "Update Files of Version $dl were not found.<br />";
}
else
{
$zip = new ZipArchive;
if ($zip->open('update.zip') === TRUE)
{
$zip->extractTo('../');
$zip->close();
unlink('update.zip');
echo "Successfully Updated to Version $dl.<br />";
}
else
{
echo 'Failed to update to Version $dl.<br />';
}
}
}
}
*/
?>
<table id="member" cellpadding="1" cellspacing="1" >
<thead>
<tr>
<th colspan="3">System Updates</th>
</tr>
</thead>
<tbody>
<tr>
<td class="hab" colspan="2">Current Version :</td>
<td class="hab" colspan="1"><font color="red"><?php include('ver.tpl'); echo "$ver"; ?></font></td>
</tr>
<tr>
<td class="hab" colspan="2">Latest Version :</td>
<td class="hab" colspan="1"><font color="red"><?php echo "$latest"; ?></font></td>
</tr>
<tr>
<td class="hab" colspan="2">Check for Update</td>
<td class="hab" colspan="1"><center><a href="?p=update&c"><img src="../img/admin/b/ok1.gif"></a></center></td>
</tr>
<tr>
<td class="hab" colspan="2">Update</td>
<td class="hab" colspan="1"><?php
if($latest > $ver)
{
echo'<center><a href="https://github.com/yi12345/TravianZ"><img src="../img/admin/b/update.png"></a></center>';
}
else
{
echo "No updates Avaiable";
}
?></td>
</tr>
<tr>
<td class="hab" colspan="2">Visit Forum</td>
<td class="hab" colspan="1"><center><a href="#"><img src="../img/admin/b/ok1.gif"></a></center></td>
</tr>
</tbody>
</table>
-3
View File
@@ -1,3 +0,0 @@
<?php
$latest="v.8.4.α ⚡ Quantum Build 42β";
?>
+18 -3
View File
@@ -1,6 +1,21 @@
<?php <?php
################################################################################# #################################################################################
## usergold.tpl - REDESIGN 2025 ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : usergold.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!"); if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
$id = $_SESSION['id']; $id = $_SESSION['id'];
@@ -40,7 +55,7 @@ $id = $_SESSION['id'];
</div> </div>
<div> <div>
<h3>Give Gold to Specific Player</h3> <h3>Give Gold to Specific Player</h3>
<p>Adaugă gold doar pentru un singur cont (după ID).</p> <p>Add gold only for single account (after ID).</p>
</div> </div>
</div> </div>
@@ -65,6 +80,6 @@ $id = $_SESSION['id'];
</div> </div>
<?php if(isset($_GET['g'])){ ?> <?php if(isset($_GET['g'])){ ?>
<div class="usergold-success">✓ Gold adăugat cu succes pentru user!</div> <div class="usergold-success">✓ Gold successfully added for user!</div>
<?php } ?> <?php } ?>
</div> </div>
+105 -36
View File
@@ -1,39 +1,108 @@
<?php <?php
$id = (int) $_GET['uid'];
if(isset($id)) #################################################################################
{ ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
?> ## --------------------------------------------------------------------------- ##
<table cellpadding="1" cellspacing="1" id="member"> ## Filename : userillegallog.tpl ##
<thead> ## Type : Admin Panel Frontend ##
<tr> ## --------------------------------------------------------------------------- ##
<th colspan="10"><a href="admin.php?p=player&uid=<?php echo $player['id']; ?>"><?php echo $player['username']; ?></a>'s Illegals Log</th> ## Developed by : Dzoki (Original) ##
</tr> ## Refactored by : Shadow ##
<tr> ## Redesign by : Shadow ##
<td>Offence</td> ## --------------------------------------------------------------------------- ##
<td>ID</td> ## Contact : cata7007@gmail.com ##
<td>Description</td> ## Project : TravianZ ##
</tr> ## GitHub : https://github.com/Shadowss/TravianZ ##
</thead> ## --------------------------------------------------------------------------- ##
<tbody> ## License : TravianZ Project ##
<?php ## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
$sql = "SELECT * FROM ".TB_PREFIX."illegal_log WHERE user = $id"; ## --------------------------------------------------------------------------- ##
$result = mysqli_query($GLOBALS["link"], $sql); #################################################################################
while($row = mysqli_fetch_assoc($result))
{ $id = (int)($_GET['uid'] ?? 0);
$i++; if($id){
echo ' $player = $database->getUserArray($id,1);
<tr> ?>
<td>'.$i.'</td> <style>
<td>'.$row['id'].'</td> .illegal-wrap{max-width:900px;margin:0 auto;font-family:Verdana,Arial;}
<td>'.$row['log'].'</td> .illegal-head{background:linear-gradient(135deg,#b91c1c,#7f1d1d);color:#fff;border-radius:6px;padding:14px 18px;margin-bottom:12px;display:flex;justify-content:space-between;align-items:center;}
</tr>'; .illegal-head h2{margin:0;font-size:17px;}
} .illegal-head h2 a{color:#fff;text-decoration:none;}
?> .illegal-head .uid{font-size:12px;opacity:.85;}
</tbody>
</table><?php .card{background:#fff;border:1px solid #e5e7eb;border-radius:6px;box-shadow:0 1px 3px rgba(0,0,0,.05);overflow:hidden;}
} .card h3{margin:0;padding:10px 14px;background:#fef2f2;border-bottom:1px solid #fecaca;font-size:12px;text-transform:uppercase;color:#991b1b;display:flex;justify-content:space-between;align-items:center;}
else .badge{background:#fee2e2;color:#b91c1c;padding:2px 8px;border-radius:12px;font-size:11px;font-weight:600;}
{
include("404.tpl"); .illegal-table{width:100%;border-collapse:collapse;font-size:13px;}
.illegal-table thead{background:#fff1f2;}
.illegal-table th{padding:8px 10px;text-align:left;font-size:11px;text-transform:uppercase;color:#991b1b;font-weight:600;border-bottom:1px solid #fecaca;}
.illegal-table td{padding:10px;border-bottom:1px solid #fef2f2;vertical-align:top;}
.illegal-table tr:hover{background:#fffafa;}
.illegal-table td:nth-child(1){width:50px;color:#6b7280;text-align:center;font-weight:600;}
.illegal-table td:nth-child(2){width:70px;font-family:monospace;color:#6b7280;}
.illegal-table td:nth-child(3){font-family:monospace;font-size:12px;color:#1f2937;word-break:break-word;}
.empty{padding:40px;text-align:center;color:#16a34a;font-size:14px;}
.empty .icon{font-size:32px;margin-bottom:8px;}
.actions{margin-top:14px;text-align:left;}
.btn-back{background:#f3f4f6;border:1px solid #d1d5db;color:#16a34a;padding:8px 16px;border-radius:5px;font-size:13px;font-weight:600;text-decoration:none;display:inline-flex;align-items:center;gap:6px;}
.btn-back:hover{background:#e5e7eb;}
</style>
<div class="illegal-wrap">
<div class="illegal-head">
<h2>🚨 Illegals Log: <a href="admin.php?p=player&uid=<?php echo $player['id'];?>"><?php echo htmlspecialchars($player['username']);?></a></h2>
<div class="uid">UID: <?php echo $id; ?></div>
</div>
<div class="card">
<h3>
<span>Detected Offences</span>
<?php
$count = mysqli_num_rows(mysqli_query($GLOBALS["link"], "SELECT id FROM ".TB_PREFIX."illegal_log WHERE user = $id"));
echo '<span class="badge">'.$count.' records</span>';
?>
</h3>
<?php
$sql = "SELECT * FROM ".TB_PREFIX."illegal_log WHERE user = $id ORDER BY id DESC LIMIT 200";
$result = mysqli_query($GLOBALS["link"], $sql);
if(mysqli_num_rows($result) > 0){
?>
<table class="illegal-table">
<thead>
<tr>
<th>#</th>
<th>ID</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<?php
$i = 0;
while($row = mysqli_fetch_assoc($result)){
$i++;
echo '<tr>';
echo '<td>'.$i.'</td>';
echo '<td>'.$row['id'].'</td>';
echo '<td>'.htmlspecialchars($row['log']).'</td>';
echo '</tr>';
}
?>
</tbody>
</table>
<?php } else {
echo '<div class="empty"><div class="icon">✅</div><div>No illegal activities recorded.<br><span style="font-size:12px;color:#6b7280;">Player is clean</span></div></div>';
} ?>
</div>
<div class="actions">
<a href="admin.php?p=player&uid=<?php echo $id;?>" class="btn-back">← Back to player</a>
</div>
</div>
<?php
} else {
include("404.tpl");
} }
?> ?>
+105 -36
View File
@@ -1,39 +1,108 @@
<?php <?php
$id = (int) $_GET['uid'];
if(isset($id)) #################################################################################
{ ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
?> ## --------------------------------------------------------------------------- ##
<table cellpadding="1" cellspacing="1" id="member"> ## Filename : userlogin.tpl ##
<thead> ## Type : Admin Panel Frontend ##
<tr> ## --------------------------------------------------------------------------- ##
<th colspan="10"><a href="admin.php?p=player&uid=<?php echo $player['id']; ?>"><?php echo $player['username']; ?></a> Login Log</th> ## Developed by : Dzoki (Original) ##
</tr> ## Refactored by : Shadow ##
<tr> ## Redesign by : Shadow ##
<td>Login Attempt</td> ## --------------------------------------------------------------------------- ##
<td>ID</td> ## Contact : cata7007@gmail.com ##
<td>IP</td> ## Project : TravianZ ##
</tr> ## GitHub : https://github.com/Shadowss/TravianZ ##
</thead> ## --------------------------------------------------------------------------- ##
<tbody> ## License : TravianZ Project ##
<?php ## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
$sql = "SELECT * FROM ".TB_PREFIX."login_log WHERE uid = $id"; ## --------------------------------------------------------------------------- ##
$result = mysqli_query($GLOBALS["link"], $sql); #################################################################################
while($row = mysqli_fetch_assoc($result))
{ $id = (int)($_GET['uid'] ?? 0);
$i++; if($id){
echo ' $player = $database->getUserArray($id,1);
<tr> ?>
<td>'.$i.'</td> <style>
<td>'.$row['id'].'</td> .log-wrap{max-width:800px;margin:0 auto;font-family:Verdana,Arial;}
<td>'.$row['ip'].'</td> .log-head{background:linear-gradient(135deg,#1e40af,#1e3a8a);color:#fff;border-radius:6px;padding:14px 18px;margin-bottom:12px;display:flex;justify-content:space-between;align-items:center;}
</tr>'; .log-head h2{margin:0;font-size:17px;}
} .log-head h2 a{color:#fff;text-decoration:none;}
?> .log-head .uid{font-size:12px;opacity:.85;}
</tbody>
</table><?php .card{background:#fff;border:1px solid #e5e7eb;border-radius:6px;box-shadow:0 1px 3px rgba(0,0,0,.05);overflow:hidden;}
} .card h3{margin:0;padding:10px 14px;background:#f9fafb;border-bottom:1px solid #e5e7eb;font-size:12px;text-transform:uppercase;color:#374151;display:flex;justify-content:space-between;align-items:center;}
else .badge{background:#dbeafe;color:#1e40af;padding:2px 8px;border-radius:12px;font-size:11px;font-weight:600;}
{
include("404.tpl"); .log-table{width:100%;border-collapse:collapse;font-size:13px;}
.log-table thead{background:#f3f4f6;}
.log-table th{padding:8px 10px;text-align:left;font-size:11px;text-transform:uppercase;color:#6b7280;font-weight:600;border-bottom:1px solid #e5e7eb;}
.log-table td{padding:9px 10px;border-bottom:1px solid #f1f5f9;}
.log-table tr:hover{background:#f9fafb;}
.log-table td:nth-child(1){width:60px;color:#6b7280;}
.log-table td:nth-child(2){width:80px;font-family:monospace;}
.ip-link{color:#2563eb;text-decoration:none;font-family:monospace;font-weight:600;}
.ip-link:hover{text-decoration:underline;}
.empty{padding:30px;text-align:center;color:#9ca3af;font-size:13px;}
.actions{margin-top:14px;text-align:left;}
.btn-back{background:#f3f4f6;border:1px solid #d1d5db;color:#16a34a;padding:8px 16px;border-radius:5px;font-size:13px;font-weight:600;text-decoration:none;display:inline-flex;align-items:center;gap:6px;}
.btn-back:hover{background:#e5e7eb;}
</style>
<div class="log-wrap">
<div class="log-head">
<h2>🔐 Login Log: <a href="admin.php?p=player&uid=<?php echo $player['id'];?>"><?php echo htmlspecialchars($player['username']);?></a></h2>
<div class="uid">UID: <?php echo $id; ?></div>
</div>
<div class="card">
<h3>
<span>Recent Login Attempts</span>
<?php
$count = mysqli_num_rows(mysqli_query($GLOBALS["link"], "SELECT id FROM ".TB_PREFIX."login_log WHERE uid = $id"));
echo '<span class="badge">'.$count.' total</span>';
?>
</h3>
<?php
$sql = "SELECT * FROM ".TB_PREFIX."login_log WHERE uid = $id ORDER BY id DESC LIMIT 100";
$result = mysqli_query($GLOBALS["link"], $sql);
if(mysqli_num_rows($result) > 0){
?>
<table class="log-table">
<thead>
<tr>
<th>#</th>
<th>Log ID</th>
<th>IP Address</th>
<th>Info</th>
</tr>
</thead>
<tbody>
<?php
$i = 0;
while($row = mysqli_fetch_assoc($result)){
$i++;
$ip = htmlspecialchars($row['ip']);
echo '<tr>';
echo '<td>'.$i.'</td>';
echo '<td>'.$row['id'].'</td>';
echo '<td><a class="ip-link" href="https://ipinfo.io/'.$ip.'" target="_blank">'.$ip.'</a></td>';
echo '<td><span style="color:#9ca3af;font-size:11px;">—</span></td>';
echo '</tr>';
}
?>
</tbody>
</table>
<?php } else { echo '<div class="empty">No login records found.</div>'; } ?>
</div>
<div class="actions">
<a href="admin.php?p=player&uid=<?php echo $id;?>" class="btn-back">← Back to player</a>
</div>
</div>
<?php
} else {
include("404.tpl");
} }
?> ?>
+16 -1
View File
@@ -1,6 +1,21 @@
<?php <?php
################################################################################# #################################################################################
## users.tpl - REDESIGN 2025 v3 (ultra-compact + tribe label) ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename : users.tpl ##
## Type : Admin Panel Frontend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!"); if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!");
-3
View File
@@ -1,3 +0,0 @@
<?php
$ver="v.8.4.α ⚡ Quantum Build 42β";
?>
+180 -360
View File
@@ -1,15 +1,25 @@
<?php <?php
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename village.php ## ## Filename : villagelog.tpl ##
## Developed by: Dzoki & Advocatie ## ## Type : Admin Panel Frontend ##
## License: TravianX Project ## ## --------------------------------------------------------------------------- ##
## Thanks to: Dzoki & itay2277(Edit some additions) ## ## Developed by : Dzoki & Advocatie (Original) ##
## Fix by: ronix (some additions) ## ## Thanks to : itay2277 & ronix(Edit some additions) ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Redesign by : Shadow ##
## Improved: aggenkeech ## ## Improved: : aggenkeech ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
include_once("../GameEngine/Generator.php"); include_once("../GameEngine/Generator.php");
$id = $_GET['did']; $id = $_GET['did'];
@@ -20,7 +30,7 @@ if(isset($id)){
$type = $database->getVillageType($village['wref']); $type = $database->getVillageType($village['wref']);
$fdata = $database->getResourceLevel($village['wref']); $fdata = $database->getResourceLevel($village['wref']);
$units = $database->getUnit($village['wref']); $units = $database->getUnit($village['wref']);
$abtech = $database->getABTech($id); // Armory/blacksmith level $abtech = $database->getABTech($id);
switch($type){ switch($type){
case 1: $typ = [3, 3, 3, 9]; break; case 1: $typ = [3, 3, 3, 9]; break;
@@ -37,369 +47,179 @@ if(isset($id)){
case 12: $typ = [5, 4, 3, 6]; break; case 12: $typ = [5, 4, 3, 6]; break;
} }
$ocounter = []; $ocounter = []; $wood = $clay = $iron =$crop = 0;
$wood = $clay = $iron =$crop = 0;
$q = "SELECT o.*, w.x, w.y FROM ".TB_PREFIX."odata AS o LEFT JOIN ".TB_PREFIX."wdata AS w ON o.wref=w.id WHERE conqured = ".(int) $village['wref']; $q = "SELECT o.*, w.x, w.y FROM ".TB_PREFIX."odata AS o LEFT JOIN ".TB_PREFIX."wdata AS w ON o.wref=w.id WHERE conqured = ".(int) $village['wref'];
$result = $database->query_return($q); $result = $database->query_return($q);
if(!empty($result)){ if(!empty($result)){
$newResult = []; $newResult = [];
foreach($result as $row){ foreach($result as $row){
$type = $row['type']; $type = $row['type'];
if ( $type == 1 ) { if ( $type == 1 ) { $row['type'] = '<img src="../img/admin/r/1.gif"> + 25%'; $wood += 1; }
$row['type'] = '<img src="../img/admin/r/1.gif"> + 25%'; elseif ( $type == 2 ) { $row['type'] = '<img src="../img/admin/r/1.gif"> + 25%'; $wood += 1; }
$wood += 1; elseif ( $type == 3 ) { $row['type'] = '<img src="../img/admin/r/1.gif"> + 25%<br /><img src="../img/admin/r/4.gif"> + 25%'; $wood += 1; $crop += 1; }
} elseif ( $type == 2 ) { elseif ( $type == 4 ) { $row['type'] = '<img src="../img/admin/r/2.gif"> + 25%'; $clay += 1; }
$row['type'] = '<img src="../img/admin/r/1.gif"> + 25%'; elseif ( $type == 5 ) { $row['type'] = '<img src="../img/admin/r/2.gif"> + 25%'; $clay += 1; }
$wood += 1; elseif ( $type == 6 ) { $row['type'] = '<img src="../img/admin/r/2.gif"> + 25%<br /><img src="../img/admin/r/4.gif"> + 25%'; $clay += 1; $crop += 1; }
} elseif ( $type == 3 ) { elseif ( $type == 7 ) { $row['type'] = '<img src="../img/admin/r/3.gif"> + 25%'; $iron += 1; }
$row['type'] = '<img src="../img/admin/r/1.gif"> + 25%<br /><img src="../img/admin/r/4.gif"> + 25%'; elseif ( $type == 8 ) { $row['type'] = '<img src="../img/admin/r/3.gif"> + 25%'; $iron += 1; }
$wood += 1; elseif ( $type == 9 ) { $row['type'] = '<img src="../img/admin/r/3.gif"> + 25%<br /><img src="../img/admin/r/4.gif"> + 25%'; $iron += 1; $crop += 1; }
$crop += 1; elseif ( $type == 10 ) { $row['type'] = '<img src="../img/admin/r/4.gif"> + 25%'; $crop += 1; }
} elseif ( $type == 4 ) { elseif ( $type == 11 ) { $row['type'] = '<img src="../img/admin/r/4.gif"> + 25%'; $crop += 1; }
$row['type'] = '<img src="../img/admin/r/2.gif"> + 25%'; elseif ( $type == 12 ) { $row['type'] = '<img src="../img/admin/r/4.gif"> + 50%'; $crop += 2; }
$clay += 1;
} elseif ( $type == 5 ) {
$row['type'] = '<img src="../img/admin/r/2.gif"> + 25%';
$clay += 1;
} elseif ( $type == 6 ) {
$row['type'] = '<img src="../img/admin/r/2.gif"> + 25%<br /><img src="../img/admin/r/4.gif"> + 25%';
$clay += 1;
$crop += 1;
} elseif ( $type == 7 ) {
$row['type'] = '<img src="../img/admin/r/3.gif"> + 25%';
$iron += 1;
} elseif ( $type == 8 ) {
$row['type'] = '<img src="../img/admin/r/3.gif"> + 25%';
$iron += 1;
} elseif ( $type == 9 ) {
$row['type'] = '<img src="../img/admin/r/3.gif"> + 25%<br /><img src="../img/admin/r/4.gif"> + 25%';
$iron += 1;
$crop += 1;
} elseif ( $type == 10 ) {
$row['type'] = '<img src="../img/admin/r/4.gif"> + 25%';
$crop += 1;
} elseif ( $type == 11 ) {
$row['type'] = '<img src="../img/admin/r/4.gif"> + 25%';
$crop += 1;
} elseif ( $type == 12 ) {
$row['type'] = '<img src="../img/admin/r/4.gif"> + 50%';
$crop += 2;
}
$newResult[] = $row; $newResult[] = $row;
} }
} }
$ocounter = array($wood,$clay,$iron,$crop); $ocounter = array($wood,$clay,$iron,$crop);
$production=$admin->calculateProduction($id,$user['id'],$user['b1'],$user['b2'],$user['b3'],$user['b4'],$fdata, $ocounter, $village['pop']); $production=$admin->calculateProduction($id,$user['id'],$user['b1'],$user['b2'],$user['b3'],$user['b4'],$fdata, $ocounter, $village['pop']);
$refreshiconfrm = "../img/admin/refresh.png";
$refreshicon = "<img src=\"".$refreshiconfrm."\">";
if($village && $user){ if($village && $user){
include("search2.tpl"); ?> include("search2.tpl");
<style> $svgEdit = '<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 20h9"/><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z"/></svg>';
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);} $svgRefresh = '<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 12a9 9 0 1 1-3-6.7"/><path d="M21 3v6h-6"/></svg>';
</style> $svgDel = '<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18M8 6V4h8v2m-1 0v14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V6h10z"/></svg>';
<link href="../<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7i" rel="stylesheet" type="text/css">
<br />
<table id="profile" cellpadding="1" cellspacing="1" >
<thead>
<tr>
<th colspan="3">Village Information</th>
</tr>
</thead>
<tbody>
<tr>
<td>Village owner:</td>
<td><a href="admin.php?p=player&uid=<?php echo $village['owner']; ?>"><?php echo $user['username']; ?></a></td>
<td>
<form action="../GameEngine/Admin/Mods/editVillageOwner.php" method="POST" accept-charset="UTF-8">
<input type="hidden" name="did" value="<?php echo $_GET['did']; ?>">
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
Owner(uid): <input class="text" type="text" name="newowner" value="<?php echo $user['id']; ?>"><input type="image" value="submit" src="../img/admin/edit.gif">
</form>
</td>
<tr>
<td>Village name:</td>
<form action="../GameEngine/Admin/Mods/renameVillage.php" method="POST" accept-charset="UTF-8">
<input type="hidden" name="did" value="<?php echo $_GET['did']; ?>">
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
<td colspan="2">
<input class="text" type="text" name="villagename" value="<?php echo $village['name']; ?>"> <input type="image" value="submit" src="../img/admin/edit.gif">
</td>
</form>
</tr>
<tr>
<td>Population</td>
<td colspan="2"><?php echo $village['pop'];?> <a href="admin.php?action=recountPop&did=<?php echo $_GET['did']; ?>"><?php echo $refreshicon; ?></a></td>
</tr>
<tr>
<td>Coordinates:</td>
<td colspan="2"><a href="<?php echo HOMEPAGE ?>/karte.php?d=<?php echo $village['wref']; ?>&c=<?php echo $generator->getMapCheck($village['wref']); ?>" target="blank">(<?php echo $coor['x']."|".$coor['y']; ?>)</a></td>
</tr>
<tr>
<td>Village ID</td>
<td colspan="2"><?php echo $village['wref'];?></td>
</tr>
<tr>
<td>Field type</td>
<td colspan="2">
<?php
for ($i = 0; $i <= 3; $i++){
$a = $i + 1;
if($i != 3) echo $typ[$i].'x <img src="../img/admin/r/'.$a.'.gif">| ';
else echo $typ[$i].'x <img src="../img/admin/r/'.$a.'.gif"> ';
}
?>
</td>
</tr>
</tbody>
</table>
<table id="member">
<thead>
<tr>
<th colspan="7">Resources <a href="admin.php?p=editResources&did=<?php echo $_GET['did']; ?>"><img src="../img/admin/edit.gif" title="Edit Resources and Capacity"></a></th>
</tr>
<tr>
<td>Resource</td>
<td colspan="2">Warehouse</td>
<td>Production</td>
</tr>
</thead>
<tbody>
<tr>
<td><img class="r1" src="../img/x.gif"> Lumber</td>
<td><center><?php echo floor($village['wood']); ?></center></td>
<td rowspan="3"><center><?php echo $village['maxstore'];?></center></td>
<td><center><?php echo $production['wood'];?></td>
</tr>
</tr>
<tr>
<td><img class="r2" src="../img/x.gif"> Clay</td>
<td><center><?php echo floor($village['clay']); ?></center></td>
<td><center><?php echo $production['clay'];?></center></td>
</tr>
<tr>
<td><img class="r3" src="../img/x.gif"> Iron</td>
<td><center><?php echo floor($village['iron']); ?></center></td>
<td><center><?php echo $production['iron'];?></center></td>
</tr>
<tr>
<td><img class="r4" src="../img/x.gif"> Crop</td>
<td><center><?php echo floor($village['crop']); ?></center></td>
<td><center><?php echo $village['maxcrop'];?></center></td>
<td><center><?php echo $production['crop'];?></center></td>
</tr>
</tbody>
</table>
<table id="member">
<thead>
<tr>
<th colspan="5">Village Expansion</th>
</tr>
<tr>
<td class="hab">Village</td>
<td class="hab">Inhabitants</td>
<td class="hab">CP Production</td>
</tr>
</thead>
<tbody>
<?php
for($e = 1; $e < 4; $e++){
$exp = $village['exp'.$e.''];
if($exp == 0){
echo '
<tr>
<td class="hab"><center> - </center></td>
<td class="hab"><center> - </center></td>
<td class="hab"><center> - </center></td>
</tr>';
}else{
$vill = $database->getVillage($exp);
$link = '<a href="admin.php?p=village&did='.$vill['wref'].'">'.$vill['name'].'</a>';
echo '
<tr>
<td class="hab">'.$link.'</td>
<td class="ra"><center>'.$vill['pop'].'<center></td>
<td class="ra"><center>'.$vill['cp'].'</center></td>
</tr>';
}
}
?>
</td>
</tr>
</tbody>
</table>
<table id="member" cellpadding="1" cellspacing="1" >
<thead>
<tr>
<th colspan="6">Oasis</th>
</tr>
<tr>
<td class="ra"></td>
<td class="hab">Name</td>
<td class="hab">Coordinates</td>
<td class="hab">Loyalty</td>
<td class="hab">Resources</td>
</tr>
</thead>
<tbody>
<?php
if(!empty($newResult)){
foreach($newResult as $row){
echo "
<tr>
<td><a href=\"?action=delOas&oid=".$row['wref']."&did=".$_GET['did']."\" onClick=\"return del('oas',".$row['wref'].")\"><img src=\"../img/admin/del.gif\"></a></td>
<td class=\"hab\">".$row['name']."</td>
<td class=\"hab\"><a href=\"../karte.php?d=".$row['wref']."&c=".$generator->getMapCheck($row['wref'])."\" target=\"blank\">(".$row['x']."|".$row['y'].")</a></td>
<td class=\"hab\">".round($row['loyalty'])."%</td>
<td class=\"hab\">".$row['type']."</td>
</tr>";
}
}
else echo '<td colspan="5"><center>This village has no oases</center></td>';
?>
</tbody>
</table>
<?php
include('troops.tpl');
?>
<?php
include('troopUpgrades.tpl');
?>
<?php
include('artifact.tpl');
?>
<a href="admin.php?p=editVillage&did=<?php echo $_GET['did']; ?>" title="Edit Village">
<div id="content" class="village1" style="min-height: 264px;">
<div id="village_map" class="f<?php echo $database->getVillageType($village['wref']); ?>" style="float: left;">
<?php
for($f = 1; $f < 19; $f++){
$gid = $fdata['f'.($f).'t'];
$level = $fdata['f'.($f)];
echo "<img src=\"../img/x.gif\" class=\"reslevel rf".$f." level".$level."\">";
}
?>
</div>
</div></a>
<?php
$WWLevel = $fdata['f99t'];
$wallLevel = $fdata['f40t'];
if($wallLevel == 0) $wallType = "d2_0";
else
{
switch($user['tribe']){
case 1:
case 5:
default: $wallType = "d2_11"; break;
case 2: $wallType = "d2_12"; break;
case 3: $wallType = "d2_1"; break;
}
}
?>
<div id="content" class="village2" style="padding: 0; margin-left: -20px;">
<h1><?php echo $village['name']; ?></h1>
<div id="village_map" class="<?php echo $wallType; ?>">
<?php
for($b = 1; $b < 21; $b++){
$gid = $fdata['f'.($b + 18).'t'];
if($gid > 0) echo "<img src=\"../img/x.gif\" class=\"building d".$b." g".$gid."\">";
elseif($gid == 0) echo "<img src=\"../img/x.gif\" class=\"building d".$b." iso\">";
}
$rplevel = $fdata['f39t'];
if($rplevel > 0) echo "<img src=\"../img/x.gif\" class=\"dx1 g16\">";
elseif($rplevel == 0) echo "<img src=\"../img/x.gif\" class=\"dx1 g16e\">";
$resourcearray = $database->getResourceLevel($village['wref']);
if($resourcearray['f99t'] == 40){
if($resourcearray['f99'] >= 0 && $resourcearray['f99'] <= 19) {
echo '<img class="ww g40" src="img/x.gif" alt="Worldwonder">';
}elseif($resourcearray['f99'] >= 20 && $resourcearray['f99'] <= 39) {
echo '<img class="ww g40_1" src="img/x.gif" alt="Worldwonder">';
}elseif($resourcearray['f99'] >= 40 && $resourcearray['f99'] <= 59) {
echo '<img class="ww g40_2" src="img/x.gif" alt="Worldwonder">';
}elseif($resourcearray['f99'] >= 60 && $resourcearray['f99'] <= 79) {
echo '<img class="ww g40_3" src="img/x.gif" alt="Worldwonder">';
}elseif($resourcearray['f99'] >= 80 && $resourcearray['f99'] <= 99) {
echo '<img class="ww g40_4" src="img/x.gif" alt="Worldwonder">';
}elseif($resourcearray['f99'] == 100) {
echo '<img class="ww g40_5" src="img/x.gif" alt="Worldwonder">';
}
}
?>
<div id="levels" class="on">
<?php
for($b = 1; $b < 21; $b++){
$level = $fdata['f'.($b + 18)];
if($level >0) echo "<div class=\"d$b\">$level</div>";
}
if($rplevel > 0) echo "<div class=\"l39\">".$fdata['f39']."</div>";
if($wallLevel > 0) echo "<div class=\"l40\">".$fdata['f40']."</div>";
if($WWLevel > 0) echo "<div class=\"d40\">".$fdata['f99']."</div>";
?>
</div>
</div>
</div>
<table id="member" cellpadding="1" cellspacing="1" >
<thead>
<tr>
<th colspan="5">Buildings</th>
</tr>
<tr>
<td class="on">ID</td>
<td class="on">GID</td>
<td class="hab">Name</td>
<td class="on">Level</td>
<td class="on">Edit</td>
</tr>
</thead>
<tbody>
<?php
for ($i = 1; $i <= 41; $i++){
if($i == 41) $i = 99;
if($fdata['f'.$i.'t'] == 0) $bu = "-";
else $bu = $funct->procResType($fdata['f'.$i.'t']);
echo '
<tr>
<td class="on">'.$i.'</td>
<td class="on">'.$fdata['f'.$i.'t'].'</td>
<td class="hab">'.$bu.'</td>
<td class="on">'.$fdata['f'.$i].'</td>
<td class="on"><a href="admin.php?p=editVillage&did='.$_GET['did'].'"><img src="../img/admin/edit.gif" title="Edit Building & Level"></a></td>
</tr>';
}
?>
</tbody>
</table>
<br /><br />
<a href="admin.php?p=villagelog&did=<?php echo $_GET['did']; ?>">Village Build Log</a>
<br />
</div>
<?php
}
else
{
include("404.tpl");
}
}
?> ?>
<link href="../<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7i" rel="stylesheet" type="text/css">
<style>
/* COMPACT V2 - centrat */
.village-page{font-family:system-ui;max-width:1000px;margin:0 auto;padding:0 6px}
.vgrid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
@media(max-width:900px){.vgrid{grid-template-columns:1fr}}
.vcard{background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;box-shadow:0 1px 4px rgba(0,0,0,.04);margin-bottom:8px}
.vhead{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:7px 10px;font-weight:600;font-size:13px;display:flex;justify-content:space-between;align-items:center}
.vhead a{color:#93c5fd;display:inline-flex}
.vtable{width:100%;border-collapse:collapse}
.vtable td{padding:5px 8px;border-bottom:1px solid #f1f5f9;font-size:12.5px;color:#334155;vertical-align:middle}
.vtable tr:last-child td{border-bottom:0}
.vtable tr:hover td{background:#f8fafc}
.vtable td.label{width:30%;color:#64748b;font-weight:500;background:#fcfcfd}
.input-mini{padding:4px 6px;border:1px solid #d1d5db;border-radius:5px;font-size:12.5px}
.btn-icon{background:none;border:0;padding:3px;cursor:pointer;color:#64748b;border-radius:4px;display:inline-flex}
.btn-icon:hover{color:#2563eb;background:#eff6ff}
.btn-icon.danger:hover{color:#dc2626;background:#fef2f2}
.res-row{display:flex;align-items:center;gap:6px}
.res-row img.r1,.res-row img.r2,.res-row img.r3,.res-row img.r4{width:14px;height:14px;background:url(../img/x.gif)}
.badge-field img{width:13px;height:13px;vertical-align:middle}
/* HĂRȚI CENTRATE PERFECT */
.vmap-wrap{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
@media(max-width:900px){.vmap-wrap{grid-template-columns:1fr}}
.map-card{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:8px;box-shadow:0 1px 4px rgba(0,0,0,.04);text-align:center}
.map-card h3{margin:0 0 6px;font-size:12.5px;color:#0f172a;font-weight:600}
.map-card #village_map{float:none!important;margin:0 auto!important;position:relative;left:0!important;right:0!important;display:block}
.map-card .village1,.map-card .village2{min-height:auto!important}
.map-card #content{padding:0!important;margin:0!important}
</style>
<div class="village-page">
<div class="vgrid">
<div>
<div class="vcard">
<div class="vhead">Village Information</div>
<table class="vtable">
<tr><td class="label">Owner</td><td><a href="admin.php?p=player&uid=<?php echo $village['owner']; ?>" style="color:#2563eb;font-weight:600"><?php echo $user['username']; ?></a></td>
<td style="text-align:right">
<form action="../GameEngine/Admin/Mods/editVillageOwner.php" method="POST" style="display:flex;gap:4px;align-items:center;justify-content:flex-end">
<input type="hidden" name="did" value="<?php echo $_GET['did']; ?>">
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
<input class="input-mini" type="text" name="newowner" value="<?php echo $user['id']; ?>" style="width:65px">
<button class="btn-icon" title="Change"><?php echo $svgEdit; ?></button>
</form>
</td>
</tr>
<tr><td class="label">Name</td><td colspan="2">
<form action="../GameEngine/Admin/Mods/renameVillage.php" method="POST" style="display:flex;gap:4px">
<input type="hidden" name="did" value="<?php echo $_GET['did']; ?>">
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
<input class="input-mini" type="text" name="villagename" value="<?php echo $village['name']; ?>" style="flex:1">
<button class="btn-icon" title="Rename"><?php echo $svgEdit; ?></button>
</form>
</td></tr>
<tr><td class="label">Population</td><td colspan="2"><?php echo $village['pop'];?> <a href="admin.php?action=recountPop&did=<?php echo $_GET['did']; ?>" class="btn-icon" style="margin-left:4px"><?php echo $svgRefresh; ?></a></td></tr>
<tr><td class="label">Coords</td><td colspan="2"><a href="<?php echo HOMEPAGE ?>/karte.php?d=<?php echo $village['wref']; ?>&c=<?php echo $generator->getMapCheck($village['wref']); ?>" target="_blank" style="color:#16a34a;font-weight:600">(<?php echo $coor['x']."|".$coor['y']; ?>)</a></td></tr>
<tr><td class="label">ID</td><td colspan="2"><?php echo $village['wref'];?></td></tr>
<tr><td class="label">Field</td><td colspan="2" class="badge-field"><?php for ($i = 0; $i <= 3; $i++){ $a = $i + 1; echo $typ[$i].'x <img src="../img/admin/r/'.$a.'.gif">'.($i!=3?' | ':''); } ?></td></tr>
</table>
</div>
<div class="vcard">
<div class="vhead">Resources <a href="admin.php?p=editResources&did=<?php echo $_GET['did']; ?>"><?php echo $svgEdit; ?></a></div>
<table class="vtable" style="text-align:center">
<tr style="background:#f8fafc;font-size:11px;color:#64748b"><td style="text-align:left">Res</td><td>Amt</td><td>Cap</td><td>Prod</td></tr>
<tr><td style="text-align:left" class="res-icon"><img src="../img/admin/r/1.gif"> Wood</td><td><?php echo floor($village['wood']); ?></td><td rowspan="3"><?php echo $village['maxstore'];?></td><td><?php echo $production['wood'];?></td></tr>
<tr><td style="text-align:left" class="res-icon"><img src="../img/admin/r/2.gif"> Clay</td><td><?php echo floor($village['clay']); ?></td><td><?php echo $production['clay'];?></td></tr>
<tr><td style="text-align:left" class="res-icon"><img src="../img/admin/r/3.gif"> Iron</td><td><?php echo floor($village['iron']); ?></td><td><?php echo $production['iron'];?></td></tr>
<tr><td style="text-align:left" class="res-icon"><img src="../img/admin/r/4.gif"> Crop</td><td><?php echo floor($village['crop']); ?></td><td><?php echo $village['maxcrop'];?></td><td><?php echo $production['crop'];?></td></tr>
</table>
</div>
</div>
<div>
<div class="vcard">
<div class="vhead">Expansion</div>
<table class="vtable" style="text-align:center">
<tr style="background:#f8fafc;font-size:11px;color:#64748b"><td>Village</td><td>Pop</td><td>CP</td></tr>
<?php for($e = 1; $e < 4; $e++){ $exp = $village['exp'.$e.'']; if($exp == 0){ echo '<tr><td>-</td><td>-</td><td>-</td></tr>'; }else{ $vill = $database->getVillage($exp); echo '<tr><td><a href="admin.php?p=village&did='.$vill['wref'].'" style="color:#2563eb">'.$vill['name'].'</a></td><td>'.$vill['pop'].'</td><td>'.$vill['cp'].'</td></tr>'; } } ?>
</table>
</div>
<div class="vcard">
<div class="vhead">Oasis</div>
<table class="vtable" style="text-align:center">
<tr style="background:#f8fafc;font-size:11px;color:#64748b"><td style="width:28px"></td><td>Name</td><td>Coords</td><td>Loy</td><td>Bonus</td></tr>
<?php if(!empty($newResult)){ foreach($newResult as $row){ echo '<tr><td><a href="?action=delOas&oid='.$row['wref'].'&did='.$_GET['did'].'" onclick="return del(\'oas\','.$row['wref'].')" class="btn-icon danger">'.$svgDel.'</a></td><td>'.$row['name'].'</td><td><a href="../karte.php?d='.$row['wref'].'&c='.$generator->getMapCheck($row['wref']).'" target="_blank" style="color:#2563eb">('.$row['x'].'|'.$row['y'].')</a></td><td>'.round($row['loyalty']).'%</td><td>'.$row['type'].'</td></tr>'; } } else { echo '<tr><td colspan="5" style="color:#94a3b8;padding:10px">No oases</td></tr>'; } ?>
</table>
</div>
</div>
</div>
<div class="vcard"><div class="vhead">Troops</div><div style="padding:4px"><?php include('troops.tpl'); ?></div></div>
<div class="vcard"><div class="vhead">Upgrades</div><div style="padding:4px"><?php include('troopUpgrades.tpl'); ?></div></div>
<div class="vcard"><div class="vhead">Artifact</div><div style="padding:4px"><?php include('artifact.tpl'); ?></div></div>
<div class="vmap-wrap">
<div class="map-card">
<h3>Resource Fields</h3>
<a href="admin.php?p=editVillage&did=<?php echo $_GET['did']; ?>">
<div id="content" class="village1">
<div id="village_map" class="f<?php echo $database->getVillageType($village['wref']); ?>">
<?php for($f = 1; $f < 19; $f++){ $level = $fdata['f'.($f)]; echo "<img src=\"../img/x.gif\" class=\"reslevel rf".$f." level".$level."\">"; } ?>
</div>
</div>
</a>
</div>
<div class="map-card">
<h3>Village Center - <?php echo $village['name']; ?></h3>
<?php $WWLevel = $fdata['f99t']; $wallLevel = $fdata['f40t']; if($wallLevel == 0) $wallType = "d2_0"; else { switch($user['tribe']){ case 1: case 5: default: $wallType = "d2_11"; break; case 2: $wallType = "d2_12"; break; case 3: $wallType = "d2_1"; break; } } ?>
<div id="content" class="village2">
<div id="village_map" class="<?php echo $wallType; ?>">
<?php for($b = 1; $b < 21; $b++){ $gid = $fdata['f'.($b + 18).'t']; if($gid > 0) echo "<img src=\"../img/x.gif\" class=\"building d".$b." g".$gid."\">"; elseif($gid == 0) echo "<img src=\"../img/x.gif\" class=\"building d".$b." iso\">"; }
$rplevel = $fdata['f39t']; if($rplevel > 0) echo "<img src=\"../img/x.gif\" class=\"dx1 g16\">"; elseif($rplevel == 0) echo "<img src=\"../img/x.gif\" class=\"dx1 g16e\">";
$resourcearray = $database->getResourceLevel($village['wref']);
if($resourcearray['f99t'] == 40){
if($resourcearray['f99'] <= 19) echo '<img class="ww g40" src="img/x.gif">';
elseif($resourcearray['f99'] <= 39) echo '<img class="ww g40_1" src="img/x.gif">';
elseif($resourcearray['f99'] <= 59) echo '<img class="ww g40_2" src="img/x.gif">';
elseif($resourcearray['f99'] <= 79) echo '<img class="ww g40_3" src="img/x.gif">';
elseif($resourcearray['f99'] <= 99) echo '<img class="ww g40_4" src="img/x.gif">';
else echo '<img class="ww g40_5" src="img/x.gif">';
} ?>
<div id="levels" class="on">
<?php for($b = 1; $b < 21; $b++){ $level = $fdata['f'.($b + 18)]; if($level >0) echo "<div class=\"d$b\">$level</div>"; } if($rplevel > 0) echo "<div class=\"l39\">".$fdata['f39']."</div>"; if($wallLevel > 0) echo "<div class=\"l40\">".$fdata['f40']."</div>"; if($WWLevel > 0) echo "<div class=\"d40\">".$fdata['f99']."</div>"; ?>
</div>
</div>
</div>
</div>
</div>
<div class="vcard" style="margin-top:8px">
<div class="vhead">Buildings</div>
<table class="vtable" style="text-align:center">
<tr style="background:#f8fafc;font-size:11px;color:#64748b"><td>ID</td><td>GID</td><td style="text-align:left">Name</td><td>Lvl</td><td>Edit</td></tr>
<?php for ($i = 1; $i <= 41; $i++){ if($i == 41) $i = 99; if($fdata['f'.$i.'t'] == 0) $bu = "-"; else $bu = $funct->procResType($fdata['f'.$i.'t']); echo '<tr><td>'.$i.'</td><td>'.$fdata['f'.$i.'t'].'</td><td style="text-align:left">'.$bu.'</td><td>'.$fdata['f'.$i].'</td><td><a href="admin.php?p=editVillage&did='.$_GET['did'].'" class="btn-icon">'.$svgEdit.'</a></td></tr>'; } ?>
</table>
</div>
<div style="text-align:center;margin:12px 0"><a href="admin.php?p=villagelog&did=<?php echo $_GET['did']; ?>" style="color:#2563eb;font-weight:500;font-size:13px">Village Build Log →</a></div>
</div>
<?php } else { include("404.tpl"); } } ?>
+92 -38
View File
@@ -1,39 +1,93 @@
<?php <?php
$id = $_GET['did'];
if(isset($id)) #################################################################################
{ ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
?> ## --------------------------------------------------------------------------- ##
<br /><br /> ## Filename : villagelog.tpl ##
<table id="profile"> ## Type : Admin Panel Frontend ##
<thead> ## --------------------------------------------------------------------------- ##
<tr> ## Developed by : Dzoki (Original) ##
<th colspan="3" class="on"><a href="#"><?php echo $village['name']; ?></a>'s Build Log</th> ## Refactored by : Shadow ##
</tr> ## Redesign by : Shadow ##
<tr> ## --------------------------------------------------------------------------- ##
<td style="width: 12%">#</td> ## Contact : cata7007@gmail.com ##
<td>Event</td> ## Project : TravianZ ##
<td>Date</td> ## GitHub : https://github.com/Shadowss/TravianZ ##
</tr> ## --------------------------------------------------------------------------- ##
</thead> ## License : TravianZ Project ##
<?php ## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
$sql = "SELECT * FROM ".TB_PREFIX."build_log WHERE wid = ".(int) $_GET['did'].""; ## --------------------------------------------------------------------------- ##
$result = mysqli_query($GLOBALS["link"], $sql); #################################################################################
$j = 0;
while($row = mysqli_fetch_assoc($result)) $id = (int)($_GET['did'] ?? 0);
{ if(!$id){ include("404.tpl"); return; }
echo '
<tr> $logs = $database->query("SELECT * FROM ".TB_PREFIX."build_log WHERE wid = $id ORDER BY id DESC LIMIT 200");
<td>'.++$j.'</td> ?>
<td>'.$row['log'].'</td> <style>
<td style="white-space: nowrap">'.$row['date'].'</td> .back-btn{display:inline-flex;align-items:center;gap:6px;background:#fff;border:1px solid #e5e7eb;padding:8px 14px;border-radius:8px;color:#334155;text-decoration:none;font-size:13px;font-weight:500;margin-bottom:12px;box-shadow:0 1px 2px rgba(0,0,0,.05)}
</tr>'; .back-btn:hover{background:#f8fafc}
} .vlog-wrap{max-width:900px;margin:20px auto;font-family:system-ui}
?> .vlog-head{background:linear-gradient(135deg,#2c3e50,#34495e);color:#fff;padding:16px 20px;border-radius:12px 12px 0 0;display:flex;align-items:center;gap:12px}
</thead> .vlog-head .icon{width:36px;height:36px;background:#71D00020;border-radius:8px;display:grid;place-items:center;font-size:20px}
</table><?php .vlog-head h2{margin:0;font-size:18px;font-weight:600}
} .vlog-head span{opacity:.8;font-size:13px}
else .vlog-card{background:#fff;border:1px solid #e5e7eb;border-radius:0 0 12px 12px;overflow:hidden;box-shadow:0 4px 12px rgba(0,0,0,.05)}
{ .vlog-table{width:100%;border-collapse:collapse}
include("404.tpl"); .vlog-table th{background:#f8fafc;color:#64748b;font-size:12px;text-transform:uppercase;letter-spacing:.5px;padding:12px 16px;text-align:left;border-bottom:1px solid #e5e7eb}
} .vlog-table td{padding:14px 16px;border-bottom:1px solid #f1f5f9;font-size:14px;color:#334155}
?> .vlog-table tr:hover td{background:#f8fafc}
.vlog-table tr:last-child td{border-bottom:0}
.badge{display:inline-block;padding:3px 8px;border-radius:6px;font-size:11px;font-weight:600}
.badge-build{background:#dcfce7;color:#166534}
.badge-demolish{background:#fee2e2;color:#991b1b}
.badge-upgrade{background:#dbeafe;color:#1e40af}
.vlog-num{width:50px;color:#94a3b8;font-variant-numeric:tabular-nums}
.vlog-date{white-space:nowrap;color:#64748b;font-size:13px;width:160px}
.empty{padding:40px;text-align:center;color:#94a3b8}
</style>
<div class="vlog-wrap">
<a href="admin.php?p=village&did=<?php echo $id; ?>" class="back-btn">← Back to Village</a>
<div class="vlog-head">
<div class="icon">🏗️</div>
<div>
<h2><?php echo htmlspecialchars($village['name']); ?> <span style="opacity:.7">— Build Log</span></h2>
<span>Latest 200 action</span>
</div>
</div>
<div class="vlog-card">
<?php if(mysqli_num_rows($logs) == 0): ?>
<div class="empty">No action recorded yet.</div>
<?php else: ?>
<table class="vlog-table">
<thead>
<tr>
<th class="vlog-num">#</th>
<th>Event</th>
<th class="vlog-date">Data</th>
</tr>
</thead>
<tbody>
<?php
$i = mysqli_num_rows($logs);
while($row = mysqli_fetch_assoc($logs)):
$log = htmlspecialchars($row['log']);
$badge = 'badge-upgrade';
if(stripos($log,'demolish')!==false || stripos($log,'destroy')!==false) $badge='badge-demolish';
if(stripos($log,'built')!==false || stripos($log,'construct')!==false) $badge='badge-build';
$date = date('d.m.Y H:i', strtotime($row['date']));
?>
<tr>
<td class="vlog-num"><?php echo $i--; ?></td>
<td><span class="badge <?php echo $badge; ?>"></span> <?php echo $log; ?></td>
<td class="vlog-date"><?php echo $date; ?></td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
<?php endif; ?>
</div>
</div>
+60 -44
View File
@@ -2,58 +2,74 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename villages.tpl ## ## Filename : villages.tpl ##
## Developed by: Dzoki ## ## Type : Admin Panel Frontend ##
## License: TravianZ Project ## ## --------------------------------------------------------------------------- ##
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ## ## Developed by : Dzoki (Original) ##
## ## ## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
## GitHub : https://github.com/Shadowss/TravianZ ##
## --------------------------------------------------------------------------- ##
## License : TravianZ Project ##
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## --------------------------------------------------------------------------- ##
################################################################################# #################################################################################
?> ?>
<style> <style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);} .vil-wrap{font-family:system-ui;margin-top:8px}
.vil-head{width:100%;background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:9px 12px;font-weight:600;text-align:center;font-size:14px;border:1px solid #0f172a;border-radius:10px 10px 0 0;box-sizing:border-box}
.vil-table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-top:0;border-radius:0 0 10px 10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04)}
.vil-table tr:first-child td{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;padding:7px 10px;font-weight:600;border-bottom:1px solid #e5e7eb;text-align:center}
.vil-table td{padding:7px 10px;border-bottom:1px solid #f1f5f9;font-size:13px;color:#334155;text-align:center}
.vil-table tr:last-child td{border-bottom:0}
.vil-table tr:hover td{background:#f8fafc}
.vil-table a{color:#2563eb;text-decoration:none;font-weight:500}
.vil-table a:hover{text-decoration:underline}
.vil-table .c{color:#dc2626;font-size:11px;margin-left:4px;font-weight:600}
.vil-icon{display:inline-flex;vertical-align:middle;opacity:.7;transition:.15s}
.vil-icon:hover{opacity:1}
.vil-icon svg{width:14px;height:14px;stroke:#64748b;stroke-width:2;fill:none}
.vil-icon:hover svg{stroke:#2563eb}
.vil-icon.del:hover svg{stroke:#dc2626}
</style> </style>
<table id="member">
<thead>
<tr>
<th>Villages</th>
</tr>
</thead>
</table> <div class="vil-wrap">
<table id="profile"> <div class="vil-head">Villages (<?php echo count($varray);?>)</div>
<table class="vil-table">
<tr> <tr>
<td>Name</td> <td>NAME</td>
<td>Population</td> <td>POPULATION</td>
<td>Coordinates</td> <td>COORDINATES</td>
<td>Add Troops</td> <td>TROOPS</td>
<td></td> <td style="width:32px"></td>
</tr> </tr>
<?php <?php
for ($i = 0; $i <= count($varray)-1; $i++) { for ($i = 0; $i < count($varray); $i++) {
$coorproc = $database->getCoor($varray[$i]['wref']); $coor = $database->getCoor($varray[$i]['wref']);
if($varray[$i]['capital']){ $capital = $varray[$i]['capital'] ? '<span class="c">(Capital)</span>' : '';
$capital = '<span class="c">(Capital)</span>';
$delLink = '<a href="#"><img src="../img/admin/del_g.gif" class="del"></a>'; $canDel = ($_SESSION['access'] == ADMIN && !$varray[$i]['capital']);
}else{ if($canDel){
$capital = ''; $delLink = '<a class="vil-icon del" href="?action=delVil&did='.$varray[$i]['wref'].'" onclick="return del(\'did\','.$varray[$i]['wref'].');" title="Delete village"><svg viewBox="0 0 24 24"><path d="M3 6h18M8 6V4h8v2m-1 0v14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V6h10z"/></svg></a>';
if($_SESSION['access'] == ADMIN){ } else {
$delLink = '<a href="?action=delVil&did='.$varray[$i]['wref'].'" onClick="return del(\'did\','.$varray[$i]['wref'].');"><img src="../img/admin/del.gif" class="del"></a>'; $delLink = '<span class="vil-icon" style="opacity:.3" title="Cannot delete"><svg viewBox="0 0 24 24"><path d="M3 6h18M8 6V4h8v2m-1 0v14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V6h10z"/></svg></span>';
}else if($_SESSION['access'] == MULTIHUNTER){ }
$delLink = '<a href="#"><img src="../img/admin/del_g.gif" class="del"></a>';
} $recount = '<a class="vil-icon" href="?action=recountPop&did='.$varray[$i]['wref'].'" title="Recount population"><svg viewBox="0 0 24 24"><path d="M21 12a9 9 0 1 1-3-6.7"/><path d="M21 3v6h-6"/></svg></a>';
}
$addTroops = '<a href="?p=addTroops&did='.$varray[$i]['wref'].'"> Edit Troops</a>'; echo '
echo '
<tr> <tr>
<td><a href="?p=village&did='.$varray[$i]['wref'].'">'.$varray[$i]['name'].'</a> '.$capital.'</td> <td style="text-align:left"><a href="?p=village&did='.$varray[$i]['wref'].'">'.$varray[$i]['name'].'</a> '.$capital.'</td>
<td>'.$varray[$i]['pop'].' <a href="?action=recountPop&did='.$varray[$i]['wref'].'">Recount<a/></td> <td>'.$varray[$i]['pop'].' '.$recount.'</td>
<td>('.$coorproc['x'].'|'.$coorproc['y'].')</td> <td>('.$coor['x'].'|'.$coor['y'].')</td>
<td>'.$addTroops.' </td> <td><a href="?p=addTroops&did='.$varray[$i]['wref'].'">Edit</a></td>
<td>'.$delLink.' </td> <td>'.$delLink.'</td>
</tr> </tr>';
';
} }
?> ?>
</table>
</table> </div>
+82 -46
View File
@@ -7,7 +7,7 @@
## ## ## ##
## Project: TravianZ ## ## Project: TravianZ ##
## Version: 05.03.2026 ## ## Version: 05.03.2026 ##
## Filename: Admin/admin.php ## ## Filename: Admin/admin.php ##
## Developed by: Dzoki ## ## Developed by: Dzoki ##
## Refactored by: Shadow ## ## Refactored by: Shadow ##
## License: TravianZ Project ## ## License: TravianZ Project ##
@@ -359,19 +359,54 @@ if (!empty($_GET['p'])) {
<link rel="stylesheet" type="text/css" href="../img/img.css"> <link rel="stylesheet" type="text/css" href="../img/img.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" src="jquery.cookie.js"></script> <script type="text/javascript" src="jquery.cookie.js"></script>
<?php <?php if($not_include_mootools_js){}else{ ?>
if($not_include_mootools_js){}else{
?>
<script type="text/javascript" src="/mt-full.js?423cb"></script> <script type="text/javascript" src="/mt-full.js?423cb"></script>
<script type="text/javascript" src="ajax.js"></script> <script type="text/javascript" src="ajax.js"></script>
<script type="text/javascript" src="../new.js?0faab"></script> <script type="text/javascript" src="../new.js?0faab"></script>
<?php <?php } ?>
} <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="imagetoolbar" content="no"> <meta http-equiv="imagetoolbar" content="no">
<meta name="viewport" content="width=device-width,initial-scale=1">
<style>
/* === TRAVIANZ ADMIN === */
body{margin:0;font-family:Verdana,Arial,sans-serif}
#ltop1{border-bottom:3px solid #f59e0b}
.tz-topbar{display:flex;align-items:center;justify-content:space-between;padding:14px 22px;min-height:64px}
.tz-brand{display:flex;align-items:center;gap:12px}
.tz-logo{width:38px;height:38px;background:#f59e0b;border-radius:8px;display:flex;align-items:center;justify-content:center;font-weight:bold;color:#fff;font-size:18px}
.tz-brand h1{margin:0;font-size:20px;font-weight:700}
.tz-brand h1 span{color:#f59e0b}
.tz-brand .tz-sub{display:block;font-size:10px;margin-top:2px;text-transform:uppercase;letter-spacing:.7px;opacity:.7}
.tz-user{font-size:12px}
.tz-logout{margin-left:10px;background:#ef4444;color:#fff;padding:5px 11px;border-radius:6px;text-decoration:none;font-size:11px;font-weight:bold}
/* LOGIN = header NEGRU */
body.login{background:#0f172a;color:#e2e8f0}
body.login #ltop1{background:#0b1220 !important;background-image:none !important}
body.login .tz-topbar{color:#fff !important}
body.login .tz-brand h1{color:#fff !important}
body.login .tz-brand .tz-sub{color:#94a3b8 !important}
/* APP = header ALB */
body.app{background:#eef2f7;color:#1f2937}
body.app #ltop1{background:#ffffff !important;background-image:none !important;border-bottom:1px solid #e5e7eb !important}
body.app .tz-topbar{color:#1f2937 !important}
body.app .tz-brand h1{color:#111827 !important}
body.app .tz-brand .tz-sub{color:#6b7280 !important}
body.app .tz-user{color:#4b5563}
body.app #lleft{background:#ffffff!important;border-right:1px solid #e5e7eb}
body.app #lmid1{background:#ffffff;border:1px solid #e5e7eb;border-radius:10px;box-shadow:0 1px 2px rgba(0,0,0,.04);margin:16px;padding:20px!important}
body.app #menu>li>a{display:block;padding:10px 16px;color:#374151!important;font-weight:600;font-size:12px;border-left:3px solid transparent;text-decoration:none}
body.app #menu>li>a:hover,body.app #menu>li>a.active{background:#f3f4f6;border-left-color:#f59e0b;color:#111827!important}
body.app #menu li.sub ul{background:#f9fafb}
body.app #menu li.sub ul li a{display:block;padding:8px 16px 8px 34px;font-size:11px;color:#6b7280!important}
body.app #menu li.sub ul li a:hover{color:#d97706!important}
body.app #menu li a{background:#ffffff !important;color:#374151 !important;border-bottom:1px solid #f3f4f6 !important}
body.app #menu li a:hover{background:#f9fafb !important}
body.app #lleft{box-shadow:none !important}
</style>
</head> </head>
<body> <body class="<?php echo $funct->CheckLogin() ? 'app' : 'login'; ?>">
<script type="text/javascript"> <script type="text/javascript">
init_local(); init_local();
function getMouseCoords(e) { function getMouseCoords(e) {
@@ -389,28 +424,23 @@ if (!empty($_GET['p'])) {
} }
return coords; return coords;
} }
function med_mouseMoveHandler(e, desc_string){ function med_mouseMoveHandler(e, desc_string){
var coords = getMouseCoords(e); var coords = getMouseCoords(e);
med_showDescription(coords, desc_string); med_showDescription(coords, desc_string);
} }
function med_closeDescription(){ function med_closeDescription(){
var layer = document.getElementById("medal_mouseover"); var layer = document.getElementById("medal_mouseover");
layer.className = "hide"; layer.className = "hide";
} }
function init_local(){ function init_local(){
med_init(); med_init();
} }
function med_init(){ function med_init(){
layer = document.createElement("div"); layer = document.createElement("div");
layer.id = "medal_mouseover"; layer.id = "medal_mouseover";
layer.className = "hide"; layer.className = "hide";
document.body.appendChild(layer); document.body.appendChild(layer);
} }
function med_showDescription(coords, desc_string){ function med_showDescription(coords, desc_string){
var layer = document.getElementById("medal_mouseover"); var layer = document.getElementById("medal_mouseover");
layer.style.top = (coords.y + 25)+ "px"; layer.style.top = (coords.y + 25)+ "px";
@@ -422,7 +452,6 @@ if (!empty($_GET['p'])) {
<script language="javascript"> <script language="javascript">
function aktiv() {this.srcElement.className='fl1'; } function aktiv() {this.srcElement.className='fl1'; }
function inaktiv() {event.srcElement.className='fl2'; } function inaktiv() {event.srcElement.className='fl2'; }
function del(e,id){ function del(e,id){
if(e == 'arti'){ var conf = confirm('Dou you really want delete artifact id '+id+'?'); } if(e == 'arti'){ var conf = confirm('Dou you really want delete artifact id '+id+'?'); }
if(e == 'did'){ var conf = confirm('Dou you really want delete village id '+id+'?'); } if(e == 'did'){ var conf = confirm('Dou you really want delete village id '+id+'?'); }
@@ -433,19 +462,10 @@ if (!empty($_GET['p'])) {
} }
</script> </script>
<script type="text/javascript"> <script type="text/javascript">
function showStuff(id) { function showStuff(id) { document.getElementById(id).style.display = 'block'; }
document.getElementById(id).style.display = 'block'; function hideStuff(id) { document.getElementById(id).style.display = 'none'; }
} function go_url(url) { location=url; return(false); }
function hideStuff(id) {
document.getElementById(id).style.display = 'none';
}
function go_url(url) {
location=url;
return(false);
}
</script> </script>
<!-- Start Accordeon Menu -->
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function () { $(document).ready(function () {
var checkCookie = $.cookie("sub-nav"); var checkCookie = $.cookie("sub-nav");
@@ -462,8 +482,6 @@ if (!empty($_GET['p'])) {
$(this).next().slideToggle(); $(this).next().slideToggle();
} }
return false; return false;
$('#menu li a').removeClass('active');
$(this).addClass('active');
}); });
var checkCookie = $.cookie("sub-link"); var checkCookie = $.cookie("sub-link");
if (checkCookie != "") { if (checkCookie != "") {
@@ -475,28 +493,47 @@ if (!empty($_GET['p'])) {
$('.sub ul li a').removeClass('active'); $('.sub ul li a').removeClass('active');
$(this).addClass('active'); $(this).addClass('active');
}); });
}); });
</script> </script>
<!-- End Accordeon Menu -->
<div id="ltop1"> <div id="ltop1">
<div style="position:relative; height:100px; float:left;"> <div class="tz-topbar">
<img src="../img/x.gif" width="1" height="1"> <div class="tz-brand">
<div class="tz-logo">TZ</div>
<div>
<h1>TravianZ <span>Admin Panel</span></h1>
<span class="tz-sub"><?php echo htmlspecialchars($subpage); ?> • v05.03.2026</span>
</div>
</div>
<div class="tz-user">
<?php if($funct->CheckLogin()){ ?>
<?php
$adminName = $database->getUserField($_SESSION['id'], 'username', 0);
$adminAccess = $database->getUserField($_SESSION['id'], 'access', 0);
$rank = $adminAccess == 9 ? 'Admin' : ($adminAccess == 8 ? 'MH' : 'User');
?>
Logged: <b><?=$adminName?></b> <span style="color:#999;font-size:11px">(<?=$rank?>)</span>
<a href="?action=logout" class="tz-logout">Logout</a>
<?php } else { ?>
Not Logged in
<?php } ?>
</div>
</div> </div>
<p class="center-img">
<img class="fl2" src="../img/admin/x1.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'">
<img class="fl2" src="../img/admin/x2.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'">
<img class="fl2" src="../img/admin/x3.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'">
<img class="fl2" src="../img/admin/x4.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'">
<img class="fl2" src="../img/admin/x5.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'">
</p>
</div> </div>
<div id="lmidall"> <div id="lmidall">
<div id="lmidlc"> <div id="lmidlc">
<div id="lleft"> <div id="lleft">
<p class="center-img"> <p class="center-img">
<a href="<?php echo HOMEPAGE; ?>"><img src="../img/en/a/travian0.gif" class="logo_plus" width="116" height="60" border="0"></a> <a href="<?php echo HOMEPAGE; ?>">
</p> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="78" height="78" style="display:block;margin:0 auto;filter:drop-shadow(0 2px 4px rgba(0,0,0,.25));">
<!-- Start Accordeon Menu --> <defs><linearGradient id="tz1" x1="128" y1="28" x2="128" y2="236"><stop offset="0%" stop-color="#f59e0b"/><stop offset="100%" stop-color="#d97706"/></linearGradient></defs>
<path d="M128 28c-32 0-64 3-84 16v86c0 54 36 90 84 104 48-14 84-50 84-104V44c-20-13-52-16-84-16z" fill="url(#tz1)" stroke="#78350f" stroke-width="5"/>
<path d="M106 38l9-12 8 7 5-14 5 14 8-7 9 12v8c-14-4.5-30-4.5-44 0v-8z" fill="#fcd34d" stroke="#78350f" stroke-width="3"/>
<text x="128" y="165" font-family="Georgia" font-size="90" font-weight="700" text-anchor="middle" fill="#3c1f0a">TZ</text>
</svg>
</a>
</p>
<?php <?php
if($funct->CheckLogin()) if($funct->CheckLogin())
{ {
@@ -537,7 +574,6 @@ if (!empty($_GET['p'])) {
<li class="sub"><a href="#">Ban</a> <li class="sub"><a href="#">Ban</a>
<ul> <ul>
<li><a href="?p=ban">Ban/Unban Players</a></li> <li><a href="?p=ban">Ban/Unban Players</a></li>
<li><a href="?p=maintenance">Server Maintenance</a></li>
<li><a href="?p=cleanban">Clean Banlist Data</a></li> <li><a href="?p=cleanban">Clean Banlist Data</a></li>
</ul> </ul>
</li> </li>
@@ -566,6 +602,7 @@ if (!empty($_GET['p'])) {
<ul> <ul>
<li><a href="?p=admin_log"><font color="Red"><b>Admin Log</b></font></a></li> <li><a href="?p=admin_log"><font color="Red"><b>Admin Log</b></font></a></li>
<li><a href="?p=config">Server Settings</a></li> <li><a href="?p=config">Server Settings</a></li>
<li><a href="?p=maintenance">Server Maintenance</a></li>
<li><a href="?p=resetServer">Server Resetting</a></li> <li><a href="?p=resetServer">Server Resetting</a></li>
</ul> </ul>
</li> </li>
@@ -588,7 +625,6 @@ if (!empty($_GET['p'])) {
} }
} }
?> ?>
<!-- End Accordeon Menu -->
</div> </div>
<div id="lmid1"> <div id="lmid1">
<div id="lmid3"> <div id="lmid3">
@@ -624,4 +660,4 @@ if (!empty($_GET['p'])) {
<div id="ce"></div> <div id="ce"></div>
</div> </div>
</body> </body>
</html> </html>
View File
+53
View File
@@ -0,0 +1,53 @@
<?php
#################################################################################
## editAli.php - Backend pentru editAli.tpl ##
#################################################################################
include_once("../../config.php");
include_once("../../Session.php");
include_once("../../Database.php");
$session = new Session();
$database = new Database();
// doar admini
if(!$session->isAdmin()){
header("Location: ../../../Admin/admin.php");
exit;
}
$aid = (int)($_POST['aid'] ?? 0);
$admid = (int)($_POST['admid'] ?? 0);
// verificare sesiune
if($admid != $session->uid || $aid <= 0){
die("Access denied");
}
$tag = $database->escape(substr(trim($_POST['tag']), 0, 8));
$name = $database->escape(substr(trim($_POST['name']), 0, 25));
$leader = (int)$_POST['leader'];
$max = (int)$_POST['max'];
if($max < 3) $max = 3;
if($max > 60) $max = 60;
$notice = $database->escape($_POST['notice']);
$desc = $database->escape($_POST['desc']);
// update alidata
$database->query("UPDATE ".TB_PREFIX."alidata SET
tag = '$tag',
name = '$name',
leader = $leader,
`max` = $max,
notice = '$notice',
`desc` = '$desc'
WHERE id = $aid");
// log admin
$database->query("INSERT INTO ".TB_PREFIX."admin_log (uid, action, time) VALUES ($admid, 'Edited alliance $aid ($tag)', ".time().")");
// redirect inapoi
header("Location: ../../../Admin/admin.php?p=alliance&aid=$aid&edited=1");
exit;
?>
+30 -7
View File
@@ -5,9 +5,9 @@
## Filename editBuildings.php ## ## Filename editBuildings.php ##
## Type BACKEND ## ## Type BACKEND ##
## Developed by: aggenkeech ## ## Developed by: aggenkeech ##
## Fix by: ronix ## ## Fix by: ronix + Shadow 2026 (WW lvl 100 + auto pop) ##
## License: TravianZ Project ## ## License: TravianZ Project ##
## Copyright: TravianZ (c) 2011-2014. All rights reserved. ## ## Copyright: TravianZ (c) 2011-2026. All rights reserved. ##
## ## ## ##
################################################################################# #################################################################################
@@ -52,16 +52,25 @@ for ($i = 1; $i <= 40; $i++) {
$gid = (int)($_POST["id{$i}gid"] ?? 0); $gid = (int)($_POST["id{$i}gid"] ?? 0);
// limităm la valori rezonabile Travian // limităm la valori rezonabile Travian
$level = max(0, min(20, $level)); $level = max(0, min(20, $level));
$gid = max(0, min(40, $gid)); $gid = max(0, min(44, $gid)); // 44 = ziduri speciale
$sets[] = "f{$i} = $level"; $sets[] = "f{$i} = $level";
$sets[] = "f{$i}t = $gid"; $sets[] = "f{$i}t = $gid";
} }
// câmpurile speciale f99 (capcană / zid?) // câmpurile speciale f99
$level99 = (int)($_POST['id99level'] ?? 0); $level99 = (int)($_POST['id99level'] ?? 0);
$gid99 = (int)($_POST['id99gid'] ?? 0); $gid99 = (int)($_POST['id99gid'] ?? 0);
$sets[] = "f99 = " . max(0, min(20, $level99));
$sets[] = "f99t = " . max(0, min(40, $gid99)); // --- FIX WW: gid 40 = World Wonder, level maxim 100 ---
if ($gid99 == 40) {
$level99 = max(0, min(100, $level99));
} else {
$level99 = max(0, min(20, $level99)); // capcană, etc.
}
$gid99 = max(0, min(44, $gid99));
$sets[] = "f99 = " . $level99;
$sets[] = "f99t = " . $gid99;
$setSql = implode(', ', $sets); $setSql = implode(', ', $sets);
@@ -70,9 +79,23 @@ $setSql = implode(', ', $sets);
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
$database->query("UPDATE " . TB_PREFIX . "fdata SET $setSql WHERE vref = $id"); $database->query("UPDATE " . TB_PREFIX . "fdata SET $setSql WHERE vref = $id");
// ---------------------------------------------------------------------------
// recalculăm populația după editare // recalculăm populația după editare
// ---------------------------------------------------------------------------
$automation = new Automation(); $automation = new Automation();
$automation->recountPop($id); $pop = $automation->recountPop($id);
// --- FIX: recountPop original nu include f99 (WW), îl adăugăm ---
$fdata = $database->getResourceLevel($id);
if ((int)$fdata['f99t'] === 40) {
$wwLevel = (int)$fdata['f99'];
if ($wwLevel > 0) {
// buildingPOP există în Automation
$wwPop = $automation->buildingPOP(40, $wwLevel);
$pop += $wwPop;
$database->query("UPDATE " . TB_PREFIX . "vdata SET pop = $pop WHERE wref = $id");
}
}
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Log admin // Log admin
+21 -3
View File
@@ -3021,10 +3021,11 @@ class MYSQLi_DB implements IDbConnection {
$q = "DELETE from " . TB_PREFIX . "forum_post where id = '$id'"; $q = "DELETE from " . TB_PREFIX . "forum_post where id = '$id'";
return mysqli_query($this->dblink,$q); return mysqli_query($this->dblink,$q);
} }
function getAllianceName($id, $use_cache = true) { function getAllianceName($id, $use_cache = true) {
// return from cache if (!$id) return '-';
return $this->getAlliance($id, $use_cache)['tag']; $alliance = $this->getAlliance($id, $use_cache);
return $alliance['tag'] ?? '-';
} }
// no need to cache this method // no need to cache this method
@@ -8751,6 +8752,22 @@ $q = "INSERT INTO ".TB_PREFIX."demolition VALUES (
hero.wref = $wref"; hero.wref = $wref";
return mysqli_query($this->dblink, $q); return mysqli_query($this->dblink, $q);
} }
public function getMaintenance() {
$q = "SELECT * FROM ".TB_PREFIX."maintenance WHERE id=1 LIMIT 1";
$res = $this->query_return($q);
return $res[0]?? ['active'=>0];
}
public function setMaintenance($active, $uid=0) {
$time = time();
$active = (int)$active;
$uid = (int)$uid;
// REPLACE creează rândul dacă nu există
return $this->query("REPLACE INTO ".TB_PREFIX."maintenance
(id, active, started_by, started_at)
VALUES (1, $active, $uid, $time)");
}
/** /**
* Changed the actual capital with a new one * Changed the actual capital with a new one
@@ -8767,6 +8784,7 @@ $q = "INSERT INTO ".TB_PREFIX."demolition VALUES (
} }
}; };
// database is not needed if we're displaying static pages // database is not needed if we're displaying static pages
$req_file = basename($_SERVER['PHP_SELF']); $req_file = basename($_SERVER['PHP_SELF']);
if (!in_array($req_file, ['tutorial.php', 'anleitung.php'])) { if (!in_array($req_file, ['tutorial.php', 'anleitung.php'])) {
+2
View File
@@ -115,6 +115,7 @@ class MyGenerator
*/ */
public function getTimeFormat($time) public function getTimeFormat($time)
{ {
$time = (int) $time;
$min = 0; $min = 0;
$hr = 0; $hr = 0;
@@ -139,6 +140,7 @@ class MyGenerator
*/ */
public function procMtime($time, $pref = 3) public function procMtime($time, $pref = 3)
{ {
$time = (int) $time;
$time += 0; // placeholder for timezone adjustments $time += 0; // placeholder for timezone adjustments
$today = date('d', time()) - 1; $today = date('d', time()) - 1;
+33 -18
View File
@@ -87,27 +87,42 @@ class Session {
var $sit1; var $sit1;
var $sit2; var $sit2;
var $cp; var $cp;
function __construct() { function __construct() {
global $database; global $database;
$this->time = time(); $this->time = time();
if (!isset($_SESSION)) { if (!isset($_SESSION)) {
session_start(); session_start();
}
$this->logged_in = $this->checkLogin();
if ($this->logged_in && TRACK_USR) {
$database->updateActiveUser($this->username, $this->time);
}
$this->referrer = $_SESSION['url'] ?? "/";
$this->url = $_SESSION['url'] = $_SERVER['PHP_SELF'];
$this->SurfControl();
} }
$this->logged_in = $this->checkLogin();
if ($this->logged_in && TRACK_USR) {
$database->updateActiveUser($this->username, $this->time);
}
// aici se seteaza access-ul in checkLogin, dar sa fim siguri
if(!isset($this->access)) {
$this->access = $this->logged_in ? $database->getUserField($this->uid, "access", 1) : 0;
}
// === MAINTENANCE CHECK - DUPA ce avem access ===
$maint = $database->getMaintenance();
if($maint['active'] == 1 && $this->access < 9) {
// evita loop infinit
if(strpos($_SERVER['PHP_SELF'], 'maintenance.php') === false) {
header('Location: maintenance.php');
exit;
}
}
$this->referrer = $_SESSION['url'] ?? "/";
$this->url = $_SESSION['url'] = $_SERVER['PHP_SELF'];
$this->SurfControl();
}
/** /**
* LOGIN USER * LOGIN USER
*/ */
@@ -140,7 +155,7 @@ class Session {
$data = $database->getVillage($userFields["id"]); $data = $database->getVillage($userFields["id"]);
} }
$_SESSION['wid'] = $data['wref']; $_SESSION['wid'] = isset($data['wref']) ? (int)$data['wref'] : 0;
} }
$this->logged_in = true; $this->logged_in = true;
+108 -94
View File
@@ -62,7 +62,6 @@ if (isset($packages[$amount]) && $amount > 0) {
$_SESSION['amount'] = 0; $_SESSION['amount'] = 0;
} }
?> ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html> <html>
<head> <head>
@@ -78,7 +77,6 @@ if (isset($packages[$amount]) && $amount > 0) {
<script src="new.js?0faab" type="text/javascript"></script> <script src="new.js?0faab" type="text/javascript"></script>
<link href="<?php echo GP_LOCATE; ?>lang/en/lang.css?f4b7d" rel="stylesheet" type="text/css" /> <link href="<?php echo GP_LOCATE; ?>lang/en/lang.css?f4b7d" rel="stylesheet" type="text/css" />
<link href="<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7i" rel="stylesheet" type="text/css" /> <link href="<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7i" rel="stylesheet" type="text/css" />
<?php <?php
if ($session->gpack == null || GP_ENABLE == false) { if ($session->gpack == null || GP_ENABLE == false) {
echo '<link href="' . GP_LOCATE . 'travian.css?e21d2" rel="stylesheet" type="text/css" />'; echo '<link href="' . GP_LOCATE . 'travian.css?e21d2" rel="stylesheet" type="text/css" />';
@@ -91,13 +89,10 @@ if (isset($packages[$amount]) && $amount > 0) {
<script type="text/javascript">window.addEvent('domready', start);</script> <script type="text/javascript">window.addEvent('domready', start);</script>
</head> </head>
<body class="v35"> <body class="v35">
<div class="wrapper"> <div class="wrapper">
<img style="filter:chroma();" src="img/x.gif" id="msfilter" alt="" /> <img style="filter:chroma();" src="img/x.gif" id="msfilter" alt="" />
<div id="dynamic_header"></div> <div id="dynamic_header"></div>
<?php include("Templates/header.tpl"); ?> <?php include("Templates/header.tpl"); ?>
<div id="mid"> <div id="mid">
<?php include("Templates/menu.tpl"); ?> <?php include("Templates/menu.tpl"); ?>
<?php include("Templates/Plus/pmenu.tpl"); ?> <?php include("Templates/Plus/pmenu.tpl"); ?>
@@ -106,7 +101,6 @@ if (isset($packages[$amount]) && $amount > 0) {
<div id="products"> <div id="products">
<?php if ($transactionProcessed) { ?> <?php if ($transactionProcessed) { ?>
<!-- Partea de mulțumire după plată -->
<p>Thank you for your purchase here at <?php echo SERVER_NAME; ?>.</p> <p>Thank you for your purchase here at <?php echo SERVER_NAME; ?>.</p>
<p>Below you see the entry record. Out of it, you can observe your old as well as your new account balance.</p> <p>Below you see the entry record. Out of it, you can observe your old as well as your new account balance.</p>
@@ -122,7 +116,6 @@ if (isset($packages[$amount]) && $amount > 0) {
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<!-- tabelul cu old / package / new balance -->
<tr> <tr>
<td class="desc"><b>&nbsp;&nbsp;Account Balance (old)</b></td> <td class="desc"><b>&nbsp;&nbsp;Account Balance (old)</b></td>
<td class="desc"><div style="text-align:center"><?php echo $oldBalance; ?></div></td> <td class="desc"><div style="text-align:center"><?php echo $oldBalance; ?></div></td>
@@ -151,9 +144,8 @@ if (isset($packages[$amount]) && $amount > 0) {
<p>Please mail your username, package, order time and email used to <p>Please mail your username, package, order time and email used to
<a href="mailto:<?php echo defined('PAYPAL_EMAIL') ? PAYPAL_EMAIL : 'novgorodschi@icloud.com'; ?>">our billing address</a>.</p> <a href="mailto:<?php echo defined('PAYPAL_EMAIL') ? PAYPAL_EMAIL : 'novgorodschi@icloud.com'; ?>">our billing address</a>.</p>
<?php } else { ?> <?php } else {
<!-- Partea cu istoricul normal --> // --- ISTORIC NORMAL CU FILTRU ---
<?php
$result = mysqli_query($database->dblink, "SELECT gold FROM ".TB_PREFIX."users WHERE id = $uid LIMIT 1"); $result = mysqli_query($database->dblink, "SELECT gold FROM ".TB_PREFIX."users WHERE id = $uid LIMIT 1");
$golds = mysqli_fetch_assoc($result); $golds = mysqli_fetch_assoc($result);
@@ -163,100 +155,126 @@ if (isset($packages[$amount]) && $amount > 0) {
SUM(CASE WHEN gold < 0 THEN -gold ELSE 0 END) as spent SUM(CASE WHEN gold < 0 THEN -gold ELSE 0 END) as spent
FROM ".TB_PREFIX."gold_fin_log WHERE uid = $uid FROM ".TB_PREFIX."gold_fin_log WHERE uid = $uid
")); "));
$received = (int)($stats['received'] ?? 0); $received = (int)($stats['received'] ?? 0);
$spent = (int)($stats['spent'] ?? 0); $spent = (int)($stats['spent'] ?? 0);
?>
// FILTRU + PAGINARE
$perPage = 25;
$page = isset($_GET['p']) ? max(1,(int)$_GET['p']) : 1;
$offset = ($page-1)*$perPage;
$f = $_GET['f'] ?? 'all';
$where = "l.uid = $uid";
if($f==='in') $where .= " AND l.gold > 0";
elseif($f==='out') $where .= " AND l.gold < 0";
elseif($f==='gift') $where .= " AND (l.action LIKE '%Gift%' OR l.details LIKE '%gift%' OR l.details LIKE '%Admin%')";
$countRes = mysqli_query($database->dblink, "SELECT COUNT(*) as c FROM ".TB_PREFIX."gold_fin_log l WHERE $where");
$totalRows = (int)mysqli_fetch_assoc($countRes)['c'];
$totalPages = max(1, ceil($totalRows / $perPage));
?>
<p>Here you can see your current account statement.</p> <p>Here you can see your current account statement.</p>
<p>Current balance: <img src="img/x.gif" class="gold" alt="Gold" /> <b><?php echo (int)$golds['gold']; ?></b> <p>Current balance: <img src="img/x.gif" class="gold" alt="Gold" /> <b><?php echo (int)$golds['gold']; ?></b>
&nbsp; | &nbsp; Total received: <b style="color:#71D000;">+<?php echo $received; ?></b> &nbsp; | &nbsp; Total received: <b style="color:#71D000;">+<?php echo $received; ?></b>
&nbsp; | &nbsp; Total spent: <b style="color:#FF6F0F;">-<?php echo $spent; ?></b></p> &nbsp; | &nbsp; Total spent: <b style="color:#FF6F0F;">-<?php echo $spent; ?></b></p>
<!-- Tabelul cu istoricul (codul tău complet) --> <!-- BARA CU ICONITE -->
<table class="plusFunctions" cellpadding="1" cellspacing="1"> <div style="background:#f0f0f0; border:1px solid #d0d0d0; padding:6px 8px; margin:10px 0; border-radius:3px; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap;">
<thead> <div style="display:flex; gap:10px; align-items:center;">
<tr> <a href="a2b2.php?f=all" style="text-decoration:none; padding:3px 8px; <?php if($f=='all') echo 'background:#fff; border:1px solid #aaa; border-radius:3px; font-weight:bold;'; ?>">
<th colspan="6" height="20">Gold history</th> <img src="img/x.gif" class="gold" style="vertical-align:-2px;"> Toate
</tr> </a>
<tr> <a href="a2b2.php?f=in" style="text-decoration:none; padding:3px 8px; color:#228B22; <?php if($f=='in') echo 'background:#fff; border:1px solid #aaa; border-radius:3px; font-weight:bold;'; ?>">
<td align="center">Date & Time</td> <b style="font-size:15px;">+</b> Intrări
<td align="center">Village</td> </a>
<td align="center">Action</td> <a href="a2b2.php?f=out" style="text-decoration:none; padding:3px 8px; color:#D00000; <?php if($f=='out') echo 'background:#fff; border:1px solid #aaa; border-radius:3px; font-weight:bold;'; ?>">
<td align="center">Details</td> <b style="font-size:15px;"></b> Ieșiri
<td align="center"> </a>
<img src="img/x.gif" class="gold" alt="Gold" title="Gold" /> <a href="a2b2.php?f=gift" style="text-decoration:none; padding:3px 8px; color:#0066cc; <?php if($f=='gift') echo 'background:#fff; border:1px solid #aaa; border-radius:3px; font-weight:bold;'; ?>">
</td> 🎁 Cadouri
<td align="center">Balance</td> </a>
</tr> </div>
</thead> <div>
<!-- AICI INCEPE PROBLEMA --> <form method="get" style="margin:0;">
<tbody> <input type="hidden" name="f" value="<?php echo htmlspecialchars($f); ?>">
<?php <select name="p" onchange="this.form.submit()" style="font-size:11px; padding:2px;">
$q = mysqli_query( <?php for($i=1;$i<=$totalPages;$i++){ echo '<option value="'.$i.'"'.($i==$page?' selected':'').'>Pagina '.$i.' / '.$totalPages.'</option>'; } ?>
$database->dblink, </select>
"SELECT l.*, v.name as vname </form>
FROM ".TB_PREFIX."gold_fin_log l </div>
LEFT JOIN ".TB_PREFIX."vdata v ON v.wref = l.wid
WHERE l.uid = $uid
ORDER BY l.time DESC
LIMIT 200"
);
$balance = (int)$golds['gold'];
if (mysqli_num_rows($q) > 0) {
while ($r = mysqli_fetch_assoc($q)) {
$date = date('d.m.Y H:i:s', $r['time']);
$villageName = !empty($r['vname']) ? htmlspecialchars($r['vname'], ENT_QUOTES, 'UTF-8') : '-';
$action = htmlspecialchars($r['action'], ENT_QUOTES, 'UTF-8');
$details = htmlspecialchars(($r['details'] ?? ''), ENT_QUOTES, 'UTF-8');
$gold = (int)$r['gold'];
if (stripos($details, 'Mass gift') !== false) {
$action = 'Admin Gift (All)';
$details = str_replace('Mass gift by ', 'by ', $details);
} elseif (stripos($details, 'gift by') !== false) {
$action = 'Admin Gift';
}
$color = $gold < 0 ? '#FF6F0F' : '#71D000';
$sign = $gold > 0 ? '+' : '';
echo '<tr>';
echo '<td class="desc"><div style="text-align:center">'.$date.'</div></td>';
echo '<td class="desc"><div style="text-align:center">'.$villageName.'</div></td>';
echo '<td class="desc"><div style="text-align:center"><b>'.$action.'</b></div></td>';
echo '<td class="desc"><div style="text-align:center"><span style="color:#666;font-size:11px">'.$details.'</span></div></td>';
echo '<td class="desc"><div style="text-align:center"><font color="'.$color.'"><b>'.$sign.$gold.'</b></font></div></td>';
echo '<td class="act"><div style="text-align:center">'.$balance.'</div></td>';
echo '</tr>';
$balance -= $gold;
}
} else {
echo '
<tr>
<td colspan="6" class="desc">
<div style="text-align:center;padding:8px;">
No transactions yet.
</div> </div>
</td>
</tr>'; <table class="plusFunctions" cellpadding="1" cellspacing="1">
} <thead>
?> <tr><th colspan="6" height="20">Gold history (<?php echo $totalRows; ?>)</th></tr>
</tbody> <tr>
<!-- AICI SE TERMINA PROBLEMA --> <td align="center">Date & Time</td>
<td align="center">Village</td>
<td align="center">Action</td>
<td align="center">Details</td>
<td align="center"><img src="img/x.gif" class="gold" alt="Gold" /></td>
<td align="center">Balance</td>
</tr>
</thead>
<tbody>
<?php
$q = mysqli_query($database->dblink,
"SELECT l.*, v.name as vname
FROM ".TB_PREFIX."gold_fin_log l
LEFT JOIN ".TB_PREFIX."vdata v ON v.wref = l.wid
WHERE $where
ORDER BY l.time DESC
LIMIT $offset, $perPage");
$sumBefore = 0;
if($offset > 0){
$sumRes = mysqli_query($database->dblink,
"SELECT COALESCE(SUM(gold),0) as s FROM (
SELECT gold FROM ".TB_PREFIX."gold_fin_log l WHERE $where ORDER BY l.time DESC LIMIT $offset
) t");
$sumBefore = (int)mysqli_fetch_assoc($sumRes)['s'];
}
$balance = (int)$golds['gold'] - $sumBefore;
if(mysqli_num_rows($q) > 0){
while($r = mysqli_fetch_assoc($q)){
$date = date('d.m.Y H:i:s', $r['time']);
$villageName = !empty($r['vname']) ? htmlspecialchars($r['vname'], ENT_QUOTES, 'UTF-8') : '-';
$action = htmlspecialchars($r['action'], ENT_QUOTES, 'UTF-8');
$details = htmlspecialchars(($r['details'] ?? ''), ENT_QUOTES, 'UTF-8');
$gold = (int)$r['gold'];
if(stripos($details,'Mass gift')!==false){ $action='Admin Gift (All)'; $details=str_replace('Mass gift by ','by ',$details); }
elseif(stripos($details,'gift by')!==false){ $action='Admin Gift'; }
$color = $gold < 0 ? '#FF6F0F' : '#71D000';
$sign = $gold > 0 ? '+' : '';
echo '<tr>';
echo '<td class="desc"><div style="text-align:center">'.$date.'</div></td>';
echo '<td class="desc"><div style="text-align:center">'.$villageName.'</div></td>';
echo '<td class="desc"><div style="text-align:center"><b>'.$action.'</b></div></td>';
echo '<td class="desc"><div style="text-align:center"><span style="color:#666;font-size:11px">'.$details.'</span></div></td>';
echo '<td class="desc"><div style="text-align:center"><font color="'.$color.'"><b>'.$sign.$gold.'</b></font></div></td>';
echo '<td class="act"><div style="text-align:center">'.$balance.'</div></td>';
echo '</tr>';
$balance -= $gold;
}
} else {
echo '<tr><td colspan="6" class="desc"><div style="text-align:center;padding:8px;">No transactions yet.</div></td></tr>';
}
?>
</tbody>
</table> </table>
<p>Please verify the information.<br>It will let us know if the data is incorrect.</p> <p>Please verify the information.<br>It will let us know if the data is incorrect.</p>
<p>Please mail your username, package, order time and email used to <p>Please mail your username, package, order time and email used to
<a href="mailto:<?php echo defined('PAYPAL_EMAIL') ? PAYPAL_EMAIL : 'cata7007@gmail.com'; ?>">our billing address</a>.</p> <a href="mailto:<?php echo defined('PAYPAL_EMAIL') ? PAYPAL_EMAIL : 'cata7007@gmail.com'; ?>">our billing address</a>.</p>
<?php } ?> <?php } ?>
</div> <!-- #products --> </div>
</div> <!-- #mid --> </div>
<br /><br /><br /><br /> <br /><br /><br /><br />
<div id="side_info"> <div id="side_info">
<?php <?php
include("Templates/multivillage.tpl"); include("Templates/multivillage.tpl");
@@ -268,18 +286,15 @@ if (isset($packages[$amount]) && $amount > 0) {
} }
?> ?>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
</div> <!-- .wrapper --> </div>
<div class="footer-stopper"></div> <div class="footer-stopper"></div>
<div class="clear"></div> <div class="clear"></div>
<?php <?php
include("Templates/footer.tpl"); include("Templates/footer.tpl");
include("Templates/res.tpl"); // ← foarte important aici include("Templates/res.tpl");
?> ?>
<div id="stime"> <div id="stime">
<div id="ltime"> <div id="ltime">
<div id="ltimeWrap"> <div id="ltimeWrap">
@@ -288,7 +303,6 @@ include("Templates/res.tpl"); // ← foarte important aici
</div> </div>
</div> </div>
</div> </div>
<div id="ce"></div> <div id="ce"></div>
</body> </body>
</html> </html>
+4 -2
View File
@@ -37,7 +37,9 @@ if(isset($_GET['newdid'])) {
exit; exit;
} }
if($_SESSION['ok'] == 2){ // ==== NOUA VERIFICARE (in loc de $_SESSION['ok']) ====
$maintenance = $database->getMaintenance();
if($maintenance['active'] == 1 && $session->access < 9){
?> ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html> <html>
@@ -128,4 +130,4 @@ echo round(($generator->pageLoadTimeEnd()-$start_timer)*1000);
header("Location: dorf1.php"); header("Location: dorf1.php");
exit; exit;
} }
?> ?>
-17
View File
@@ -1,17 +0,0 @@
- shouldn't we create accounts from middle towards corners, not middle-corners-everywhere?
+ change "incoming attacker" title of the raid list icon when actually attacking a farm (it should be "Own attacking troops")
+ change "select all" button to actually select all checkboxes via JS, not via page reload
- make sure that when auto-removing inactive players, anyone who have units going there + anyone with them in their raid lists etc. gets notified and sorted out
- display "send troops" link for own villages, so we don't have to enter coordinates or search by name (which can search good name but wrong owner!)
- check the following queries for performing stuff on DB rather than in PHP:
"SELECT * FROM s1_vdata WHERE wood > maxstore OR clay > maxstore OR iron > maxstore OR crop > maxcrop"
"SELECT * FROM s1_odata WHERE maxstore < 800 OR maxcrop < 800"
"SELECT * FROM s1_vdata WHERE wood < 0 OR clay < 0 OR iron < 0 OR crop < 0"
"SELECT * FROM `s1_fdata`"
- try to find and fix this (it's probably automation but has came up with a new registration, first login):
"UPDATE s1_units set hero = hero - WHERE vref = 38801"
- there is an excessive amount of these, find where and correct that:
"UPDATE s1_hero set dead = 1 where uid = 99"
- this shouldn't be:
"UPDATE s1_bdata SET timestamp = 1508863345 WHERE id = ''"
- when refactored version is complete, make a bot competition and create server only for bots to fight each other to see who can program the better bot :)
File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More